add the new ath9k driver (loads successfully on an AR9160 card, but still seems to...
[openwrt-10.03/.git] / package / ath9k / patches / 130-eeprom.patch
1 Fix a return code check for ath9k_hw_nvram_read, this function returns
2 AH_TRUE when the call succeeded
3
4 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
5
6 --- a/drivers/net/wireless/ath9k/hw.c
7 +++ b/drivers/net/wireless/ath9k/hw.c
8 @@ -803,7 +803,7 @@
9                 u_int16_t magic, magic2;
10                 int addr;
11  
12 -               if (ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET,
13 +               if (!ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET,
14                                         &magic)) {
15                         HDPRINTF(ah, HAL_DBG_EEPROM,
16                                  "%s: Reading Magic # failed\n", __func__);