aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/attach.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-08-24 23:00:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:40:44 -0400
commit1c81874078dc96b8158ce7b0dab54afe43c8d03e (patch)
tree78b48c231673c7ae785fb93b705ee352f94d7aa8 /drivers/net/wireless/ath/ath5k/attach.c
parentath5k: use the skb->cb directly for RX status (diff)
downloadlinux-dev-1c81874078dc96b8158ce7b0dab54afe43c8d03e.tar.xz
linux-dev-1c81874078dc96b8158ce7b0dab54afe43c8d03e.zip
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/ath/ath5k/attach.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/attach.c10
1 files changed, 10 insertions, 0 deletions
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)
{
struct ath5k_hw *ah;
struct pci_dev *pdev = sc->pdev;
+ struct ath5k_eeprom_info *ee;
int ret;
u32 srev;
@@ -315,6 +316,15 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
goto err_free;
}
+ /* Crypto settings */
+ ee = &ah->ah_capabilities.cap_eeprom;
+ ah->ah_aes_support =
+ (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 &&
+ !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) {
ah->ah_combined_mic = true;
AR5K_REG_ENABLE_BITS(ah, AR5K_MISC_MODE,