* [PATCH] ath: fix WARN_ON with Polish (Poland) Contry code
@ 2010-02-07 15:01 Christian Lamparter
0 siblings, 0 replies; only message in thread
From: Christian Lamparter @ 2010-02-07 15:01 UTC (permalink / raw)
To: linux-wireless; +Cc: Luis R. Rodriguez, linville
This patch fixes a WARN_ON which is triggered
by Poland's country code.
ath: EEPROM regdomain: 0x8268
ath: EEPROM indicates we should expect a country code
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x37
ath: Country alpha2 being used: PL
ath: Regpair used: 0x37
-----------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/regd.c:155 ath_regd_init+0x30b
Pid: 12661, comm: firmware/carl91 2.6.33-rc5-wl #18
Call Trace:
[<>] ? warn_slowpath_common+0x76/0x8c
[<>] ? ar9170_reg_notifier+0x0/0x2d [carl9170usb]
[<>] ? ath_regd_init+0x30b/0x377 [ath]
[<>] ? ar9170_register+0x3b3/0x3ca [carl9170usb]
[...]
---[ end trace ]---
Note: Poland is just an example. But it is very likely
that more country codes are affected.
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index 039ac49..04abd1f 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-07 15:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-07 15:01 [PATCH] ath: fix WARN_ON with Polish (Poland) Contry code Christian Lamparter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).