1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 02:19:23 +02:00

madwifi: fix crash on ad-hoc interface init

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12161 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2008-08-05 20:53:39 +00:00
parent 4a9898de62
commit 28dbe639cc

View File

@ -0,0 +1,14 @@
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
@@ -3522,6 +3522,11 @@
if (ic->ic_flags & IEEE80211_F_SCAN) {
ieee80211_add_scan(vap, &scan, wh, subtype, rssi, rtsf);
}
+
+ /* stop processing if the bss channel is not set up yet */
+ if (!ic->ic_bsschan || ic->ic_bsschan == IEEE80211_CHAN_ANYC)
+ break;
+
/* NB: Behavior of WDS-Link and Ad-Hoc is very similar here:
* When we receive a beacon that belongs to the AP that we're
* connected to, use it to refresh the local node info.