diff options
author | Janusz Dziedzic <janusz.dziedzic@tieto.com> | 2013-11-05 08:48:48 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 14:49:43 -0500 |
commit | fe7c3a1f20a419d86d3f90316d8efc2d04f3f0ed (patch) | |
tree | 9b058ec8da62e5818478265cdf8d1ad576f6a79b /net/wireless/core.h | |
parent | 40d1ba63ff4ae1a73b0042202b54b688ada469be (diff) |
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, | |||
382 | enum cfg80211_chan_mode chanmode, | 382 | enum cfg80211_chan_mode chanmode, |
383 | u8 radar_detect); | 383 | u8 radar_detect); |
384 | 384 | ||
385 | /** | ||
386 | * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable | ||
387 | * @wiphy: the wiphy to validate against | ||
388 | * @chandef: the channel definition to check | ||
389 | * | ||
390 | * Checks if chandef is usable and we can/need start CAC on such channel. | ||
391 | * | ||
392 | * Return: Return true if all channels available and at least | ||
393 | * one channel require CAC (NL80211_DFS_USABLE) | ||
394 | */ | ||
395 | bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy, | ||
396 | const struct cfg80211_chan_def *chandef); | ||
397 | |||
385 | void cfg80211_set_dfs_state(struct wiphy *wiphy, | 398 | void cfg80211_set_dfs_state(struct wiphy *wiphy, |
386 | const struct cfg80211_chan_def *chandef, | 399 | const struct cfg80211_chan_def *chandef, |
387 | enum nl80211_dfs_state dfs_state); | 400 | enum nl80211_dfs_state dfs_state); |