ath9k: fix AR9160 xpaBiasLvlFreq endianness handling
authorAdrian Chadd <adrian.chadd@gmail.com>
Sat, 23 Apr 2011 04:48:53 +0000 (12:48 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 26 Apr 2011 19:50:28 +0000 (15:50 -0400)
The xpaBiasLvlFreq parameter array is made up of 16 bit words which
aren't byte-swapped like the other 16-bit eeprom parameters are.
It's only used by the AR9160.

Signed-off-by: Adrian Chadd <adrian@freebsd.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/eeprom_def.c

index 995949ddd63e4d707aa79c5b0c1734dc9731276e..c031854b569fe0a5c3c145724ec3373c802b68e2 100644 (file)
@@ -231,6 +231,10 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
                                integer = swab32(pModal->antCtrlChain[i]);
                                pModal->antCtrlChain[i] = integer;
                        }
+                       for (i = 0; i < 3; i++) {
+                               word = swab16(pModal->xpaBiasLvlFreq[i]);
+                               pModal->xpaBiasLvlFreq[i] = word;
+                       }
 
                        for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
                                word = swab16(pModal->spurChans[i].spurChan);