aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2014-02-23 02:13:01 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 04:55:34 -0400
commit174e0cd28af0fe3c6c634c3e4d9e042c683bd7f7 (patch)
tree047a3e0b02e6e5bb41324cd4571ef6251cd5fa79 /net/wireless/reg.c
parent94fc661f68c881eaa3a5904c12a2269372aa94d9 (diff)
cfg80211: Enable GO operation on additional channels
Allow GO operation on a channel marked with IEEE80211_CHAN_GO_CONCURRENT iff there is an active station interface that is associated to an AP operating on the same channel in the 2 GHz band or the same UNII band (in the 5 GHz band). This relaxation is not allowed if the channel is marked with IEEE80211_CHAN_RADAR. Note that this is a permissive approach to the FCC definitions, that require a clear assessment that the device operating the AP is an authorized master, i.e., with radar detection and DFS capabilities. It is assumed that such restrictions are enforced by user space. Furthermore, it is assumed, that if the conditions that allowed for the operation of the GO on such a channel change, i.e., the station interface disconnected from the AP, it is the responsibility of user space to evacuate the GO from the channel. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 2b8c1000c1be..58f48b8f42ae 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2616,6 +2616,35 @@ static void reg_timeout_work(struct work_struct *work)
2616 rtnl_unlock(); 2616 rtnl_unlock();
2617} 2617}
2618 2618
2619/*
2620 * See http://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii, for
2621 * UNII band definitions
2622 */
2623int cfg80211_get_unii(int freq)
2624{
2625 /* UNII-1 */
2626 if (freq >= 5150 && freq <= 5250)
2627 return 0;
2628
2629 /* UNII-2A */
2630 if (freq > 5250 && freq <= 5350)
2631 return 1;
2632
2633 /* UNII-2B */
2634 if (freq > 5350 && freq <= 5470)
2635 return 2;
2636
2637 /* UNII-2C */
2638 if (freq > 5470 && freq <= 5725)
2639 return 3;
2640
2641 /* UNII-3 */
2642 if (freq > 5725 && freq <= 5825)
2643 return 4;
2644
2645 return -EINVAL;
2646}
2647
2619int __init regulatory_init(void) 2648int __init regulatory_init(void)
2620{ 2649{
2621 int err = 0; 2650 int err = 0;