aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/hw.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-08 06:32:13 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:10 -0500
commit0ced0e176ab854df15bd307188decba9c06650e5 (patch)
tree328c2e71b43c3ede5fa470e83c76de45f360eafb /drivers/net/wireless/ath9k/hw.c
parentca470b29027f093d8d63abc0fa401cf4f72e427b (diff)
ath9k: Setup MFP options for CCMP
Configure hardware CCMP for management frame protection and use software crypto when needed. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath9k/hw.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
index 3c026e6b2453..e9a3951996e2 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -2265,6 +2265,23 @@ int ath9k_hw_reset(struct ath_hal *ah, struct ath9k_channel *chan,
2265 if (r) 2265 if (r)
2266 return r; 2266 return r;
2267 2267
2268 /* Setup MFP options for CCMP */
2269 if (AR_SREV_9280_20_OR_LATER(ah)) {
2270 /* Mask Retry(b11), PwrMgt(b12), MoreData(b13) to 0 in mgmt
2271 * frames when constructing CCMP AAD. */
2272 REG_RMW_FIELD(ah, AR_AES_MUTE_MASK1, AR_AES_MUTE_MASK1_FC_MGMT,
2273 0xc7ff);
2274 ah->sw_mgmt_crypto = false;
2275 } else if (AR_SREV_9160_10_OR_LATER(ah)) {
2276 /* Disable hardware crypto for management frames */
2277 REG_CLR_BIT(ah, AR_PCU_MISC_MODE2,
2278 AR_PCU_MISC_MODE2_MGMT_CRYPTO_ENABLE);
2279 REG_SET_BIT(ah, AR_PCU_MISC_MODE2,
2280 AR_PCU_MISC_MODE2_NO_CRYPTO_FOR_NON_DATA_PKT);
2281 ah->sw_mgmt_crypto = true;
2282 } else
2283 ah->sw_mgmt_crypto = true;
2284
2268 if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan)) 2285 if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan))
2269 ath9k_hw_set_delta_slope(ah, chan); 2286 ath9k_hw_set_delta_slope(ah, chan);
2270 2287