Eric Naud
2010-04-06 17:58:38 UTC
Hello,
While working with the rum and ral driver I noticed that these drivers
don't detect the loss of their access point. Situations such as moving
out of range or powering down the AP is not noticed by the driver and as
a result the network status remains active and no efforts are made to
scan for a new channel.
Here's a quick test case:
1. Boot into netBSD5.0.2
2. Insert rum or ral device
3. ifconfig rum0 ssid "TESTNETWORK" -nwkey (no keys, keep it simple)
4. ifconfig rum0 up
5. Wait until network status = active and run ifconfig rum0, note the
bssid.
6. Unplug the access point associated with that bssid.
7. Wait. Run ifconfig and notice the 'status: active' is always
displayed instead of 'status: no network'
Are there other mechanisms available to detect the loss of access point
or network status without manually initiating a channel scan?
The change below uses the ieee80211_beacon_miss() function in a periodic
callout to determine if two or more consecutive beacons were missed, if
beacons were missed the driver state changes in order to initiate a
scan.
Any feedback?
Regards,
Eric
Index: if_rum.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_rum.c,v
retrieving revision 1.23
diff -r1.23 if_rum.c
25d24
<
205a205
761a765
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_rumvar.h,v
retrieving revision 1.4
diff -r1.4 if_rumvar.h
112a113
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
While working with the rum and ral driver I noticed that these drivers
don't detect the loss of their access point. Situations such as moving
out of range or powering down the AP is not noticed by the driver and as
a result the network status remains active and no efforts are made to
scan for a new channel.
Here's a quick test case:
1. Boot into netBSD5.0.2
2. Insert rum or ral device
3. ifconfig rum0 ssid "TESTNETWORK" -nwkey (no keys, keep it simple)
4. ifconfig rum0 up
5. Wait until network status = active and run ifconfig rum0, note the
bssid.
6. Unplug the access point associated with that bssid.
7. Wait. Run ifconfig and notice the 'status: active' is always
displayed instead of 'status: no network'
Are there other mechanisms available to detect the loss of access point
or network status without manually initiating a channel scan?
The change below uses the ieee80211_beacon_miss() function in a periodic
callout to determine if two or more consecutive beacons were missed, if
beacons were missed the driver state changes in order to initiate a
scan.
Any feedback?
Regards,
Eric
Index: if_rum.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_rum.c,v
retrieving revision 1.23
diff -r1.23 if_rum.c
25d24
<
205a205
Static void rum_linkmon(void *);
362a363usb_callout_init(sc->sc_link_mon);
493a495usb_uncallout(sc->sc_link_mon, rum_linkmon, sc);
747a750usb_callout(sc->sc_link_mon, hz*3, rum_linkmon,
sc);761a765
usb_uncallout(sc->sc_link_mon, , NULL);
2288a2293,2301void rum_linkmon(void *arg)
{
struct rum_softc *sc = arg;
ieee80211_beacon_miss(&sc->sc_ic);
if (ic->ic_state == IEEE80211_S_RUN) {
usb_callout(sc->sc_link_mon, hz*3, rum_linkmon,
sc);{
struct rum_softc *sc = arg;
ieee80211_beacon_miss(&sc->sc_ic);
if (ic->ic_state == IEEE80211_S_RUN) {
usb_callout(sc->sc_link_mon, hz*3, rum_linkmon,
}
}
Index: if_rumvar.h}
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_rumvar.h,v
retrieving revision 1.4
diff -r1.4 if_rumvar.h
112a113
usb_callout_t sc_link_mon;
--Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de