summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_tdma.h
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.h
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.h')
-rw-r--r--sys/net80211/ieee80211_tdma.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_tdma.h b/sys/net80211/ieee80211_tdma.h
index 22d14c3..41ca09e 100644
--- a/sys/net80211/ieee80211_tdma.h
+++ b/sys/net80211/ieee80211_tdma.h
@@ -31,6 +31,39 @@
/*
* TDMA-mode implementation definitions.
*/
+
+#define TDMA_SUBTYPE_PARAM 0x01
+#define TDMA_VERSION_V2 2
+#define TDMA_VERSION TDMA_VERSION_V2
+
+/* NB: we only support 2 right now but protocol handles up to 8 */
+#define TDMA_MAXSLOTS 2 /* max slots/sta's */
+
+#define TDMA_PARAM_LEN_V2 sizeof(struct ieee80211_tdma_param)
+
+/*
+ * TDMA information element.
+ */
+struct ieee80211_tdma_param {
+ u_int8_t tdma_id; /* IEEE80211_ELEMID_VENDOR */
+ u_int8_t tdma_len;
+ u_int8_t tdma_oui[3]; /* TDMA_OUI */
+ u_int8_t tdma_type; /* TDMA_OUI_TYPE */
+ u_int8_t tdma_subtype; /* TDMA_SUBTYPE_PARAM */
+ u_int8_t tdma_version; /* spec revision */
+ u_int8_t tdma_slot; /* station slot # [0..7] */
+ u_int8_t tdma_slotcnt; /* bss slot count [1..8] */
+ u_int16_t tdma_slotlen; /* bss slot len (100us) */
+ u_int8_t tdma_bintval; /* beacon interval (superframes) */
+ u_int8_t tdma_inuse[1]; /* slot occupancy map */
+ u_int8_t tdma_pad[2];
+ u_int8_t tdma_tstamp[8]; /* timestamp from last beacon */
+} __packed;
+
+#ifdef _KERNEL
+/*
+ * Implementation state.
+ */
struct ieee80211_tdma_state {
u_int tdma_slotlen; /* bss slot length (us) */
uint8_t tdma_version; /* protocol version to use */
@@ -65,4 +98,5 @@ uint8_t *ieee80211_add_tdma(uint8_t *frm, struct ieee80211vap *vap);
struct ieee80211_beacon_offsets;
void ieee80211_tdma_update_beacon(struct ieee80211vap *vap,
struct ieee80211_beacon_offsets *bo);
+#endif /* _KERNEL */
#endif /* !_NET80211_IEEE80211_TDMA_H_ */
OpenPOWER on IntegriCloud