aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath5k/base.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 6f368e8cdf17..4bf3678529b8 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -60,6 +60,9 @@
60#include "debug.h" 60#include "debug.h"
61 61
62static int ath5k_calinterval = 10; /* Calibrate PHY every 10 secs (TODO: Fixme) */ 62static int ath5k_calinterval = 10; /* Calibrate PHY every 10 secs (TODO: Fixme) */
63static int modparam_nohwcrypt;
64module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
65MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
63 66
64 67
65/******************\ 68/******************\
@@ -2975,11 +2978,12 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2975 struct ath5k_softc *sc = hw->priv; 2978 struct ath5k_softc *sc = hw->priv;
2976 int ret = 0; 2979 int ret = 0;
2977 2980
2981 if (modparam_nohwcrypt)
2982 return -EOPNOTSUPP;
2983
2978 switch (key->alg) { 2984 switch (key->alg) {
2979 case ALG_WEP: 2985 case ALG_WEP:
2980 /* XXX: fix hardware encryption, its not working. For now 2986 break;
2981 * allow software encryption */
2982 /* break; */
2983 case ALG_TKIP: 2987 case ALG_TKIP:
2984 case ALG_CCMP: 2988 case ALG_CCMP:
2985 return -EOPNOTSUPP; 2989 return -EOPNOTSUPP;
@@ -2999,6 +3003,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2999 } 3003 }
3000 __set_bit(key->keyidx, sc->keymap); 3004 __set_bit(key->keyidx, sc->keymap);
3001 key->hw_key_idx = key->keyidx; 3005 key->hw_key_idx = key->keyidx;
3006 key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
3002 break; 3007 break;
3003 case DISABLE_KEY: 3008 case DISABLE_KEY:
3004 ath5k_hw_reset_key(sc->ah, key->keyidx); 3009 ath5k_hw_reset_key(sc->ah, key->keyidx);