diff options
author | Bruno Randolf <br1@einfach.org> | 2010-09-08 03:04:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-16 15:19:45 -0400 |
commit | 781f3136ff4cdd2b33149f2295fefa21f77b1c56 (patch) | |
tree | 2752a3294c6a01ca9ade43cbdbf5388635d2dd09 /drivers/net/wireless | |
parent | 117675d06ad2dd16fcf466669ba9700a8d589ea3 (diff) |
ath5k: Use common crypt capabilities flags
Replace ah_aes_support and ah_combined_mic with common ath_crypt_caps
ATH_CRYPT_CAP_CIPHER_AESCCM and ATH_CRYPT_CAP_MIC_COMBINED.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ath5k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/attach.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index 932ed5613355..50209aed0ed2 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
@@ -1028,8 +1028,6 @@ struct ath5k_hw { | |||
1028 | bool ah_turbo; | 1028 | bool ah_turbo; |
1029 | bool ah_calibration; | 1029 | bool ah_calibration; |
1030 | bool ah_single_chip; | 1030 | bool ah_single_chip; |
1031 | bool ah_aes_support; | ||
1032 | bool ah_combined_mic; | ||
1033 | 1031 | ||
1034 | enum ath5k_version ah_version; | 1032 | enum ath5k_version ah_version; |
1035 | enum ath5k_radio ah_radio; | 1033 | enum ath5k_radio ah_radio; |
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index eb125d69fb78..a0e08201c939 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c | |||
@@ -317,12 +317,14 @@ int ath5k_hw_attach(struct ath5k_softc *sc) | |||
317 | common->keymax = (sc->ah->ah_version == AR5K_AR5210 ? | 317 | common->keymax = (sc->ah->ah_version == AR5K_AR5210 ? |
318 | AR5K_KEYTABLE_SIZE_5210 : AR5K_KEYTABLE_SIZE_5211); | 318 | AR5K_KEYTABLE_SIZE_5210 : AR5K_KEYTABLE_SIZE_5211); |
319 | 319 | ||
320 | ah->ah_aes_support = srev >= AR5K_SREV_AR5212_V4 && | 320 | if (srev >= AR5K_SREV_AR5212_V4 && |
321 | (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 && | 321 | (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 && |
322 | !AR5K_EEPROM_AES_DIS(ee->ee_misc5)); | 322 | !AR5K_EEPROM_AES_DIS(ee->ee_misc5))) |
323 | common->crypt_caps |= ATH_CRYPT_CAP_CIPHER_AESCCM | | ||
324 | ATH_CRYPT_CAP_MIC_AESCCM; | ||
323 | 325 | ||
324 | if (srev >= AR5K_SREV_AR2414) { | 326 | if (srev >= AR5K_SREV_AR2414) { |
325 | ah->ah_combined_mic = true; | 327 | common->crypt_caps |= ATH_CRYPT_CAP_MIC_COMBINED; |
326 | AR5K_REG_ENABLE_BITS(ah, AR5K_MISC_MODE, | 328 | AR5K_REG_ENABLE_BITS(ah, AR5K_MISC_MODE, |
327 | AR5K_MISC_MODE_COMBINED_MIC); | 329 | AR5K_MISC_MODE_COMBINED_MIC); |
328 | } | 330 | } |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 7933646583a9..0709bb091b2f 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -3294,7 +3294,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3294 | case WLAN_CIPHER_SUITE_TKIP: | 3294 | case WLAN_CIPHER_SUITE_TKIP: |
3295 | break; | 3295 | break; |
3296 | case WLAN_CIPHER_SUITE_CCMP: | 3296 | case WLAN_CIPHER_SUITE_CCMP: |
3297 | if (sc->ah->ah_aes_support) | 3297 | if (common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM) |
3298 | break; | 3298 | break; |
3299 | return -EOPNOTSUPP; | 3299 | return -EOPNOTSUPP; |
3300 | default: | 3300 | default: |