ath: fix WARN_ON with Polish (Poland) Contry code
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 7 Feb 2010 15:01:55 +0000 (16:01 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Feb 2010 21:51:02 +0000 (16:51 -0500)
commit641eabb0a3717020d1a93d3f91493ab0d826c910
tree324789bae511e3800046ac1b1e23105038443d42
parent349e6b7289f8a3d3d5d3b859e00b41f27d1211df
ath: fix WARN_ON with Polish (Poland) Contry code

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/regd.c