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_var.h | |
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_var.h')
-rw-r--r-- | sys/net80211/ieee80211_var.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index e06673d..2ef0e54 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -65,7 +65,8 @@ #define IEEE80211_DTIM_MIN 1 /* min DTIM period */ #define IEEE80211_DTIM_DEFAULT 1 /* default DTIM period */ -#define IEEE80211_BINTVAL_MAX 500 /* max beacon interval (TU's) */ +/* NB: min+max come from WiFi requirements */ +#define IEEE80211_BINTVAL_MAX 1000 /* max beacon interval (TU's) */ #define IEEE80211_BINTVAL_MIN 25 /* min beacon interval (TU's) */ #define IEEE80211_BINTVAL_DEFAULT 100 /* default beacon interval (TU's) */ @@ -143,6 +144,7 @@ struct ieee80211com { void (*ic_node_cleanup)(struct ieee80211_node *); u_int8_t (*ic_node_getrssi)(const struct ieee80211_node*); u_int16_t ic_lintval; /* listen interval */ + u_int16_t ic_bintval; /* beacon interval */ u_int16_t ic_holdover; /* PM hold over duration */ u_int16_t ic_txmin; /* min tx retry count */ u_int16_t ic_txmax; /* max tx retry count */ |