aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-06-15 09:20:45 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-06-20 12:57:08 +0200
commitc71420db653aba30a234d1e4cf86dde376e604fa (patch)
tree1e29e5b76bc2b04a6a3e93f9b362f3380b60558b /net/mac80211/rx.c
parentwifi: mac80211: ethtool: use deflink for now (diff)
downloadlinux-dev-c71420db653aba30a234d1e4cf86dde376e604fa.tar.xz
linux-dev-c71420db653aba30a234d1e4cf86dde376e604fa.zip
wifi: mac80211: RCU-ify link STA pointers
We need to be able to access these in a race-free way under traffic while adding/removing them, so RCU-ify the pointers. This requires passing a link_sta to a lot of functions so we don't have to do the RCU handling everywhere. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 0b5c34d00c14..d017ad14d7db 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3391,11 +3391,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
if (chanwidth == IEEE80211_HT_CHANWIDTH_20MHZ)
max_bw = IEEE80211_STA_RX_BW_20;
else
- max_bw = ieee80211_sta_cap_rx_bw(rx->sta, 0);
+ max_bw = ieee80211_sta_cap_rx_bw(&rx->sta->deflink);
/* set cur_max_bandwidth and recalc sta bw */
rx->sta->deflink.cur_max_bandwidth = max_bw;
- new_bw = ieee80211_sta_cur_vht_bw(rx->sta, 0);
+ new_bw = ieee80211_sta_cur_vht_bw(&rx->sta->deflink);
if (rx->sta->sta.deflink.bandwidth == new_bw)
goto handled;
@@ -3403,7 +3403,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
rx->sta->sta.deflink.bandwidth = new_bw;
sband = rx->local->hw.wiphy->bands[status->band];
sta_opmode.bw =
- ieee80211_sta_rx_bw_to_chan_width(rx->sta, 0);
+ ieee80211_sta_rx_bw_to_chan_width(&rx->sta->deflink);
sta_opmode.changed = STA_OPMODE_MAX_BW_CHANGED;
rate_control_rate_update(local, sband, rx->sta, 0,