diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-06-15 10:20:45 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-06-20 13:57:08 +0300 |
commit | c71420db653aba30a234d1e4cf86dde376e604fa (patch) | |
tree | 1e29e5b76bc2b04a6a3e93f9b362f3380b60558b /net/mac80211/cfg.c | |
parent | ce6893e917862cae669af52a440d086f416c4cc6 (diff) | |
download | linux-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/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 12 |
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); } |