aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-08-27 15:17:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:40:54 -0400
commitca5efbe243dde7d269b6bbae7feaa5e4740db36e (patch)
tree87ab013eaf84eab5ae35467c75cec2a88ff3f985 /drivers/net/wireless/ath
parent00fa928df428521793866ff6832569d99be7f3e3 (diff)
ath5k: clarify srev comparison for CCMP check
As Pavel Roskin noted, the check for mac version as copied from legacy_hal made no sense. This replaces it with the equivalent and makes up a suitable #define for the mac version legacy_hal checked. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h1
-rw-r--r--drivers/net/wireless/ath/ath5k/attach.c7
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index cdc79cd134c2..1275ba0990b3 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -306,6 +306,7 @@ struct ath5k_srev_name {
306#define AR5K_SREV_AR5311B 0x30 /* Spirit */ 306#define AR5K_SREV_AR5311B 0x30 /* Spirit */
307#define AR5K_SREV_AR5211 0x40 /* Oahu */ 307#define AR5K_SREV_AR5211 0x40 /* Oahu */
308#define AR5K_SREV_AR5212 0x50 /* Venice */ 308#define AR5K_SREV_AR5212 0x50 /* Venice */
309#define AR5K_SREV_AR5212_V4 0x54 /* ??? */
309#define AR5K_SREV_AR5213 0x55 /* ??? */ 310#define AR5K_SREV_AR5213 0x55 /* ??? */
310#define AR5K_SREV_AR5213A 0x59 /* Hainan */ 311#define AR5K_SREV_AR5213A 0x59 /* Hainan */
311#define AR5K_SREV_AR2413 0x78 /* Griffin lite */ 312#define AR5K_SREV_AR2413 0x78 /* Griffin lite */
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
index 109ab7ba3041..4819f39da704 100644
--- a/drivers/net/wireless/ath/ath5k/attach.c
+++ b/drivers/net/wireless/ath/ath5k/attach.c
@@ -318,12 +318,9 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
318 318
319 /* Crypto settings */ 319 /* Crypto settings */
320 ee = &ah->ah_capabilities.cap_eeprom; 320 ee = &ah->ah_capabilities.cap_eeprom;
321 ah->ah_aes_support = 321 ah->ah_aes_support = srev >= AR5K_SREV_AR5212_V4 &&
322 (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 && 322 (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 &&
323 !AR5K_EEPROM_AES_DIS(ee->ee_misc5) && 323 !AR5K_EEPROM_AES_DIS(ee->ee_misc5));
324 (ah->ah_mac_version > (AR5K_SREV_AR5212 >> 4) ||
325 (ah->ah_mac_version == (AR5K_SREV_AR5212 >> 4) &&
326 ah->ah_mac_revision >= (AR5K_SREV_AR5211 >> 4))));
327 324
328 if (srev >= AR5K_SREV_AR2414) { 325 if (srev >= AR5K_SREV_AR2414) {
329 ah->ah_combined_mic = true; 326 ah->ah_combined_mic = true;