diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-03-23 12:17:46 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-03-23 12:17:46 +0000 |
commit | c85a831b1416f241bd3d4b416a00e4bbfaf119dc (patch) | |
tree | e547165831bca95f10c7c6da0c19e871eca707c5 | |
parent | 2973b2dc9ce55aa2419d625bfac845035861bb14 (diff) | |
download | upstream-c85a831b1416f241bd3d4b416a00e4bbfaf119dc.tar.gz upstream-c85a831b1416f241bd3d4b416a00e4bbfaf119dc.tar.bz2 upstream-c85a831b1416f241bd3d4b416a00e4bbfaf119dc.zip |
madwifi: fix a locking error related to wds (thx, tharvey)
SVN-Revision: 14990
-rw-r--r-- | package/madwifi/patches/370-wdsvap.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/package/madwifi/patches/370-wdsvap.patch b/package/madwifi/patches/370-wdsvap.patch index f72e22ffe9..38093d6c42 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. */ |