ath9k_hw: Set proper eeprom offset for AR9287 HTC devices
authorRajkumar Manoharan <rmanoharan@atheros.com>
Wed, 10 Nov 2010 12:21:26 +0000 (17:51 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:05 +0000 (13:32 -0800)
commit b5261cf4f3860bd772346a3e692683b6144dd44c upstream.

AR9287 based PCI & USB devices are differed in eeprom start offset.
So set proper the offset for HTC devices to read nvram correctly.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/eeprom_9287.c
drivers/net/wireless/ath/ath9k/reg.h

index dff2da777312bbb0e5b1c8902b370e79c41f75b4..7cb356e8a53145cbaa7ac87fd2c1c1a604f19b9e 100644 (file)
@@ -37,7 +37,7 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
        int addr, eep_start_loc;
        eep_data = (u16 *)eep;
 
-       if (ah->hw_version.devid == 0x7015)
+       if (AR9287_HTC_DEVID(ah))
                eep_start_loc = AR9287_HTC_EEP_START_LOC;
        else
                eep_start_loc = AR9287_EEP_START_LOC;
index a793a373eb59916f4c3030db86224680f05e4779..7b976a901cc0e8f4974e18c38fac934fd86d4077 100644 (file)
         ((_ah)->hw_version.devid == 0x7015) || \
         ((_ah)->hw_version.devid == 0x9018))
 
+#define AR9287_HTC_DEVID(_ah) \
+       (((_ah)->hw_version.devid == 0x7015) || \
+        ((_ah)->hw_version.devid == 0x1200))
+
 #define AR_RADIO_SREV_MAJOR                   0xf0
 #define AR_RAD5133_SREV_MAJOR                 0xc0
 #define AR_RAD2133_SREV_MAJOR                 0xd0