Skip to content

Commit cbe84e9

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: really send iwl_txpower_constraints_cmd
iwl_mvm_send_ap_tx_power_constraint_cmd is a no-op if the link is not active (we need to know the band etc.) However, for the station case it will be called just before we set the link to active (by calling iwl_mvm_link_changed with the LINK_CONTEXT_MODIFY_ACTIVE bit set in the 'changed' flags and active = true), so it will end up doing nothing. Fix this by calling iwl_mvm_send_ap_tx_power_constraint_cmd before iwl_mvm_link_changed. Fixes: 6b82f4e ("wifi: iwlwifi: mvm: handle TPE advertised by AP") Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241010140328.5c235fccd3f1.I2d40dea21e5547eba458565edcb4c354d094d82a@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 3ed0929 commit cbe84e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,6 @@ __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm,
350350
rcu_read_unlock();
351351
}
352352

353-
if (vif->type == NL80211_IFTYPE_STATION)
354-
iwl_mvm_send_ap_tx_power_constraint_cmd(mvm, vif,
355-
link_conf,
356-
false);
357-
358353
/* then activate */
359354
ret = iwl_mvm_link_changed(mvm, vif, link_conf,
360355
LINK_CONTEXT_MODIFY_ACTIVE |
@@ -363,6 +358,11 @@ __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm,
363358
if (ret)
364359
goto out;
365360

361+
if (vif->type == NL80211_IFTYPE_STATION)
362+
iwl_mvm_send_ap_tx_power_constraint_cmd(mvm, vif,
363+
link_conf,
364+
false);
365+
366366
/*
367367
* Power state must be updated before quotas,
368368
* otherwise fw will complain.

0 commit comments

Comments
 (0)