summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_var.h
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-02-02 16:47:54 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-02-02 16:47:54 +0000
commit42a68b32563b63e29e061549c26898a244be6289 (patch)
tree835e4b01763b42a91b9ec34d42664ebf68593a7b /sys/net80211/ieee80211_var.h
parent9f3b9441ee4e915ee12b0f0e16212fefccf8127d (diff)
Remove global counters from struct ieee80211com which track the number of
associated nodes with particular properties: 11b-only ("non-ERP") nodes, nodes requiring long slot time, nodes using WPA, nodes not supporting 11n, nodes currently dozing in powersave state, and nodes with a pending group key update confirmation. These counters weren't properly maintained. There are bugs in the stack where these counters and actual node properties got out of sync. This is exposed by panics which are supposed to help us catch such bugs. But these panics don't provide real clues. Instead of maintaining global counters forcing us to hunt refcounting bugs, count nodes with the property in question on demand, by iterating over all nodes and checking their state. This is cheap since we'll never have more than 100 nodes cached, and none of the cases where we need such information is in a performance critical path. Prevents panics in hostap mode reported by Lauri Tirkkonen on bugs@ last year (https://marc.info/?l=openbsd-bugs&m=147513817930489&w=2) and also encountered by my 11n APs ("panic: bogus non-HT station count 0"). tested by Lauri, tb@, and myself ok mpi@ tb@
Diffstat (limited to 'sys/net80211/ieee80211_var.h')
-rw-r--r--sys/net80211/ieee80211_var.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index a796e34a5e3..627eaebc8f9 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_var.h,v 1.76 2017/01/30 18:21:13 stsp Exp $ */
+/* $OpenBSD: ieee80211_var.h,v 1.77 2017/02/02 16:47:53 stsp Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */
/*-
@@ -263,10 +263,6 @@ struct ieee80211com {
u_int16_t ic_lintval; /* listen interval */
int16_t ic_txpower; /* tx power setting (dBm) */
u_int16_t ic_bmisstimeout;/* beacon miss threshold (ms) */
- u_int16_t ic_nonerpsta; /* # non-ERP stations */
- u_int16_t ic_longslotsta; /* # long slot time stations */
- u_int16_t ic_rsnsta; /* # RSN stations */
- u_int16_t ic_pssta; /* # ps mode stations */
int ic_mgt_timer; /* mgmt timeout */
#ifndef IEEE80211_STA_ONLY
struct timeout ic_inact_timeout; /* node inactivity timeout */
@@ -292,7 +288,6 @@ struct ieee80211com {
u_int8_t ic_nonce[EAPOL_KEY_NONCE_LEN];
u_int8_t ic_psk[IEEE80211_PMK_LEN];
struct timeout ic_rsn_timeout;
- u_int16_t ic_rsn_keydonesta;
int ic_tkip_micfail;
u_int64_t ic_tkip_micfail_last_tsc;
#ifndef IEEE80211_STA_ONLY
@@ -315,9 +310,6 @@ struct ieee80211com {
u_int ic_dtim_period;
u_int ic_dtim_count;
-#ifndef IEEE80211_STA_ONLY
- u_int16_t ic_nonhtsta; /* # non-HT stations */
-#endif
u_int32_t ic_txbfcaps;
u_int16_t ic_htcaps;
u_int8_t ic_ampdu_params;