summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath.h
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-09-08 16:04:38 +0900
committerJohn W. Linville <linville@tuxdriver.com>2010-09-16 15:19:45 -0400
commit1bba5b7329e15555dab90071b24ca84d0afcc635 (patch)
treeb9a60505fb9f88bac588694be1fd9d5dc7836c61 /drivers/net/wireless/ath/ath.h
parent34a1305137f484ee1806df5a00b9d8ee8d4ef758 (diff)
downloadlinux-stable-1bba5b7329e15555dab90071b24ca84d0afcc635.tar.gz
linux-stable-1bba5b7329e15555dab90071b24ca84d0afcc635.tar.bz2
linux-stable-1bba5b7329e15555dab90071b24ca84d0afcc635.zip
ath: Copy key cache management functions from ath9k to ath
Copied the key cache management functions from ath9k (common.c and hw.c) to ath/key.c so we can use them from ath5k, later. Minor changes have been made: - renamed ath9k_* to ath_* - replaced ah->caps.keycache_size with common->keymax - removed ATH9K_IS_MIC_ENABLED since it is always true. - the AR_PCU_MIC_NEW_LOC_ENA flag is replaced with (splitmic == 0). Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath.h')
-rw-r--r--drivers/net/wireless/ath/ath.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index 057fdd7ddaf4..fb24f66373fd 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -80,6 +80,27 @@ enum ath_crypt_caps {
ATH_CRYPT_CAP_CIPHER_TKIP = BIT(5),
};
+struct ath_keyval {
+ u8 kv_type;
+ u8 kv_pad;
+ u16 kv_len;
+ u8 kv_val[16]; /* TK */
+ u8 kv_mic[8]; /* Michael MIC key */
+ u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
+ * supports both MIC keys in the same key cache entry;
+ * in that case, kv_mic is the RX key) */
+};
+
+enum ath_cipher {
+ ATH_CIPHER_WEP = 0,
+ ATH_CIPHER_AES_OCB = 1,
+ ATH_CIPHER_AES_CCM = 2,
+ ATH_CIPHER_CKIP = 3,
+ ATH_CIPHER_TKIP = 4,
+ ATH_CIPHER_CLR = 5,
+ ATH_CIPHER_MIC = 127
+};
+
/**
* struct ath_ops - Register read/write operations
*
@@ -142,5 +163,11 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,
gfp_t gfp_mask);
void ath_hw_setbssidmask(struct ath_common *common);
+void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key);
+int ath_key_config(struct ath_common *common,
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta,
+ struct ieee80211_key_conf *key);
+bool ath_hw_keyreset(struct ath_common *common, u16 entry);
#endif /* ATH_H */