refresh a patch that is causing problems on certain systems

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7857 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2007-07-02 21:52:32 +00:00
parent 46d721d0c2
commit bd45d860a9
1 changed files with 98 additions and 82 deletions

View File

@ -1,82 +1,98 @@
Index: madwifi/net80211/ieee80211_wireless.c Index: madwifi-ng-r2420-20070602/ath/if_ath.c
=================================================================== ===================================================================
--- madwifi/net80211/ieee80211_wireless.c (revision 2482) --- madwifi-ng-r2420-20070602.orig/ath/if_ath.c 2007-07-02 23:49:33.450710750 +0200
+++ madwifi/net80211/ieee80211_wireless.c (revision 2484) +++ madwifi-ng-r2420-20070602/ath/if_ath.c 2007-07-02 23:50:43.107064000 +0200
@@ -1102,5 +1102,4 @@ @@ -8197,16 +8197,15 @@
for (i = 0; i < number; i++) { wds_ni->ni_rates = vap->iv_bss->ni_rates;
ni = ieee80211_find_node(nt, &vap->iv_spy.mac[i * IEEE80211_ADDR_LEN]); /* Depending on the sequence of bringing up devices
- /* TODO: free node ? */ * it's possible the rates of the root bss isn't
/* check we are associated w/ this vap */ - * filled yet.
if (ni && (ni->ni_vap == vap)) { - */
@@ -1114,4 +1113,5 @@ - if (vap->iv_ic->ic_newassoc != NULL &&
spy_stat[i].updated = IW_QUAL_ALL_INVALID; - wds_ni->ni_rates.rs_nrates != 0) {
} + * filled yet. */
+ ieee80211_unref_node(&ni); + if ((vap->iv_ic->ic_newassoc != NULL) &&
} + (wds_ni->ni_rates.rs_nrates != 0)) {
/* Fill in the rates based on our own rates
@@ -3191,4 +3191,5 @@ * we rely on the rate selection mechanism
if (ik->ik_keylen > sizeof(ik->ik_keydata)) - * to find out which rates actually work!
return -E2BIG; - */
+ + * to find out which rates actually work! */
kix = ik->ik_keyix; vap->iv_ic->ic_newassoc(wds_ni, 1);
if (kix == IEEE80211_KEYIX_NONE) { }
@@ -3214,4 +3215,5 @@ + ieee80211_unref_node(&wds_ni);
ik->ik_flags |= IEEE80211_KEY_GROUP; /* XXX */ }
} break;
+ default:
error = 0; Index: madwifi-ng-r2420-20070602/net80211/ieee80211_output.c
flags = ik->ik_flags & IEEE80211_KEY_COMMON; ===================================================================
@@ -3228,5 +3230,5 @@ --- madwifi-ng-r2420-20070602.orig/net80211/ieee80211_output.c 2007-07-02 23:49:31.574593500 +0200
memcpy(wk->wk_key, ik->ik_keydata, ik->ik_keylen); +++ madwifi-ng-r2420-20070602/net80211/ieee80211_output.c 2007-07-02 23:50:37.462711250 +0200
if (!ieee80211_crypto_setkey(vap, wk, @@ -268,6 +268,7 @@
- ni != NULL ? ni->ni_macaddr : ik->ik_macaddr, ni)) * We'll get the frame back when the time is right.
+ (ni != NULL) ? ni->ni_macaddr : ik->ik_macaddr, ni)) */
error = -EIO; ieee80211_pwrsave(ni, skb);
else if ((ik->ik_flags & IEEE80211_KEY_DEFAULT)) + ieee80211_unref_node(&ni);
@@ -3234,4 +3236,5 @@ return 0;
} else }
error = -ENXIO;
+ @@ -282,7 +283,7 @@
ieee80211_key_update_end(vap); vap->iv_xrvap->iv_sta_assoc) {
if (ni != NULL) struct sk_buff *skb1;
Index: madwifi/net80211/ieee80211_output.c ni = ieee80211_find_txnode(vap->iv_xrvap, eh->ether_dhost);
=================================================================== - skb1 = skb_clone(skb,GFP_ATOMIC);
--- madwifi/net80211/ieee80211_output.c (revision 2438) + skb1 = skb_clone(skb, GFP_ATOMIC);
+++ madwifi/net80211/ieee80211_output.c (revision 2484) if (skb1) {
@@ -269,4 +269,5 @@ cb = (struct ieee80211_cb *) skb1->cb;
*/ cb->ni = ni;
ieee80211_pwrsave(ni, skb); Index: madwifi-ng-r2420-20070602/net80211/ieee80211_wireless.c
+ ieee80211_unref_node(&ni); ===================================================================
return 0; --- madwifi-ng-r2420-20070602.orig/net80211/ieee80211_wireless.c 2007-07-02 23:49:31.566593000 +0200
} +++ madwifi-ng-r2420-20070602/net80211/ieee80211_wireless.c 2007-07-02 23:49:34.126753000 +0200
@@ -283,5 +284,5 @@ @@ -1088,7 +1088,6 @@
struct sk_buff *skb1; /* locate a node, read its rssi, check if updated, convert to dBm */
ni = ieee80211_find_txnode(vap->iv_xrvap, eh->ether_dhost); for (i = 0; i < number; i++) {
- skb1 = skb_clone(skb,GFP_ATOMIC); ni = ieee80211_find_node(nt, &vap->iv_spy.mac[i * IEEE80211_ADDR_LEN]);
+ skb1 = skb_clone(skb, GFP_ATOMIC); - /* TODO: free node ? */
if (skb1) { /* check we are associated w/ this vap */
cb = (struct ieee80211_cb *) skb1->cb; if (ni && (ni->ni_vap == vap)) {
Index: madwifi/ath/if_ath.c set_quality(&spy_stat[i], ni->ni_rssi, ic->ic_channoise);
=================================================================== @@ -1100,6 +1099,7 @@
--- madwifi/ath/if_ath.c (revision 2482) } else {
+++ madwifi/ath/if_ath.c (revision 2484) spy_stat[i].updated = IW_QUAL_ALL_INVALID;
@@ -8111,14 +8111,13 @@ }
/* Depending on the sequence of bringing up devices + ieee80211_unref_node(&ni);
* it's possible the rates of the root bss isn't }
- * filled yet.
- */ /* copy results to userspace */
- if (vap->iv_ic->ic_newassoc != NULL && @@ -3153,6 +3153,7 @@
- wds_ni->ni_rates.rs_nrates != 0) { /* NB: this also checks ik->ik_keylen > sizeof(wk->wk_key) */
+ * filled yet. */ if (ik->ik_keylen > sizeof(ik->ik_keydata))
+ if ((vap->iv_ic->ic_newassoc != NULL) && return -E2BIG;
+ (wds_ni->ni_rates.rs_nrates != 0)) { +
/* Fill in the rates based on our own rates kix = ik->ik_keyix;
* we rely on the rate selection mechanism if (kix == IEEE80211_KEYIX_NONE) {
- * to find out which rates actually work! /* XXX unicast keys currently must be tx/rx */
- */ @@ -3176,6 +3177,7 @@
+ * to find out which rates actually work! */ if ((ik->ik_flags & IEEE80211_KEY_XMIT) == 0) /* XXX */
vap->iv_ic->ic_newassoc(wds_ni, 1); ik->ik_flags |= IEEE80211_KEY_GROUP; /* XXX */
} }
+ ieee80211_unref_node(&wds_ni); +
} error = 0;
break; flags = ik->ik_flags & IEEE80211_KEY_COMMON;
ieee80211_key_update_begin(vap);
@@ -3190,12 +3192,13 @@
memset(wk->wk_key, 0, sizeof(wk->wk_key));
memcpy(wk->wk_key, ik->ik_keydata, ik->ik_keylen);
if (!ieee80211_crypto_setkey(vap, wk,
- ni != NULL ? ni->ni_macaddr : ik->ik_macaddr, ni))
+ (ni != NULL) ? ni->ni_macaddr : ik->ik_macaddr, ni))
error = -EIO;
else if ((ik->ik_flags & IEEE80211_KEY_DEFAULT))
vap->iv_def_txkey = kix;
} else
error = -ENXIO;
+
ieee80211_key_update_end(vap);
if (ni != NULL)
ieee80211_unref_node(&ni);