summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.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/ibss.c
parentce6893e917862cae669af52a440d086f416c4cc6 (diff)
downloadlinux-c71420db653aba30a234d1e4cf86dde376e604fa.tar.gz
linux-c71420db653aba30a234d1e4cf86dde376e604fa.tar.bz2
linux-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/ibss.c')
-rw-r--r--net/mac80211/ibss.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 65a3808dc92a..65b6255c6747 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1051,7 +1051,7 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
memcpy(&htcap_ie, elems->ht_cap_elem, sizeof(htcap_ie));
rates_updated |= ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
&htcap_ie,
- sta, 0);
+ &sta->deflink);
if (elems->vht_operation && elems->vht_cap_elem &&
sdata->u.ibss.chandef.width != NL80211_CHAN_WIDTH_20 &&
@@ -1068,7 +1068,8 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
&chandef);
memcpy(&cap_ie, elems->vht_cap_elem, sizeof(cap_ie));
ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
- &cap_ie, sta, 0);
+ &cap_ie,
+ &sta->deflink);
if (memcmp(&cap, &sta->sta.deflink.vht_cap, sizeof(cap)))
rates_updated |= true;
}