summaryrefslogtreecommitdiff
path: root/sys/dev/ic/if_wi_hostap.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-01-21 20:09:40 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-01-21 20:09:40 +0000
commit505d220db494d84f01398907d0a6a9af8e971105 (patch)
tree266f75a2bae2bb07dc97f138c16afbb86edbe447 /sys/dev/ic/if_wi_hostap.h
parent1908f8cbef776236c874cdacbe9591ac4bd8fcf0 (diff)
Use a 2-level timeout for hostap. Instead of of sending a station
a deauth/disassoc packet when the inactivity timer fires, just set a flag, re-queue it and set the master wihap timer if needed. What this does is to effectively bundle (and serialize) deauth/disassoc packets so if a large number need to be sent at once we don't stomp all over the card. We also only do at most 10 stations at a time. The sta_list has been changed from a doubly linked list to a tailq. Inactive stations are kept at the head of the queue, new ones are added to the tail. Idea and OK by mickey@, prompted by an issue found by merith AT vantronix DOT net
Diffstat (limited to 'sys/dev/ic/if_wi_hostap.h')
-rw-r--r--sys/dev/ic/if_wi_hostap.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/if_wi_hostap.h b/sys/dev/ic/if_wi_hostap.h
index dec44cd62ee..86bc943e9d6 100644
--- a/sys/dev/ic/if_wi_hostap.h
+++ b/sys/dev/ic/if_wi_hostap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_hostap.h,v 1.7 2002/12/30 03:23:58 mickey Exp $ */
+/* $OpenBSD: if_wi_hostap.h,v 1.8 2003/01/21 20:09:39 millert Exp $ */
/*
* Copyright (c) 2002
@@ -77,7 +77,7 @@ struct hostap_getall {
#ifdef _KERNEL
struct wihap_sta_info {
- LIST_ENTRY(wihap_sta_info) list;
+ TAILQ_ENTRY(wihap_sta_info) list;
LIST_ENTRY(wihap_sta_info) hash;
struct wi_softc *sc;
@@ -97,6 +97,7 @@ struct wihap_sta_info {
#define WI_SIFLAGS_ASSOC HOSTAP_FLAGS_ASSOC
#define WI_SIFLAGS_AUTHEN HOSTAP_FLAGS_AUTHEN
#define WI_SIFLAGS_PERM HOSTAP_FLAGS_PERM
+#define WI_SIFLAGS_DEAD 0x1000
#define WI_STA_HASH_SIZE 113
@@ -108,7 +109,7 @@ struct wihap_sta_info {
#endif
struct wihap_info {
- LIST_HEAD(sta_list, wihap_sta_info) sta_list;
+ TAILQ_HEAD(sta_list, wihap_sta_info) sta_list;
LIST_HEAD(sta_hash, wihap_sta_info) sta_hash[WI_STA_HASH_SIZE];
u_int16_t apflags;
@@ -117,6 +118,7 @@ struct wihap_info {
u_int16_t asid_inuse_mask[WI_STA_HASH_SIZE];
int inactivity_time;
+ struct timeout tmo;
};
#define WIHAP_DFLT_INACTIVITY_TIME (120) /* 2 minutes */