aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorGravatar Johannes Berg <johannes.berg@intel.com> 2022-06-15 09:20:45 +0200
committerGravatar Johannes Berg <johannes.berg@intel.com> 2022-06-20 12:57:08 +0200
commitc71420db653aba30a234d1e4cf86dde376e604fa (patch)
tree1e29e5b76bc2b04a6a3e93f9b362f3380b60558b /net/mac80211/cfg.c
parentwifi: mac80211: ethtool: use deflink for now (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/cfg.c')
-rw-r--r--net/mac80211/cfg.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 009f1723c990..b387f5f4fef0 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1771,19 +1771,21 @@ static int sta_apply_parameters(struct ieee80211_local *local,
if (params->ht_capa)
ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
- params->ht_capa, sta, 0);
+ params->ht_capa,
+ &sta->deflink);
/* VHT can override some HT caps such as the A-MSDU max length */
if (params->vht_capa)
ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
- params->vht_capa, sta, 0);
+ params->vht_capa,
+ &sta->deflink);
if (params->he_capa)
ieee80211_he_cap_ie_to_sta_he_cap(sdata, sband,
(void *)params->he_capa,
params->he_capa_len,
(void *)params->he_6ghz_capa,
- sta, 0);
+ &sta->deflink);
if (params->eht_capa)
ieee80211_eht_cap_ie_to_sta_eht_cap(sdata, sband,
@@ -1791,13 +1793,13 @@ static int sta_apply_parameters(struct ieee80211_local *local,
params->he_capa_len,
params->eht_capa,
params->eht_capa_len,
- sta, 0);
+ &sta->deflink);
if (params->opmode_notif_used) {
/* returned value is only needed for rc update, but the
* rc isn't initialized here yet, so ignore it
*/
- __ieee80211_vht_handle_opmode(sdata, sta, 0,
+ __ieee80211_vht_handle_opmode(sdata, &sta->deflink,
params->opmode_notif,
sband->band);
}