}
};
+static inline bool is_wwr_sku(u16 regd)
+{
+ return ((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) ||
+ (regd == WORLD);
+}
+
static u16 ath9k_regd_get_eepromRD(struct ath_hw *ah)
{
return ah->regulatory.current_rd & ~WORLDWIDE_ROAMING_FLAG;
bool ath9k_is_world_regd(struct ath_hw *ah)
{
- return isWwrSKU(ah);
+ return is_wwr_sku(ath9k_regd_get_eepromRD(ah));
}
const struct ieee80211_regdomain *ath9k_default_world_regdomain(void)
u32 ctl = NO_CTL;
if (!ah->regulatory.regpair ||
- (ah->regulatory.country_code == CTRY_DEFAULT && isWwrSKU(ah))) {
+ (ah->regulatory.country_code == CTRY_DEFAULT &&
+ is_wwr_sku(ath9k_regd_get_eepromRD(ah)))) {
if (IS_CHAN_B(chan))
ctl = SD_NO_CTL | CTL_11B;
else if (IS_CHAN_G(chan))
#define COUNTRY_ERD_FLAG 0x8000
#define WORLDWIDE_ROAMING_FLAG 0x4000
-#define isWwrSKU(_ah) \
- (((ath9k_regd_get_eepromRD((_ah)) & WORLD_SKU_MASK) == \
- WORLD_SKU_PREFIX) || \
- (ath9k_regd_get_eepromRD(_ah) == WORLD))
-
#define MULTI_DOMAIN_MASK 0xFF00
#define WORLD_SKU_MASK 0x00F0