ath9k_hw: fix endian issues with CTLs on AR9003
authorFelix Fietkau <nbd@openwrt.org>
Wed, 1 Dec 2010 18:07:46 +0000 (19:07 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 21:58:21 +0000 (13:58 -0800)
commit1be6baf90fee9d7c947af2a087faeb95924b99f6
tree512a36d20161e7de23f1cc55f689372c865945ad
parent31f0fa5ae67535db3716b2efd5718c8595370dd4
ath9k_hw: fix endian issues with CTLs on AR9003

commit e702ba18f25887c76d26c8a85cc1706463c62e9a upstream.

Parsing data using bitfields is messy, because it makes endian handling
much harder. AR9002 and earlier got it right, AR9003 got it wrong.
This might lead to either using too high or too low tx power values,
depending on frequency and eeprom settings.
Fix it by getting rid of the CTL related bitfields entirely and use
masks instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
drivers/net/wireless/ath/ath9k/eeprom.c
drivers/net/wireless/ath/ath9k/eeprom.h