diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-06-17 23:36:37 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 12:43:14 +0300 |
commit | d8675a63518c6148827838058feb7f18403faed1 (patch) | |
tree | fbdee52aa9f31da2b33ad5804cc4ea76a9a82a24 /include | |
parent | 3d1cc7cdf2e848181398837fe158bf0850d29ee6 (diff) | |
download | linux-d8675a63518c6148827838058feb7f18403faed1.tar.xz |
wifi: mac80211: RCU-ify link/link_conf pointers
Since links can be added and removed dynamically, we need to
somehow protect the sdata->link[] and vif->link_conf[] array
pointers from disappearing when accessing them without locks.
RCU-ify the pointers to achieve this, which requires quite a
bit of rework.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/mac80211.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 1c005a30313f..044ed417b06f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1789,7 +1789,7 @@ struct ieee80211_vif { enum nl80211_iftype type; struct ieee80211_vif_cfg cfg; struct ieee80211_bss_conf bss_conf; - struct ieee80211_bss_conf *link_conf[IEEE80211_MLD_MAX_NUM_LINKS]; + struct ieee80211_bss_conf __rcu *link_conf[IEEE80211_MLD_MAX_NUM_LINKS]; u16 valid_links; u8 addr[ETH_ALEN] __aligned(2); bool p2p; @@ -4082,7 +4082,9 @@ struct ieee80211_ops { u64 changed); void (*link_info_changed)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - unsigned int link_id, u64 changed); + struct ieee80211_bss_conf *info, + unsigned int link_id, + u64 changed); int (*start_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, unsigned int link_id); |