]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211: use chandef in TDLS chanctx handling
authorJohannes Berg <johannes.berg@intel.com>
Wed, 15 Apr 2026 12:42:03 +0000 (14:42 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 28 Apr 2026 07:27:45 +0000 (09:27 +0200)
When getting the station's bandwidth for TDLS chanctx
updates, pass the chandef so that the band can be used
in _ieee80211_sta_cap_rx_bw(), instead of this using
ieee80211_sta_cap_rx_bw() which looks it up from the
link.

This removes the last user of ieee80211_sta_cap_rx_bw().

Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260415144514.cc7c1590e953.Id2381d2b5a9d1ded170501976240d4fca23ee35c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tdls.c

index 44bba7c3e6039e05397ad2c03c24771849ff5f96..90a122dc274f03307fe1e6441491e7fe9798f9c6 100644 (file)
@@ -1334,7 +1334,8 @@ static void iee80211_tdls_recalc_chanctx(struct ieee80211_sub_if_data *sdata,
                        enum ieee80211_sta_rx_bandwidth bw;
 
                        bw = ieee80211_chan_width_to_rx_bw(conf->def.width);
-                       bw = min(bw, ieee80211_sta_cap_rx_bw(&sta->deflink));
+                       bw = min(bw, _ieee80211_sta_cap_rx_bw(&sta->deflink,
+                                                             &conf->def));
                        if (bw != sta->sta.deflink.bandwidth) {
                                sta->sta.deflink.bandwidth = bw;
                                rate_control_rate_update(local, sband,