mac80211: update to latest version, fix tx gain patch
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 560-ath9k_ar9003_otp_fallback.patch
1 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
3 @@ -3260,10 +3260,20 @@ static int ar9300_eeprom_restore_interna
4 int it;
5 u16 checksum, mchecksum;
6 struct ath_common *common = ath9k_hw_common(ah);
7 + struct ar9300_eeprom *eep;
8 eeprom_read_op read;
9
10 - if (ath9k_hw_use_flash(ah))
11 - return ar9300_eeprom_restore_flash(ah, mptr, mdata_size);
12 + if (ath9k_hw_use_flash(ah)) {
13 + u8 txrx;
14 +
15 + ar9300_eeprom_restore_flash(ah, mptr, mdata_size);
16 +
17 + /* check if eeprom contains valid data */
18 + eep = (struct ar9300_eeprom *) mptr;
19 + txrx = eep->baseEepHeader.txrxMask;
20 + if (txrx != 0 && txrx != 0xff)
21 + return 0;
22 + }
23
24 word = kzalloc(2048, GFP_KERNEL);
25 if (!word)