diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-05-19 23:27:22 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-06-10 16:12:57 +0200 |
commit | 8cbf0c2ab6dfd61066a6ce49d9d37d3d25b2d05f (patch) | |
tree | b1d61a002133d3cddfff3681d2505f54e9759121 /net/mac80211/key.h | |
parent | wifi: mac80211: remove cipher scheme support (diff) | |
download | linux-8cbf0c2ab6dfd61066a6ce49d9d37d3d25b2d05f.tar.xz linux-8cbf0c2ab6dfd61066a6ce49d9d37d3d25b2d05f.zip |
wifi: mac80211: refactor some key code
There's some pretty close code here, with the exception
of RCU dereference vs. protected dereference. Refactor
this to just return a pointer and then do the deref in
the caller later.
Change-Id: Ide5315e2792da6ac66eaf852293306a3ac71ced9
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to '')
-rw-r--r-- | net/mac80211/key.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/key.h b/net/mac80211/key.h index b3fb41c0c77f..e994dcea1ce3 100644 --- a/net/mac80211/key.h +++ b/net/mac80211/key.h @@ -163,6 +163,8 @@ void ieee80211_reenable_keys(struct ieee80211_sub_if_data *sdata); #define key_mtx_dereference(local, ref) \ rcu_dereference_protected(ref, lockdep_is_held(&((local)->key_mtx))) +#define rcu_dereference_check_key_mtx(local, ref) \ + rcu_dereference_check(ref, lockdep_is_held(&((local)->key_mtx))) void ieee80211_delayed_tailroom_dec(struct work_struct *wk); |