summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorJouni Malinen2009-01-08 12:32:13 +0100
committerJohn W. Linville2009-01-29 22:00:10 +0100
commit0ced0e176ab854df15bd307188decba9c06650e5 (patch)
tree328c2e71b43c3ede5fa470e83c76de45f360eafb /drivers/net/wireless/ath9k/main.c
parentath9k: Fix set_key error codes (diff)
downloadkernel-qcow2-linux-0ced0e176ab854df15bd307188decba9c06650e5.tar.gz
kernel-qcow2-linux-0ced0e176ab854df15bd307188decba9c06650e5.tar.xz
kernel-qcow2-linux-0ced0e176ab854df15bd307188decba9c06650e5.zip
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/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index fc4439f97506..72f2956c4c54 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -1557,6 +1557,9 @@ static int ath_attach(u16 devid, struct ath_softc *sc)
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_AMPDU_AGGREGATION;
+ if (AR_SREV_9160_10_OR_LATER(sc->sc_ah))
+ hw->flags |= IEEE80211_HW_MFP_CAPABLE;
+
hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_STATION) |
@@ -2348,6 +2351,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
if (key->alg == ALG_TKIP)
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
+ if (sc->sc_ah->sw_mgmt_crypto && key->alg == ALG_CCMP)
+ key->flags |= IEEE80211_KEY_FLAG_SW_MGMT;
ret = 0;
}
break;