1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-16 22:50:04 +03:00

ath9k: fix a crash with WEP in ad-hoc mode

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22046 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2010-07-02 12:46:18 +00:00
parent e11397b6d4
commit 6493866f86

View 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;