wifi: mac80211: __ieee80211_recalc_txpower receives a link
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 7 Oct 2024 12:00:51 +0000 (15:00 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Oct 2024 14:43:20 +0000 (16:43 +0200)
Handle the tx power per-link. Don't change the behavior for now. Just
change the signature of the function.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241007144851.3c9cd0731f5b.I6ebfd9d5084f3602b55c55e2669881fd92471c2f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/mlme.c

index 94d9ffcbe1f8e95e2da95e0497605523f3fb65a5..45987add530f1662467aae6fbc87094cd11bb28e 100644 (file)
@@ -2033,7 +2033,7 @@ void ieee80211_sdata_stop(struct ieee80211_sub_if_data *sdata);
 int ieee80211_add_virtual_monitor(struct ieee80211_local *local);
 void ieee80211_del_virtual_monitor(struct ieee80211_local *local);
 
-bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata);
+bool __ieee80211_recalc_txpower(struct ieee80211_link_data *link);
 void ieee80211_recalc_txpower(struct ieee80211_link_data *link,
                              bool update_bss);
 void ieee80211_recalc_offload(struct ieee80211_local *local);
index e4a8ed10273623dffe784717809e2dfcc09da5f0..138ba30e23ba52c6720b44c25694fe8bb97d39c7 100644 (file)
@@ -44,8 +44,9 @@
 
 static void ieee80211_iface_work(struct wiphy *wiphy, struct wiphy_work *work);
 
-bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
+bool __ieee80211_recalc_txpower(struct ieee80211_link_data *link)
 {
+       struct ieee80211_sub_if_data *sdata = link->sdata;
        struct ieee80211_chanctx_conf *chanctx_conf;
        int power;
 
@@ -77,7 +78,7 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
 void ieee80211_recalc_txpower(struct ieee80211_link_data *link,
                              bool update_bss)
 {
-       if (__ieee80211_recalc_txpower(link->sdata) ||
+       if (__ieee80211_recalc_txpower(link) ||
            (update_bss && ieee80211_sdata_running(link->sdata)))
                ieee80211_link_info_change_notify(link->sdata, link,
                                                  BSS_CHANGED_TXPOWER);
index 9b0a0091f93c751340548ef253ad7947c10d702a..f8fe711e102811d31c43aef17b102cb978022014 100644 (file)
@@ -2872,7 +2872,7 @@ static u64 ieee80211_handle_pwr_constr(struct ieee80211_link_data *link,
        }
 
        link->ap_power_level = new_ap_level;
-       if (__ieee80211_recalc_txpower(sdata))
+       if (__ieee80211_recalc_txpower(link))
                return BSS_CHANGED_TXPOWER;
        return 0;
 }