Commit 512414b0bed0d376ac4d5ec1dd6f0b1a3551febc

Authored by Luis R. Rodriguez
Committed by John W. Linville
1 parent 19deffbeba

ath5k: enable EEPROM checksum check

Without this we have no gaurantee of the integrity of the
EEPROM and are likely to encounter a lot of bogus bug reports
due to actual issues on the EEPROM. With the EEPROM checksum
check in place we can easily rule those issues out.

If you run patch during a revert *you* have a card with a busted
EEPROM and only older kernel will support that concoction. This
patch is a trade off between not accepitng bogus EEPROMs and
avoiding bogus bug reports allowing developers to focus instead
on real concrete issues.

If stable keeps bogus bug reports because of a possibly busted EEPROM
feel free to apply this there too.

Tested on an AR5414

Cc: stable@kernel.org
Cc: jirislaby@gmail.com
Cc: akpm@linux-foundation.org
Cc: rjw@sisk.pl
Cc: me@bobcopeland.com
Cc: david.quan@atheros.com
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

drivers/net/wireless/ath/ath5k/eeprom.c
... ... @@ -97,6 +97,7 @@
97 97 struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom;
98 98 int ret;
99 99 u16 val;
  100 + u32 cksum, offset;
100 101  
101 102 /*
102 103 * Read values from EEPROM and store them in the capability structure
... ... @@ -111,7 +112,6 @@
111 112 if (ah->ah_ee_version < AR5K_EEPROM_VERSION_3_0)
112 113 return 0;
113 114  
114   -#ifdef notyet
115 115 /*
116 116 * Validate the checksum of the EEPROM date. There are some
117 117 * devices with invalid EEPROMs.
... ... @@ -124,7 +124,6 @@
124 124 ATH5K_ERR(ah->ah_sc, "Invalid EEPROM checksum 0x%04x\n", cksum);
125 125 return -EIO;
126 126 }
127   -#endif
128 127  
129 128 AR5K_EEPROM_READ_HDR(AR5K_EEPROM_ANT_GAIN(ah->ah_ee_version),
130 129 ee_ant_gain);