OSDN Git Service

iwlwifi: mvm: use proper CDB check in PHY context modify
authorJohannes Berg <johannes.berg@intel.com>
Fri, 26 May 2017 11:11:44 +0000 (13:11 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 29 Jun 2017 10:26:25 +0000 (13:26 +0300)
When the firmware supports CDB, PHY contexts cannot be modified to
change their band, but need to be added/remove instead. Instead of
relying on iwl_mvm_has_new_tx_api(), check the right FW capa flag
IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT and remove the comment.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c

index d59efe8..fb9eaf0 100644 (file)
@@ -255,8 +255,8 @@ int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,
 
        lockdep_assert_held(&mvm->mutex);
 
-       /* In CDB mode we cannot modify PHY context between bands so... */
-       if (iwl_mvm_has_new_tx_api(mvm) &&
+       if (fw_has_capa(&mvm->fw->ucode_capa,
+                       IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT) &&
            ctxt->channel->band != chandef->chan->band) {
                int ret;