aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@qca.qualcomm.com>2011-10-11 13:59:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-21 16:20:41 -0500
commit8b60b07805d557542160d852874fa6a1b969184e (patch)
tree74b96b63c62cf7cef9684c19bda8f8d51ceabe0d /net/wireless/reg.c
parent4713e962c5d98901890c446843ae4e0a9d37b7b3 (diff)
cfg80211: process regulatory DFS region for countries
The wireless-regdb now has support for mapping a country to one DFS region. CRDA sends this to us now so process it so we can provide that hint to drivers. This will later be used by code for processing DFS in a way that meets the criteria for the DFS region the country belongs to. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 2520a1b7e7db..69141ed1f6df 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1946,6 +1946,42 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
1946 } 1946 }
1947} 1947}
1948 1948
1949bool reg_supported_dfs_region(u8 dfs_region)
1950{
1951 switch (dfs_region) {
1952 case NL80211_DFS_UNSET:
1953 case NL80211_DFS_FCC:
1954 case NL80211_DFS_ETSI:
1955 case NL80211_DFS_JP:
1956 return true;
1957 default:
1958 REG_DBG_PRINT("Ignoring uknown DFS master region: %d\n",
1959 dfs_region);
1960 return false;
1961 }
1962}
1963
1964static void print_dfs_region(u8 dfs_region)
1965{
1966 if (!dfs_region)
1967 return;
1968
1969 switch (dfs_region) {
1970 case NL80211_DFS_FCC:
1971 pr_info(" DFS Master region FCC");
1972 break;
1973 case NL80211_DFS_ETSI:
1974 pr_info(" DFS Master region ETSI");
1975 break;
1976 case NL80211_DFS_JP:
1977 pr_info(" DFS Master region JP");
1978 break;
1979 default:
1980 pr_info(" DFS Master region Uknown");
1981 break;
1982 }
1983}
1984
1949static void print_regdomain(const struct ieee80211_regdomain *rd) 1985static void print_regdomain(const struct ieee80211_regdomain *rd)
1950{ 1986{
1951 1987
@@ -1973,6 +2009,7 @@ static void print_regdomain(const struct ieee80211_regdomain *rd)
1973 pr_info("Regulatory domain changed to country: %c%c\n", 2009 pr_info("Regulatory domain changed to country: %c%c\n",
1974 rd->alpha2[0], rd->alpha2[1]); 2010 rd->alpha2[0], rd->alpha2[1]);
1975 } 2011 }
2012 print_dfs_region(rd->dfs_region);
1976 print_rd_rules(rd); 2013 print_rd_rules(rd);
1977} 2014}
1978 2015