Commit ca5efbe2 authored by Bob Copeland's avatar Bob Copeland Committed by John W. Linville

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: default avatarBob Copeland <me@bobcopeland.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 00fa928d
...@@ -306,6 +306,7 @@ struct ath5k_srev_name { ...@@ -306,6 +306,7 @@ struct ath5k_srev_name {
#define AR5K_SREV_AR5311B 0x30 /* Spirit */ #define AR5K_SREV_AR5311B 0x30 /* Spirit */
#define AR5K_SREV_AR5211 0x40 /* Oahu */ #define AR5K_SREV_AR5211 0x40 /* Oahu */
#define AR5K_SREV_AR5212 0x50 /* Venice */ #define AR5K_SREV_AR5212 0x50 /* Venice */
#define AR5K_SREV_AR5212_V4 0x54 /* ??? */
#define AR5K_SREV_AR5213 0x55 /* ??? */ #define AR5K_SREV_AR5213 0x55 /* ??? */
#define AR5K_SREV_AR5213A 0x59 /* Hainan */ #define AR5K_SREV_AR5213A 0x59 /* Hainan */
#define AR5K_SREV_AR2413 0x78 /* Griffin lite */ #define AR5K_SREV_AR2413 0x78 /* Griffin lite */
......
...@@ -318,12 +318,9 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) ...@@ -318,12 +318,9 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
/* Crypto settings */ /* Crypto settings */
ee = &ah->ah_capabilities.cap_eeprom; ee = &ah->ah_capabilities.cap_eeprom;
ah->ah_aes_support = ah->ah_aes_support = srev >= AR5K_SREV_AR5212_V4 &&
(ee->ee_version >= AR5K_EEPROM_VERSION_5_0 && (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 &&
!AR5K_EEPROM_AES_DIS(ee->ee_misc5) && !AR5K_EEPROM_AES_DIS(ee->ee_misc5));
(ah->ah_mac_version > (AR5K_SREV_AR5212 >> 4) ||
(ah->ah_mac_version == (AR5K_SREV_AR5212 >> 4) &&
ah->ah_mac_revision >= (AR5K_SREV_AR5211 >> 4))));
if (srev >= AR5K_SREV_AR2414) { if (srev >= AR5K_SREV_AR2414) {
ah->ah_combined_mic = true; ah->ah_combined_mic = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment