ath5k: fix the EEPROM check for hw AES crypto support
authorFelix Fietkau <nbd@openwrt.org>
Wed, 13 Apr 2011 19:56:45 +0000 (21:56 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 14 Apr 2011 19:35:09 +0000 (15:35 -0400)
EEPROM version 5.0 adds a new field for disabling AES support, having
an older version means that AES is present. This patch fixes hw AES
crypto support on AR5312 boards, which have an older EEPROM version.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/attach.c

index bc82405604884dadfb293c60817b4f2a93d3a40b..326d7c84c912ebb879f9250530ac3fd7caa35c6c 100644 (file)
@@ -318,7 +318,7 @@ int ath5k_hw_init(struct ath5k_softc *sc)
                          AR5K_KEYTABLE_SIZE_5210 : AR5K_KEYTABLE_SIZE_5211);
 
        if (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)))
                common->crypt_caps |= ATH_CRYPT_CAP_CIPHER_AESCCM;