summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_var.h
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-01-26 19:09:42 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-01-26 19:09:42 +0000
commitf5bde2a8b2c137a3c51797048f76f625179c249b (patch)
treee7ada894dc97c72e04d71f1fca20fee90e8dc80b /sys/net80211/ieee80211_var.h
parentba892d095172c6f93edba4a0a5af1c2f8754d770 (diff)
Add some initial HT bits (not enabled yet) based on 802.11n Draft 7.01:
- implement A-MPDU frames buffering and reordering - implement A-MSDU decapsulation - process/send ADDBA Request, ADDBA Response and DELBA action frames - process Block Ack Request control frames (including MTBAR) - implement PBAC support (Protected Block Ack) - add some incomplete HT Capabilities and HT Operation IEs parsing Add more Management Frame Protection bits based on 802.11w Draft 7.0: - implement SA Query procedure (both AP and STA) - cleanup BIP Fix some bugs: - fix check for WEP key length that otherwise caused a stack smash in ieee80211_wep_encrypt (pointed out by Xavier Santolaria on macppc) - properly stop EAPOL timeout: fixes a panic that occured in HostAP mode when turning the interface down while a 4-way handshake is in progress (pointed out by Doughertys) Did some code cleanup too. The HT bits are currently not compiled in (IEEE80211_NO_HT is defined) because they won't be ready until after the next release and I didn't want to grow the kernel or to inadvertently introduce new bugs. They are here such that other people can look at the code. Notice that I had to add an extra parameter to ic_send_mgmt() for action frames, that is why there are small changes in drivers defining their own ic_send_mgmt() handler. Sorry for the not very incremental diff but this has been sitting in my tree for too long now.
Diffstat (limited to 'sys/net80211/ieee80211_var.h')
-rw-r--r--sys/net80211/ieee80211_var.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 5ca29ad46d5..13e6ff1bc8a 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_var.h,v 1.55 2008/11/13 13:42:35 djm Exp $ */
+/* $OpenBSD: ieee80211_var.h,v 1.56 2009/01/26 19:09:41 damien Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */
/*-
@@ -38,8 +38,9 @@
*/
#ifdef SMALL_KERNEL
-#define IEEE80211_STA_ONLY 1
+#define IEEE80211_STA_ONLY 1
#endif
+#define IEEE80211_NO_HT 1 /* no HT yet */
#include <sys/timeout.h>
@@ -171,13 +172,6 @@ struct ieee80211_edca_ac_params {
#define IEEE80211_PROTO_RSN (1 << 0)
#define IEEE80211_PROTO_WPA (1 << 1)
-struct ieee80211_rxinfo {
- u_int32_t rxi_flags;
- u_int32_t rxi_tstamp;
- int rxi_rssi;
-};
-#define IEEE80211_RXI_HWDEC 0x00000001
-
#define IEEE80211_SCAN_UNLOCKED 0x0
#define IEEE80211_SCAN_LOCKED 0x1
#define IEEE80211_SCAN_REQUEST 0x2
@@ -192,7 +186,7 @@ struct ieee80211com {
struct mbuf *, struct ieee80211_node *,
struct ieee80211_rxinfo *, int);
int (*ic_send_mgmt)(struct ieee80211com *,
- struct ieee80211_node *, int, int);
+ struct ieee80211_node *, int, int, int);
int (*ic_newstate)(struct ieee80211com *,
enum ieee80211_state, int);
void (*ic_newassoc)(struct ieee80211com *,
@@ -206,6 +200,10 @@ struct ieee80211com {
void (*ic_delete_key)(struct ieee80211com *,
struct ieee80211_node *,
struct ieee80211_key *);
+ int (*ic_htimmba_start)(struct ieee80211com *,
+ struct ieee80211_node *, u_int8_t);
+ void (*ic_htimmba_stop)(struct ieee80211com *,
+ struct ieee80211_node *, u_int8_t);
u_int8_t ic_myaddr[IEEE80211_ADDR_LEN];
struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX];
struct ieee80211_channel ic_channels[IEEE80211_CHAN_MAX+1];
@@ -291,6 +289,15 @@ struct ieee80211com {
u_int ic_tim_mcast_pending;
u_int ic_dtim_period;
u_int ic_dtim_count;
+
+ u_int32_t ic_txbfcaps;
+ u_int16_t ic_htcaps;
+ u_int16_t ic_htxcaps;
+ u_int8_t ic_aselcaps;
+ u_int8_t ic_sup_mcs[16];
+ u_int8_t ic_dialog_token;
+
+ LIST_HEAD(, ieee80211_vap) ic_vaps;
};
#define ic_if ic_ac.ac_if
#define ic_softc ic_if.if_softc
@@ -320,7 +327,9 @@ extern struct ieee80211com_head ieee80211com_head;
#define IEEE80211_F_RSNON 0x00200000 /* CONF: RSN enabled */
#define IEEE80211_F_PSK 0x00400000 /* CONF: pre-shared key set */
#define IEEE80211_F_COUNTERM 0x00800000 /* STATUS: countermeasures */
-#define IEEE80211_F_MFPR 0x01000000 /* CONF: MFP requested */
+#define IEEE80211_F_MFPR 0x01000000 /* CONF: MFP required */
+#define IEEE80211_F_HTON 0x02000000 /* CONF: HT enabled */
+#define IEEE80211_F_PBAR 0x04000000 /* CONF: PBAC required */
#define IEEE80211_F_USERMASK 0xf0000000 /* CONF: ioctl flag mask */
/* ic_caps */
@@ -338,7 +347,6 @@ extern struct ieee80211com_head ieee80211com_head;
#define IEEE80211_C_QOS 0x00000800 /* CAPABILITY: QoS avail */
#define IEEE80211_C_RSN 0x00001000 /* CAPABILITY: RSN avail */
#define IEEE80211_C_MFP 0x00002000 /* CAPABILITY: MFP avail */
-#define IEEE80211_C_HT 0x00004000 /* CAPABILITY: HT avail */
/* flags for ieee80211_fix_rate() */
#define IEEE80211_F_DOSORT 0x00000001 /* sort rate list */