diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/common.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c index fa6bd2d189e5..dc705a224952 100644 --- a/drivers/net/wireless/ath/ath9k/common.c +++ b/drivers/net/wireless/ath/ath9k/common.c | |||
| @@ -169,6 +169,32 @@ void ath9k_cmn_update_txpow(struct ath_hw *ah, u16 cur_txpow, | |||
| 169 | } | 169 | } |
| 170 | EXPORT_SYMBOL(ath9k_cmn_update_txpow); | 170 | EXPORT_SYMBOL(ath9k_cmn_update_txpow); |
| 171 | 171 | ||
| 172 | void ath9k_cmn_init_crypto(struct ath_hw *ah) | ||
| 173 | { | ||
| 174 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 175 | int i = 0; | ||
| 176 | |||
| 177 | /* Get the hardware key cache size. */ | ||
| 178 | common->keymax = AR_KEYTABLE_SIZE; | ||
| 179 | |||
| 180 | /* | ||
| 181 | * Check whether the separate key cache entries | ||
| 182 | * are required to handle both tx+rx MIC keys. | ||
| 183 | * With split mic keys the number of stations is limited | ||
| 184 | * to 27 otherwise 59. | ||
| 185 | */ | ||
| 186 | if (ah->misc_mode & AR_PCU_MIC_NEW_LOC_ENA) | ||
| 187 | common->crypt_caps |= ATH_CRYPT_CAP_MIC_COMBINED; | ||
| 188 | |||
| 189 | /* | ||
| 190 | * Reset the key cache since some parts do not | ||
| 191 | * reset the contents on initial power up. | ||
| 192 | */ | ||
| 193 | for (i = 0; i < common->keymax; i++) | ||
| 194 | ath_hw_keyreset(common, (u16) i); | ||
| 195 | } | ||
| 196 | EXPORT_SYMBOL(ath9k_cmn_init_crypto); | ||
| 197 | |||
| 172 | static int __init ath9k_cmn_init(void) | 198 | static int __init ath9k_cmn_init(void) |
| 173 | { | 199 | { |
| 174 | return 0; | 200 | return 0; |
