From a71123cebfbc9af46b53dec14375534ae5c7076e Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 8 Aug 2005 03:30:57 +0000 Subject: 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 MFC after: 1 week --- sys/net80211/ieee80211_var.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/net80211/ieee80211_var.h') 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 */ -- cgit v1.1