Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121784
b: refs/heads/master
c: 9ad9a26
h: refs/heads/master
v: v3
  • Loading branch information
Bob Copeland authored and John W. Linville committed Nov 10, 2008
1 parent 23b831f commit f51d940
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a941ecb5178cb8c94190f17a42f35a772cbc5c6
refs/heads/master: 9ad9a26e7b7b6671a9aefbb1edb2e8a9ed50ee8d
11 changes: 8 additions & 3 deletions trunk/drivers/net/wireless/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
#include "debug.h"

static int ath5k_calinterval = 10; /* Calibrate PHY every 10 secs (TODO: Fixme) */
static int modparam_nohwcrypt;
module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");


/******************\
Expand Down Expand Up @@ -2975,11 +2978,12 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
struct ath5k_softc *sc = hw->priv;
int ret = 0;

if (modparam_nohwcrypt)
return -EOPNOTSUPP;

switch (key->alg) {
case ALG_WEP:
/* XXX: fix hardware encryption, its not working. For now
* allow software encryption */
/* break; */
break;
case ALG_TKIP:
case ALG_CCMP:
return -EOPNOTSUPP;
Expand All @@ -2999,6 +3003,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
}
__set_bit(key->keyidx, sc->keymap);
key->hw_key_idx = key->keyidx;
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
break;
case DISABLE_KEY:
ath5k_hw_reset_key(sc->ah, key->keyidx);
Expand Down

0 comments on commit f51d940

Please sign in to comment.