From 97bcffbd74d7d40d0abbdf6989b4e9c4fdcc435c Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Tue, 14 Feb 2006 17:48:56 +0000 Subject: [PATCH] o make driver override of net80211 parameter state consistent with methods: instead of honoring non-zero values expect drivers to write their own values on return from ieee80211_ifattach o add a define for the default h/w bmiss count MFC after: 2 weeks --- sys/net80211/ieee80211.c | 8 +++----- sys/net80211/ieee80211_var.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 29c2759be22..8420dbc401d 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -188,14 +188,12 @@ ieee80211_ifattach(struct ieee80211com *ic) ic->ic_flags |= IEEE80211_F_BURST; (void) ieee80211_setmode(ic, ic->ic_curmode); - if (ic->ic_bintval == 0) - ic->ic_bintval = IEEE80211_BINTVAL_DEFAULT; - ic->ic_bmissthreshold = 7; /* default 7 beacons */ + ic->ic_bintval = IEEE80211_BINTVAL_DEFAULT; + ic->ic_bmissthreshold = IEEE80211_HWBMISS_DEFAULT; ic->ic_dtim_period = IEEE80211_DTIM_DEFAULT; IEEE80211_BEACON_LOCK_INIT(ic, "beacon"); - if (ic->ic_lintval == 0) - ic->ic_lintval = ic->ic_bintval; + ic->ic_lintval = ic->ic_bintval; ic->ic_txpowlimit = IEEE80211_TXPOWER_MAX; ieee80211_node_attach(ic); diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index f920f59d205..3bfce30ab63 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -72,6 +72,7 @@ #define IEEE80211_BMISS_MAX 2 /* maximum consecutive bmiss allowed */ #define IEEE80211_SWBMISS_THRESHOLD 50 /* s/w bmiss threshold (TU's) */ +#define IEEE80211_HWBMISS_DEFAULT 7 /* h/w bmiss threshold (beacons) */ #define IEEE80211_PS_SLEEP 0x1 /* STA is in power saving mode */ #define IEEE80211_PS_MAX_QUEUE 50 /* maximum saved packets */