aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/common.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-08-13 00:58:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-24 13:59:45 -0400
commitf82b4bde17aeb6c2f8bf0540ee44811de4651cf6 (patch)
tree00ea645c48534e8e66261d432a862d5a5762c266 /drivers/net/wireless/ath/ath9k/common.c
parentd77bf3eb5160c1356d7d7620b7d2fbe28e5e6257 (diff)
ath9k: Move ath9k_init_crypto to common
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/common.c26
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}
170EXPORT_SYMBOL(ath9k_cmn_update_txpow); 170EXPORT_SYMBOL(ath9k_cmn_update_txpow);
171 171
172void 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}
196EXPORT_SYMBOL(ath9k_cmn_init_crypto);
197
172static int __init ath9k_cmn_init(void) 198static int __init ath9k_cmn_init(void)
173{ 199{
174 return 0; 200 return 0;