diff options
| author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2025-02-12 08:22:57 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2025-02-26 15:48:47 +0100 |
| commit | ebba23e0779834e68a200b7968975274cbe260ef (patch) | |
| tree | b4dd78d60131088efc00be749d7e6f3017d98b1a /include/net | |
| parent | d00c0c4105e5ab8a6a13ed23d701cceb285761fa (diff) | |
wifi: mac80211: add ieee80211_iter_chan_contexts_mtx
Add a chanctx iterator that can be called from a wiphy-locked context.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250212082137.d85eef3024de.Icda0616416c5fd4b2cbf892bdab2476f26e644ec@changeid
[fix kernel-doc]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/mac80211.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 22d32419e8a0..c498f685d01f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -6672,6 +6672,31 @@ void ieee80211_iter_chan_contexts_atomic( void *iter_data); /** + * ieee80211_iter_chan_contexts_mtx - iterate channel contexts + * @hw: pointer obtained from ieee80211_alloc_hw(). + * @iter: iterator function + * @iter_data: data passed to iterator function + * + * Iterate all active channel contexts. This function can only be used while + * holding the wiphy mutex. + * + * The iterator will not find a context that's being added (during + * the driver callback to add it) but will find it while it's being + * removed. + * + * Note that during hardware restart, all contexts that existed + * before the restart are considered already present so will be + * found while iterating, whether they've been re-added already + * or not. + */ +void ieee80211_iter_chan_contexts_mtx( + struct ieee80211_hw *hw, + void (*iter)(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *chanctx_conf, + void *data), + void *iter_data); + +/** * ieee80211_ap_probereq_get - retrieve a Probe Request template * @hw: pointer obtained from ieee80211_alloc_hw(). * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
