mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-12 13:00:15 +02:00
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
This commit is contained in:
parent
ef34afda18
commit
d2a5dab805
@ -813,11 +813,10 @@
|
|||||||
+ (vap->iv_opmode == IEEE80211_M_WDS)) &&
|
+ (vap->iv_opmode == IEEE80211_M_WDS)) &&
|
||||||
+ (scan.capinfo & IEEE80211_CAPINFO_ESS))) {
|
+ (scan.capinfo & IEEE80211_CAPINFO_ESS))) {
|
||||||
+ struct ieee80211vap *avp = NULL;
|
+ struct ieee80211vap *avp = NULL;
|
||||||
|
+ int found = 0;
|
||||||
+
|
+
|
||||||
+ IEEE80211_LOCK_IRQ(vap->iv_ic);
|
+ IEEE80211_LOCK_IRQ(vap->iv_ic);
|
||||||
+ if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
|
+ if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
|
||||||
+ int found = 0;
|
|
||||||
+
|
|
||||||
+ TAILQ_FOREACH(avp, &vap->iv_wdslinks, iv_wdsnext) {
|
+ TAILQ_FOREACH(avp, &vap->iv_wdslinks, iv_wdsnext) {
|
||||||
+ if (!memcmp(avp->wds_mac, wh->i_addr2, IEEE80211_ADDR_LEN)) {
|
+ if (!memcmp(avp->wds_mac, wh->i_addr2, IEEE80211_ADDR_LEN)) {
|
||||||
+ if (avp->iv_state != IEEE80211_S_RUN)
|
+ if (avp->iv_state != IEEE80211_S_RUN)
|
||||||
@ -826,15 +825,16 @@
|
|||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ if (!found)
|
+ if (found)
|
||||||
+ break;
|
+ ni = ni_or_null = avp->iv_wdsnode;
|
||||||
+
|
|
||||||
+ ni = ni_or_null = avp->iv_wdsnode;
|
|
||||||
+ } else if (vap->iv_opmode == IEEE80211_M_WDS) {
|
+ } else if (vap->iv_opmode == IEEE80211_M_WDS) {
|
||||||
|
+ found = 1;
|
||||||
+ ni = ni_or_null = vap->iv_wdsnode;
|
+ ni = ni_or_null = vap->iv_wdsnode;
|
||||||
+ }
|
+ }
|
||||||
+ IEEE80211_UNLOCK_IRQ(vap->iv_ic);
|
+ IEEE80211_UNLOCK_IRQ(vap->iv_ic);
|
||||||
+
|
+
|
||||||
|
+ if (!found)
|
||||||
|
+ break;
|
||||||
+
|
+
|
||||||
if (ni_or_null == NULL) {
|
if (ni_or_null == NULL) {
|
||||||
- /* Create a new entry in the neighbor table. */
|
- /* Create a new entry in the neighbor table. */
|
||||||
|
Loading…
Reference in New Issue
Block a user