]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/wireless/ath/regd.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[net-next-2.6.git] / drivers / net / wireless / ath / regd.c
index 039ac490465cd3727de566303719df7996a4afca..24d59883d94408cfc1d6bac2c4591776a841dcef 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/slab.h>
 #include <net/cfg80211.h>
 #include <net/mac80211.h>
 #include "regd.h"
@@ -51,6 +50,7 @@
 
 #define ATH9K_5GHZ_ALL         ATH9K_5GHZ_5150_5350, \
                                ATH9K_5GHZ_5470_5850
+
 /* This one skips what we call "mid band" */
 #define ATH9K_5GHZ_NO_MIDBAND  ATH9K_5GHZ_5150_5350, \
                                ATH9K_5GHZ_5725_5850
@@ -110,8 +110,9 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A = {
 
 static inline bool is_wwr_sku(u16 regd)
 {
-       return ((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) ||
-               (regd == WORLD);
+       return ((regd & COUNTRY_ERD_FLAG) != COUNTRY_ERD_FLAG) &&
+               (((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) ||
+               (regd == WORLD));
 }
 
 static u16 ath_regd_get_eepromRD(struct ath_regulatory *reg)
@@ -360,7 +361,7 @@ EXPORT_SYMBOL(ath_reg_notifier_apply);
 
 static bool ath_regd_is_eeprom_valid(struct ath_regulatory *reg)
 {
-        u16 rd = ath_regd_get_eepromRD(reg);
+       u16 rd = ath_regd_get_eepromRD(reg);
        int i;
 
        if (rd & COUNTRY_ERD_FLAG) {