]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iwlwifi: mvm: cleanup dead code on resume flow for non unified image.
authorDreyfuss, Haim <haim.dreyfuss@intel.com>
Mon, 21 May 2018 07:36:46 +0000 (10:36 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 28 Sep 2018 05:57:23 +0000 (08:57 +0300)
CDB support has nothing to do with non unified image.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/d3.c

index b09446697c466d7935ac4fa59b3409d87e52d1c2..210be26aadaacb93e70c719cef676d9c2db743b2 100644 (file)
@@ -434,23 +434,13 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        u8 chains_static, chains_dynamic;
        struct cfg80211_chan_def chandef;
        int ret, i;
-       struct iwl_binding_cmd binding_cmd = {};
+       struct iwl_binding_cmd_v1 binding_cmd = {};
        struct iwl_time_quota_cmd quota_cmd = {};
        struct iwl_time_quota_data *quota;
        u32 status;
-       int size;
-
-       if (fw_has_capa(&mvm->fw->ucode_capa,
-                       IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT)) {
-               size = sizeof(binding_cmd);
-               if (mvmvif->phy_ctxt->channel->band == NL80211_BAND_2GHZ ||
-                   !iwl_mvm_is_cdb_supported(mvm))
-                       binding_cmd.lmac_id = cpu_to_le32(IWL_LMAC_24G_INDEX);
-               else
-                       binding_cmd.lmac_id = cpu_to_le32(IWL_LMAC_5G_INDEX);
-       } else {
-               size = IWL_BINDING_CMD_SIZE_V1;
-       }
+
+       if (WARN_ON_ONCE(iwl_mvm_is_cdb_supported(mvm)))
+               return -EINVAL;
 
        /* add back the PHY */
        if (WARN_ON(!mvmvif->phy_ctxt))
@@ -497,7 +487,8 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 
        status = 0;
        ret = iwl_mvm_send_cmd_pdu_status(mvm, BINDING_CONTEXT_CMD,
-                                         size, &binding_cmd, &status);
+                                         IWL_BINDING_CMD_SIZE_V1, &binding_cmd,
+                                         &status);
        if (ret) {
                IWL_ERR(mvm, "Failed to add binding: %d\n", ret);
                return ret;