iwlwifi: mvm: add support for PHY context command v4
authorJohannes Berg <johannes.berg@intel.com>
Sat, 4 Dec 2021 06:35:54 +0000 (08:35 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 7 Dec 2021 18:06:36 +0000 (20:06 +0200)
A new version of this command deprecates the rxchain_info field
but is otherwise the same, so treat it the same way. We already
leave the rxchain_info zeroed since the RLC command is supported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211204083238.aca5bd78518e.I2f1b4b38899717851ea9f5b6dd23cde27e10387a@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h
drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c

index 68b788b..e66f779 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2012-2014, 2018, 2020 Intel Corporation
+ * Copyright (C) 2012-2014, 2018, 2020-2021 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -150,11 +150,12 @@ struct iwl_phy_context_cmd {
        /* COMMON_INDEX_HDR_API_S_VER_1 */
        __le32 id_and_color;
        __le32 action;
-       /* PHY_CONTEXT_DATA_API_S_VER_3 */
+       /* PHY_CONTEXT_DATA_API_S_VER_3, PHY_CONTEXT_DATA_API_S_VER_4 */
        struct iwl_fw_channel_info ci;
        __le32 lmac_id;
-       __le32 rxchain_info;
+       __le32 rxchain_info; /* reserved in _VER_4 */
        __le32 dsp_cfg_flags;
        __le32 reserved;
-} __packed; /* PHY_CONTEXT_CMD_API_VER_3 */
+} __packed; /* PHY_CONTEXT_CMD_API_VER_3, PHY_CONTEXT_CMD_API_VER_4 */
+
 #endif /* __iwl_fw_api_phy_ctxt_h__ */
index 6feb2f6..9af40b0 100644 (file)
@@ -212,7 +212,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm,
        int ver = iwl_fw_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP,
                                        PHY_CONTEXT_CMD, 1);
 
-       if (ver == 3) {
+       if (ver == 3 || ver == 4) {
                struct iwl_phy_context_cmd cmd = {};
 
                /* Set the command header fields */