diff options
author | Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> | 2017-02-27 17:04:35 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-03-06 13:54:20 +0100 |
commit | 8976672736d6089ae011fda3482e30e4380276f8 (patch) | |
tree | 9504bcc8b250ed1cf266c9083cef2909771a1cca /net/wireless/reg.h | |
parent | 34373d12f3cbb74960a73431138ef619d857996f (diff) | |
download | linux-stable-8976672736d6089ae011fda3482e30e4380276f8.tar.gz linux-stable-8976672736d6089ae011fda3482e30e4380276f8.tar.bz2 linux-stable-8976672736d6089ae011fda3482e30e4380276f8.zip |
cfg80211: Share Channel DFS state across wiphys of same DFS domain
Sharing DFS channel state across multiple wiphys (radios) could
be useful with multiple radios on the system. When one radio
completes CAC and markes the channel available another radio
can use this information and start beaconing without really doing
CAC.
Whenever there is a state change in dfs channel associated to
a particular wiphy the the same state change is propagated to
other wiphys having the same DFS reg domain configuration.
Also when a new wiphy is created the dfs channel state of
other existing wiphys of same DFS domain is copied.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.h')
-rw-r--r-- | net/wireless/reg.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/wireless/reg.h b/net/wireless/reg.h index ff078f093989..ca7fedf2e7a1 100644 --- a/net/wireless/reg.h +++ b/net/wireless/reg.h @@ -157,4 +157,26 @@ bool regulatory_indoor_allowed(void); * Pre-CAC is allowed only in ETSI domain. */ bool regulatory_pre_cac_allowed(struct wiphy *wiphy); + +/** + * regulatory_propagate_dfs_state - Propagate DFS channel state to other wiphys + * @wiphy - wiphy on which radar is detected and the event will be propagated + * to other available wiphys having the same DFS domain + * @chandef - Channel definition of radar detected channel + * @dfs_state - DFS channel state to be set + * @event - Type of radar event which triggered this DFS state change + * + * This function should be called with rtnl lock held. + */ +void regulatory_propagate_dfs_state(struct wiphy *wiphy, + struct cfg80211_chan_def *chandef, + enum nl80211_dfs_state dfs_state, + enum nl80211_radar_event event); + +/** + * reg_dfs_domain_same - Checks if both wiphy have same DFS domain configured + * @wiphy1 - wiphy it's dfs_region to be checked against that of wiphy2 + * @wiphy2 - wiphy it's dfs_region to be checked against that of wiphy1 + */ +bool reg_dfs_domain_same(struct wiphy *wiphy1, struct wiphy *wiphy2); #endif /* __NET_WIRELESS_REG_H */ |