mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 10:51:27 +00:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 3c54fc6a49cdeb2d128afd406c576398eeaefefc Mon Sep 17 00:00:00 2001
|
|
From: Ramasamy Kaliappan <quic_rkaliapp@quicinc.com>
|
|
Date: Mon, 3 Jul 2023 16:16:40 +0530
|
|
Subject: [PATCH 09/16] wifi: mac80211: add RCU _check() link access variants
|
|
|
|
We might sometimes need to use RCU and locking in the same code
|
|
path, so add the two variants link_conf_dereference_check() and
|
|
link_sta_dereference_check().
|
|
|
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
---
|
|
include/net/mac80211.h | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
|
|
index 7055759..dae0fa0 100644
|
|
--- a/include/net/mac80211.h
|
|
+++ b/include/net/mac80211.h
|
|
@@ -2422,6 +2422,14 @@ static inline bool lockdep_sta_mutex_held(struct ieee80211_sta *pubsta)
|
|
rcu_dereference_protected((sta)->link[link_id], \
|
|
lockdep_sta_mutex_held(sta))
|
|
|
|
+#define link_conf_dereference_check(vif, link_id) \
|
|
+ rcu_dereference_check((vif)->link_conf[link_id], \
|
|
+ lockdep_vif_mutex_held(vif))
|
|
+
|
|
+#define link_sta_dereference_check(sta, link_id) \
|
|
+ rcu_dereference_check((sta)->link[link_id], \
|
|
+ lockdep_sta_mutex_held(sta))
|
|
+
|
|
#define for_each_sta_active_link(vif, sta, link_sta, link_id) \
|
|
for (link_id = 0; link_id < ARRAY_SIZE((sta)->link); link_id++) \
|
|
if ((!(vif)->active_links || \
|
|
--
|
|
2.17.1
|
|
|