mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 07:43:57 +07:00
iwlwifi: mvm: don't send identical PHY_CTXT_CMD
When we have an AP which supports HT and a single HT station is connected, we change the min_width from NL80211_CHAN_WIDTH_20_NOHT to NL80211_CHAN_WIDTH_20. This of course has no implication on the channel width but still sends a command to the firmware. Remember the last width that was sent and refrain from sending unnecessary commands to the firmware. Sending a PHY_CTXT_CMD to the firmware has a cost since it recalculates the presence on the medium and because of that it closes the transmit queues for a short while. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
a2ff48af65
commit
7a20bcceed
@ -3406,10 +3406,24 @@ static void iwl_mvm_change_chanctx(struct ieee80211_hw *hw,
|
||||
return;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
/* we are only changing the min_width, may be a noop */
|
||||
if (changed == IEEE80211_CHANCTX_CHANGE_MIN_WIDTH) {
|
||||
if (phy_ctxt->width == ctx->min_def.width)
|
||||
goto out_unlock;
|
||||
|
||||
/* we are just toggling between 20_NOHT and 20 */
|
||||
if (phy_ctxt->width <= NL80211_CHAN_WIDTH_20 &&
|
||||
ctx->min_def.width <= NL80211_CHAN_WIDTH_20)
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
iwl_mvm_bt_coex_vif_change(mvm);
|
||||
iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, &ctx->min_def,
|
||||
ctx->rx_chains_static,
|
||||
ctx->rx_chains_dynamic);
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&mvm->mutex);
|
||||
}
|
||||
|
||||
|
@ -147,6 +147,8 @@ struct iwl_mvm_phy_ctxt {
|
||||
u16 color;
|
||||
u32 ref;
|
||||
|
||||
enum nl80211_chan_width width;
|
||||
|
||||
/*
|
||||
* TODO: This should probably be removed. Currently here only for rate
|
||||
* scaling algorithm
|
||||
|
@ -272,6 +272,7 @@ int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,
|
||||
}
|
||||
|
||||
ctxt->channel = chandef->chan;
|
||||
ctxt->width = chandef->width;
|
||||
return iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef,
|
||||
chains_static, chains_dynamic,
|
||||
action, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user