summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-03-23 12:17:46 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-03-23 12:17:46 +0000
commitd2a5dab80514fe06f9125aa19412bdedbdfcf138 (patch)
treeebadfcbbd9403674dc3099abc805a2e2e5a476e5
parentef34afda182f85b2b490192f3fe4b1a20c942838 (diff)
madwifi: fix a locking error related to wds (thx, tharvey)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14990 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/madwifi/patches/370-wdsvap.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/package/madwifi/patches/370-wdsvap.patch b/package/madwifi/patches/370-wdsvap.patch
index f72e22ffe..38093d6c4 100644
--- a/package/madwifi/patches/370-wdsvap.patch
+++ b/package/madwifi/patches/370-wdsvap.patch
@@ -813,11 +813,10 @@
+ (vap->iv_opmode == IEEE80211_M_WDS)) &&
+ (scan.capinfo & IEEE80211_CAPINFO_ESS))) {
+ struct ieee80211vap *avp = NULL;
++ int found = 0;
+
+ IEEE80211_LOCK_IRQ(vap->iv_ic);
+ if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
-+ int found = 0;
-+
+ TAILQ_FOREACH(avp, &vap->iv_wdslinks, iv_wdsnext) {
+ if (!memcmp(avp->wds_mac, wh->i_addr2, IEEE80211_ADDR_LEN)) {
+ if (avp->iv_state != IEEE80211_S_RUN)
@@ -826,15 +825,16 @@
+ break;
+ }
+ }
-+ if (!found)
-+ break;
-+
-+ ni = ni_or_null = avp->iv_wdsnode;
++ if (found)
++ ni = ni_or_null = avp->iv_wdsnode;
+ } else if (vap->iv_opmode == IEEE80211_M_WDS) {
++ found = 1;
+ ni = ni_or_null = vap->iv_wdsnode;
+ }
+ IEEE80211_UNLOCK_IRQ(vap->iv_ic);
+
++ if (!found)
++ break;
+
if (ni_or_null == NULL) {
- /* Create a new entry in the neighbor table. */