diff options
author | Bob Copeland <me@bobcopeland.com> | 2009-08-24 23:00:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-28 14:40:44 -0400 |
commit | 1c81874078dc96b8158ce7b0dab54afe43c8d03e (patch) | |
tree | 78b48c231673c7ae785fb93b705ee352f94d7aa8 /drivers/net/wireless | |
parent | 1c5256bb168faca5ce32a9c9511c8389f9fed31c (diff) |
ath5k: add hardware CCMP encyption support
Recent ath5k hardware is capable of doing CCMP acceleration.
Enable it for the cards that support it.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
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 | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/attach.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 3 |
3 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index 862762cea54c..cdc79cd134c2 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
@@ -1037,6 +1037,7 @@ struct ath5k_hw { | |||
1037 | bool ah_turbo; | 1037 | bool ah_turbo; |
1038 | bool ah_calibration; | 1038 | bool ah_calibration; |
1039 | bool ah_single_chip; | 1039 | bool ah_single_chip; |
1040 | bool ah_aes_support; | ||
1040 | bool ah_combined_mic; | 1041 | bool ah_combined_mic; |
1041 | 1042 | ||
1042 | enum ath5k_version ah_version; | 1043 | enum ath5k_version ah_version; |
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index 65d438b59f64..109ab7ba3041 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c | |||
@@ -106,6 +106,7 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) | |||
106 | { | 106 | { |
107 | struct ath5k_hw *ah; | 107 | struct ath5k_hw *ah; |
108 | struct pci_dev *pdev = sc->pdev; | 108 | struct pci_dev *pdev = sc->pdev; |
109 | struct ath5k_eeprom_info *ee; | ||
109 | int ret; | 110 | int ret; |
110 | u32 srev; | 111 | u32 srev; |
111 | 112 | ||
@@ -315,6 +316,15 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version) | |||
315 | goto err_free; | 316 | goto err_free; |
316 | } | 317 | } |
317 | 318 | ||
319 | /* Crypto settings */ | ||
320 | ee = &ah->ah_capabilities.cap_eeprom; | ||
321 | ah->ah_aes_support = | ||
322 | (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 && | ||
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 | |||
318 | if (srev >= AR5K_SREV_AR2414) { | 328 | if (srev >= AR5K_SREV_AR2414) { |
319 | ah->ah_combined_mic = true; | 329 | ah->ah_combined_mic = true; |
320 | AR5K_REG_ENABLE_BITS(ah, AR5K_MISC_MODE, | 330 | AR5K_REG_ENABLE_BITS(ah, AR5K_MISC_MODE, |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 10bf01547068..94d46fd94ff6 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -3022,6 +3022,9 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3022 | case ALG_TKIP: | 3022 | case ALG_TKIP: |
3023 | break; | 3023 | break; |
3024 | case ALG_CCMP: | 3024 | case ALG_CCMP: |
3025 | if (sc->ah->ah_aes_support) | ||
3026 | break; | ||
3027 | |||
3025 | return -EOPNOTSUPP; | 3028 | return -EOPNOTSUPP; |
3026 | default: | 3029 | default: |
3027 | WARN_ON(1); | 3030 | WARN_ON(1); |