mac80211: backport ath9k wep fix from r22046
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 2 Jul 2010 12:47:25 +0000 (12:47 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 2 Jul 2010 12:47:25 +0000 (12:47 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@22047 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/mac80211/patches/550-ath9k_fix_wep_adhoc_crash.patch [new file with mode: 0644]

diff --git a/package/mac80211/patches/550-ath9k_fix_wep_adhoc_crash.patch b/package/mac80211/patches/550-ath9k_fix_wep_adhoc_crash.patch
new file mode 100644 (file)
index 0000000..a71db04
--- /dev/null
@@ -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;