diff options
author | sam <sam@FreeBSD.org> | 2005-08-08 03:30:57 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-08-08 03:30:57 +0000 |
commit | a71123cebfbc9af46b53dec14375534ae5c7076e (patch) | |
tree | b61ffe07bac4a6b4eaff6820d88a3707be5fc831 /sys/dev | |
parent | 3060bdb6720112effa149af05f489daf4dc779ff (diff) | |
download | FreeBSD-src-a71123cebfbc9af46b53dec14375534ae5c7076e.zip FreeBSD-src-a71123cebfbc9af46b53dec14375534ae5c7076e.tar.gz |
Cleanup beacon/listen interval handling:
o separate configured beacon interval from listen interval; this
avoids potential use of one value for the other (e.g. setting
powersavesleep to 0 clobbers the beacon interval used in hostap
or ibss mode)
o bounds check the beacon interval received in probe response and
beacon frames and drop frames with bogus settings; not clear
if we should instead clamp the value as any alteration would
result in mismatched sta+ap configuration and probably be more
confusing (don't want to log to the console but perhaps ok with
rate limiting)
o while here up max beacon interval to reflect WiFi standard
Noticed by: Martin <nakal@nurfuerspam.de>
MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/awi/awi.c | 2 | ||||
-rw-r--r-- | sys/dev/ipw/if_ipw.c | 2 | ||||
-rw-r--r-- | sys/dev/wi/if_wi.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c index 838e3fb..4e2aab1 100644 --- a/sys/dev/awi/awi.c +++ b/sys/dev/awi/awi.c @@ -660,7 +660,7 @@ awi_init(struct ifnet *ifp) if (ic->ic_opmode == IEEE80211_M_AHDEMO || ic->ic_opmode == IEEE80211_M_HOSTAP) { ni->ni_chan = ic->ic_ibss_chan; - ni->ni_intval = ic->ic_lintval; + ni->ni_intval = ic->ic_bintval; ni->ni_rssi = 0; ni->ni_rstamp = 0; memset(&ni->ni_tstamp, 0, sizeof(ni->ni_tstamp)); diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 60ec63f..75af5ac 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -2001,7 +2001,7 @@ ipw_config(struct ipw_softc *sc) #endif if (ic->ic_opmode == IEEE80211_M_IBSS) { - data = htole32(ic->ic_lintval); + data = htole32(ic->ic_bintval); DPRINTF(("Setting beacon interval to %u\n", le32toh(data))); error = ipw_cmd(sc, IPW_CMD_SET_BEACON_INTERVAL, &data, sizeof data); diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index c80c939..bb545e6 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -739,7 +739,7 @@ wi_init(void *arg) if (ic->ic_opmode == IEEE80211_M_HOSTAP && sc->sc_firmware_type == WI_INTERSIL) { - wi_write_val(sc, WI_RID_OWN_BEACON_INT, ic->ic_lintval); + wi_write_val(sc, WI_RID_OWN_BEACON_INT, ic->ic_bintval); wi_write_val(sc, WI_RID_BASIC_RATE, 0x03); /* 1, 2 */ wi_write_val(sc, WI_RID_SUPPORT_RATE, 0x0f); /* 1, 2, 5.5, 11 */ wi_write_val(sc, WI_RID_DTIM_PERIOD, 1); |