diff options
author | Janusz Dziedzic <janusz.dziedzic@tieto.com> | 2013-11-05 14:48:48 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 20:49:43 +0100 |
commit | fe7c3a1f20a419d86d3f90316d8efc2d04f3f0ed (patch) | |
tree | 9b058ec8da62e5818478265cdf8d1ad576f6a79b /net/wireless/core.h | |
parent | 40d1ba63ff4ae1a73b0042202b54b688ada469be (diff) | |
download | linux-fe7c3a1f20a419d86d3f90316d8efc2d04f3f0ed.tar.gz linux-fe7c3a1f20a419d86d3f90316d8efc2d04f3f0ed.tar.bz2 linux-fe7c3a1f20a419d86d3f90316d8efc2d04f3f0ed.zip |
cfg80211: DFS check chandef usable before CAC
Check chandef we get in CAC request is usable for CAC.
All channels have to be DFS channels. Allow DFS_USABLE
and DFS_AVAILABLE channels mix. At least one channel
has to be DFS_USABLE (require CAC).
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Reviewed-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index eb0f7a3a25a9..2888867ee7c5 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -382,6 +382,19 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, enum cfg80211_chan_mode chanmode, u8 radar_detect); +/** + * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable + * @wiphy: the wiphy to validate against + * @chandef: the channel definition to check + * + * Checks if chandef is usable and we can/need start CAC on such channel. + * + * Return: Return true if all channels available and at least + * one channel require CAC (NL80211_DFS_USABLE) + */ +bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy, + const struct cfg80211_chan_def *chandef); + void cfg80211_set_dfs_state(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef, enum nl80211_dfs_state dfs_state); |