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/net80211/ieee80211_output.c | |
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/net80211/ieee80211_output.c')
-rw-r--r-- | sys/net80211/ieee80211_output.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 78b62d0..85e610d 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1686,13 +1686,13 @@ ieee80211_pwrsave(struct ieee80211com *ic, struct ieee80211_node *ni, * using this information. */ /* XXX handle overflow? */ - age = ((ni->ni_intval * ic->ic_lintval) << 2) / 1024; /* TU -> secs */ + age = ((ni->ni_intval * ic->ic_bintval) << 2) / 1024; /* TU -> secs */ _IEEE80211_NODE_SAVEQ_ENQUEUE(ni, m, qlen, age); IEEE80211_NODE_SAVEQ_UNLOCK(ni); IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER, - "[%s] save frame, %u now queued\n", - ether_sprintf(ni->ni_macaddr), qlen); + "[%s] save frame with age %d, %u now queued\n", + ether_sprintf(ni->ni_macaddr), age, qlen); if (qlen == 1) ic->ic_set_tim(ni, 1); |