diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-28 20:11:18 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-28 20:11:18 +0100 |
commit | 39338b56382ac640614851a80e0bd71994cc664d (patch) | |
tree | c319e23181be286b1d320c29f755a81e5ef61172 /net/wireless/reg.c | |
parent | net/irda: convert drivers/net/irda/* to use module_platform_driver() (diff) | |
parent | rtlwifi: squash warning in _usb_read_sync (diff) | |
download | linux-39338b56382ac640614851a80e0bd71994cc664d.tar.xz linux-39338b56382ac640614851a80e0bd71994cc664d.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 77e926738014..76b35df39623 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1123,6 +1123,8 @@ static void wiphy_update_regulatory(struct wiphy *wiphy, if (ignore_reg_update(wiphy, initiator)) return; + last_request->dfs_region = cfg80211_regdomain->dfs_region; + for (band = 0; band < IEEE80211_NUM_BANDS; band++) { if (wiphy->bands[band]) handle_band(wiphy, band, initiator); @@ -1948,6 +1950,42 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd) } } +bool reg_supported_dfs_region(u8 dfs_region) +{ + switch (dfs_region) { + case NL80211_DFS_UNSET: + case NL80211_DFS_FCC: + case NL80211_DFS_ETSI: + case NL80211_DFS_JP: + return true; + default: + REG_DBG_PRINT("Ignoring uknown DFS master region: %d\n", + dfs_region); + return false; + } +} + +static void print_dfs_region(u8 dfs_region) +{ + if (!dfs_region) + return; + + switch (dfs_region) { + case NL80211_DFS_FCC: + pr_info(" DFS Master region FCC"); + break; + case NL80211_DFS_ETSI: + pr_info(" DFS Master region ETSI"); + break; + case NL80211_DFS_JP: + pr_info(" DFS Master region JP"); + break; + default: + pr_info(" DFS Master region Uknown"); + break; + } +} + static void print_regdomain(const struct ieee80211_regdomain *rd) { @@ -1975,6 +2013,7 @@ static void print_regdomain(const struct ieee80211_regdomain *rd) pr_info("Regulatory domain changed to country: %c%c\n", rd->alpha2[0], rd->alpha2[1]); } + print_dfs_region(rd->dfs_region); print_rd_rules(rd); } |