summaryrefslogtreecommitdiff
path: root/net/mac80211/eht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-06-15 10:20:45 +0300
committerJohannes Berg <johannes.berg@intel.com>2022-06-20 13:57:08 +0300
commitc71420db653aba30a234d1e4cf86dde376e604fa (patch)
tree1e29e5b76bc2b04a6a3e93f9b362f3380b60558b /net/mac80211/eht.c
parentce6893e917862cae669af52a440d086f416c4cc6 (diff)
downloadlinux-c71420db653aba30a234d1e4cf86dde376e604fa.tar.xz
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/eht.c')
-rw-r--r--net/mac80211/eht.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/net/mac80211/eht.c b/net/mac80211/eht.c
index de762a803c38..31e20a342f21 100644
--- a/net/mac80211/eht.c
+++ b/net/mac80211/eht.c
@@ -12,11 +12,10 @@ ieee80211_eht_cap_ie_to_sta_eht_cap(struct ieee80211_sub_if_data *sdata,
struct ieee80211_supported_band *sband,
const u8 *he_cap_ie, u8 he_cap_len,
const struct ieee80211_eht_cap_elem *eht_cap_ie_elem,
- u8 eht_cap_len, struct sta_info *sta,
- unsigned int link_id)
+ u8 eht_cap_len,
+ struct link_sta_info *link_sta)
{
- struct ieee80211_sta_eht_cap *eht_cap =
- &sta->sta.link[link_id]->eht_cap;
+ struct ieee80211_sta_eht_cap *eht_cap = &link_sta->pub->eht_cap;
struct ieee80211_he_cap_elem *he_cap_ie_elem = (void *)he_cap_ie;
u8 eht_ppe_size = 0;
u8 mcs_nss_size;
@@ -73,8 +72,6 @@ ieee80211_eht_cap_ie_to_sta_eht_cap(struct ieee80211_sub_if_data *sdata,
eht_cap->has_eht = true;
- sta->link[link_id]->cur_max_bandwidth =
- ieee80211_sta_cap_rx_bw(sta, link_id);
- sta->sta.link[link_id]->bandwidth =
- ieee80211_sta_cur_vht_bw(sta, link_id);
+ link_sta->cur_max_bandwidth = ieee80211_sta_cap_rx_bw(link_sta);
+ link_sta->pub->bandwidth = ieee80211_sta_cur_vht_bw(link_sta);
}