]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/wireless/reg.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
[karo-tx-linux.git] / net / wireless / reg.c
index 6acba9d18cc873cb97b6c190d526985704371876..0e67016ce78f23525a0e8fdba5458a8ec826a0f7 100644 (file)
@@ -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);
 }