ath9k: fix a crash with WEP in ad-hoc mode
SVN-Revision: 22046
This commit is contained in:
parent
86b4b5e1e9
commit
8a5671711b
1 changed files with 13 additions and 0 deletions
13
package/mac80211/patches/550-ath9k_fix_wep_adhoc_crash.patch
Normal file
13
package/mac80211/patches/550-ath9k_fix_wep_adhoc_crash.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/common.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
||||
@@ -319,6 +319,10 @@ int ath9k_cmn_key_config(struct ath_comm
|
||||
idx = ath_reserve_key_cache_slot(common, key->alg);
|
||||
break;
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
+ if (!sta) {
|
||||
+ idx = key->keyidx;
|
||||
+ break;
|
||||
+ }
|
||||
memcpy(gmac, sta->addr, ETH_ALEN);
|
||||
gmac[0] |= 0x01;
|
||||
mac = gmac;
|
Loading…
Reference in a new issue