ath9k_hw: validate and fix broken eeprom chainmask settings
authorFelix Fietkau <nbd@openwrt.org>
Tue, 19 Jul 2011 06:46:44 +0000 (08:46 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 21 Jul 2011 18:52:04 +0000 (14:52 -0400)
commit6054069a03f77ffa686e2dfd5f07cff8ee40b72d
tree9ffb02904f2108423c784a5f67834ee8562ad5eb
parenta0490936007bacf5bf6f4fb27788550c89c2c70d
ath9k_hw: validate and fix broken eeprom chainmask settings

Some devices (e.g. Ubiquiti AirRouter) ship with broken EEPROM chainmask
data, which breaks the initial calibration after a hardware reset.
To fix this, mask the eeprom chainmask with the chainmask of the chip,
and use the chip chainmask if the result is zero.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c