diff options
| author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2026-05-04 10:20:47 +0300 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-05-05 13:10:15 +0300 |
| commit | 42c9de58d990337a8848671591252f71d0db18c8 (patch) | |
| tree | 25f9d94e23ae0a45e840bb29b4e9af85acf35d0c /include | |
| parent | 03c41203ee5a833a9d7a7630be190830cede29d8 (diff) | |
| download | linux-42c9de58d990337a8848671591252f71d0db18c8.tar.xz | |
wifi: mac80211: add NAN channel evacuation support
A NAN channel can be evacuated, i.e. detached from its chanctx, if all
chanctxs are used by NAN and a chanctx is needed for something else.
For example if the STA interface needs to perform a channel switch.
Implement the evacuation: detach the NAN channel from its chanctx, remove
all the peer NAN channels that were using this chanctx, and update the
driver.
Internally, the NAN channel evacuation will be triggered in the scenario
described above, and API is provided for the driver to also trigger it.
The driver/device is assumed to publish a ULW to notify the peers about
the fact that we won't be present on this NAN channel anymore.
Also export this as an API for the drivers: if a driver has other
resources per channel, it might want to trigger channel evacuation in
order to free up such internal resources for other usages.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260504101829.1e1dc40d2f3e.I003fe84dc6373bb9ad55abd7824b9fc21c51203f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/mac80211.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 0d1b1d726b9c..d909bc1b29ff 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -7906,6 +7906,21 @@ void ieee80211_nan_cluster_joined(struct ieee80211_vif *vif, gfp_t gfp); /** + * ieee80211_nan_try_evacuate - try to evacuate a NAN channel + * + * This function tries to evacuate a NAN channel that is using the given + * channel context, to free up channel context resources. + * + * @hw: pointer as obtained from ieee80211_alloc_hw() + * @conf: the channel context configuration to try to evacuate. If %NULL, + * the NAN channel that has the fewest slots scheduled will be evacuated. + * + * Return: %true if a channel was evacuated, %false otherwise + */ +bool ieee80211_nan_try_evacuate(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *conf); + +/** * ieee80211_calc_rx_airtime - calculate estimated transmission airtime for RX. * * This function calculates the estimated airtime usage of a frame based on the |
