summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_tdma.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-03-26 21:29:03 +0000
committersam <sam@FreeBSD.org>2009-03-26 21:29:03 +0000
commit37e13d21746e4fbe32fccada08c698a903999bfa (patch)
treed49ecf5c0f469e7ebdbd2db414e02258db068460 /sys/net80211/ieee80211_tdma.c
parentf369da4f050bfbe89a642027018e42f36f5191d7 (diff)
downloadFreeBSD-src-37e13d21746e4fbe32fccada08c698a903999bfa.zip
FreeBSD-src-37e13d21746e4fbe32fccada08c698a903999bfa.tar.gz
o move tdma+superg protocol defs out of public view
o add #ifdef _KERNEL to superg+tdma include files so they can be used by user code to get the protocol defs
Diffstat (limited to 'sys/net80211/ieee80211_tdma.c')
-rw-r--r--sys/net80211/ieee80211_tdma.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_tdma.c b/sys/net80211/ieee80211_tdma.c
index 5c08c9e..88c52e0 100644
--- a/sys/net80211/ieee80211_tdma.c
+++ b/sys/net80211/ieee80211_tdma.c
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
* IEEE 802.11 TDMA mode support.
*/
#include "opt_inet.h"
+#include "opt_tdma.h"
#include "opt_wlan.h"
#include <sys/param.h>
@@ -59,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <net80211/ieee80211_tdma.h>
#include <net80211/ieee80211_input.h>
-#include "opt_tdma.h"
#ifndef TDMA_SLOTLEN_DEFAULT
#define TDMA_SLOTLEN_DEFAULT 10*1000 /* 10ms */
#endif
@@ -94,6 +94,16 @@ __FBSDID("$FreeBSD$");
#define TDMA_TXRATE_11NG_DEFAULT (4 | IEEE80211_RATE_MCS)
#endif
+#define TDMA_VERSION_VALID(_version) \
+ (TDMA_VERSION_V2 <= (_version) && (_version) <= TDMA_VERSION)
+#define TDMA_SLOTCNT_VALID(_slotcnt) \
+ (2 <= (_slotcnt) && (_slotcnt) <= TDMA_MAXSLOTS)
+/* XXX magic constants */
+#define TDMA_SLOTLEN_VALID(_slotlen) \
+ (2*100 <= (_slotlen) && (unsigned)(_slotlen) <= 0xfffff)
+/* XXX probably should set a max */
+#define TDMA_BINTVAL_VALID(_bintval) (1 <= (_bintval))
+
static void tdma_vdetach(struct ieee80211vap *vap);
static int tdma_newstate(struct ieee80211vap *, enum ieee80211_state, int);
static void tdma_beacon_miss(struct ieee80211vap *vap);
OpenPOWER on IntegriCloud