Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134847
b: refs/heads/master
c: d0f48f9
h: refs/heads/master
i:
  134845: 09c53e9
  134843: 522b5c8
  134839: d7a6057
  134831: 109e8c5
  134815: e856ded
  134783: a3274fc
v: v3
  • Loading branch information
Bob Copeland authored and John W. Linville committed Feb 27, 2009
1 parent cc0378c commit 1693a40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e775aaf07a72eafdb352a984d820612dd76eab8c
refs/heads/master: d0f48f9d1fa9ad01effdf280cda944c6eb518f59
11 changes: 9 additions & 2 deletions trunk/drivers/net/wireless/ath9k/regd.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ static const struct ieee80211_regdomain ath9k_world_regdom_67_68_6A = {
}
};

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;
Expand All @@ -118,7 +124,7 @@ u16 ath9k_regd_get_rd(struct ath_hw *ah)

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)
Expand Down Expand Up @@ -463,7 +469,8 @@ u32 ath9k_regd_get_ctl(struct ath_hw *ah, struct ath9k_channel *chan)
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))
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/net/wireless/ath9k/regd.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
#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
Expand Down

0 comments on commit 1693a40

Please sign in to comment.