diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-02-24 06:42:01 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:30 -0500 |
commit | b3bd89ce956c220fe52a003103f14af48f695fda (patch) | |
tree | 0a97e7e0b8bd1ae89b8f4cc96e81927fb879cdfe /drivers/net/wireless/ath9k/main.c | |
parent | 508827ff0ac3981d420edac64a70de7f4e304d38 (diff) |
ath9k: Add module parameter to disable hardware crypto
nohwcrypt=1 module parameter can now be used to disable hardware
crypto in ath9k. While the hardware acceleration handles most cases,
it may be useful to be able to force mac80211 software implementation
to be used for some tests, e.g., with virtual interface combinations
that may not yet be supported in the key cache configuration. In
addition, this allows management frame protection to be tested with
older hardware revisions.
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.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index f5f5739a7a4b..659ed07f28e3 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -26,6 +26,10 @@ MODULE_DESCRIPTION("Support for Atheros 802.11n wireless LAN cards."); | |||
26 | MODULE_SUPPORTED_DEVICE("Atheros 802.11n WLAN cards"); | 26 | MODULE_SUPPORTED_DEVICE("Atheros 802.11n WLAN cards"); |
27 | MODULE_LICENSE("Dual BSD/GPL"); | 27 | MODULE_LICENSE("Dual BSD/GPL"); |
28 | 28 | ||
29 | static int modparam_nohwcrypt; | ||
30 | module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444); | ||
31 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); | ||
32 | |||
29 | /* We use the hw_value as an index into our private channel structure */ | 33 | /* We use the hw_value as an index into our private channel structure */ |
30 | 34 | ||
31 | #define CHAN2G(_freq, _idx) { \ | 35 | #define CHAN2G(_freq, _idx) { \ |
@@ -1587,7 +1591,7 @@ int ath_attach(u16 devid, struct ath_softc *sc) | |||
1587 | IEEE80211_HW_SUPPORTS_PS | | 1591 | IEEE80211_HW_SUPPORTS_PS | |
1588 | IEEE80211_HW_PS_NULLFUNC_STACK; | 1592 | IEEE80211_HW_PS_NULLFUNC_STACK; |
1589 | 1593 | ||
1590 | if (AR_SREV_9160_10_OR_LATER(sc->sc_ah)) | 1594 | if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt) |
1591 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; | 1595 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; |
1592 | 1596 | ||
1593 | hw->wiphy->interface_modes = | 1597 | hw->wiphy->interface_modes = |
@@ -2468,6 +2472,9 @@ static int ath9k_set_key(struct ieee80211_hw *hw, | |||
2468 | struct ath_softc *sc = hw->priv; | 2472 | struct ath_softc *sc = hw->priv; |
2469 | int ret = 0; | 2473 | int ret = 0; |
2470 | 2474 | ||
2475 | if (modparam_nohwcrypt) | ||
2476 | return -ENOSPC; | ||
2477 | |||
2471 | mutex_lock(&sc->mutex); | 2478 | mutex_lock(&sc->mutex); |
2472 | ath9k_ps_wakeup(sc); | 2479 | ath9k_ps_wakeup(sc); |
2473 | DPRINTF(sc, ATH_DBG_KEYCACHE, "Set HW Key\n"); | 2480 | DPRINTF(sc, ATH_DBG_KEYCACHE, "Set HW Key\n"); |