]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: mld: send tx power constraints before link activation
authorPagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Fri, 29 May 2026 05:57:06 +0000 (08:57 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Sat, 30 May 2026 20:54:42 +0000 (23:54 +0300)
TX power constraints must be sent to the firmware before link
activation. If not, the firmware will use default power values.

Fix this by moving the iwl_mld_send_ap_tx_power_constraint_cmd()
call from iwl_mld_start_ap_ibss() to iwl_mld_assign_vif_chanctx(),
before iwl_mld_activate_link() for AP interfaces. Also update
the guard in the function to allow it to run before link activation
for AP interfaces.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260529085453.06c94b01efd2.Id43bdfe5eb030061c23348779687ba71b5f58182@changeid
drivers/net/wireless/intel/iwlwifi/mld/ap.c
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
drivers/net/wireless/intel/iwlwifi/mld/power.c

index 5c59acc8c4c5a04053e66c51911bfcd8f8dfc738..6598d933333300ca9c708a70211335cf5da3e442 100644 (file)
@@ -9,7 +9,6 @@
 #include "ap.h"
 #include "hcmd.h"
 #include "tx.h"
-#include "power.h"
 #include "key.h"
 #include "phy.h"
 #include "iwl-utils.h"
@@ -273,9 +272,6 @@ int iwl_mld_start_ap_ibss(struct ieee80211_hw *hw,
        struct ieee80211_chanctx_conf *ctx;
        int ret;
 
-       if (vif->type == NL80211_IFTYPE_AP)
-               iwl_mld_send_ap_tx_power_constraint_cmd(mld, vif, link);
-
        ret = iwl_mld_update_beacon_template(mld, vif, link);
        if (ret)
                return ret;
index da6fd74715688f9743a26e226894369516a2a8d8..3c8daddc0bcb269519d8d012b4d8ead20d8d3128 100644 (file)
@@ -1150,6 +1150,13 @@ int iwl_mld_assign_vif_chanctx(struct ieee80211_hw *hw,
        if (iwl_mld_can_activate_link(mld, vif, link)) {
                iwl_mld_tlc_update_phy(mld, vif, link);
 
+               /* FW requires AP_TX_POWER_CONSTRAINTS_CMD before link
+                * activation for AP and after link activation for STA,
+                * for an unknown reason.
+                */
+               if (vif->type == NL80211_IFTYPE_AP)
+                       iwl_mld_send_ap_tx_power_constraint_cmd(mld, vif, link);
+
                ret = iwl_mld_activate_link(mld, link);
                if (ret)
                        goto err;
index 49b0d9f8f865d9ec080efe415d3abd904846a8f6..266fe16bb95df60c9af72d7708fbb8f5aef2f1e3 100644 (file)
@@ -366,7 +366,7 @@ iwl_mld_send_ap_tx_power_constraint_cmd(struct iwl_mld *mld,
 
        lockdep_assert_wiphy(mld->wiphy);
 
-       if (!mld_link->active)
+       if (!mld_link->active && vif->type != NL80211_IFTYPE_AP)
                return;
 
        if (link->chanreq.oper.chan->band != NL80211_BAND_6GHZ)