diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2009-01-26 19:09:42 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2009-01-26 19:09:42 +0000 |
commit | f5bde2a8b2c137a3c51797048f76f625179c249b (patch) | |
tree | e7ada894dc97c72e04d71f1fca20fee90e8dc80b /sys/net80211/ieee80211_node.h | |
parent | ba892d095172c6f93edba4a0a5af1c2f8754d770 (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_node.h')
-rw-r--r-- | sys/net80211/ieee80211_node.h | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index be2081e59c3..cfd101fc248 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.h,v 1.34 2008/12/14 10:17:24 damien Exp $ */ +/* $OpenBSD: ieee80211_node.h,v 1.35 2009/01/26 19:09:41 damien Exp $ */ /* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */ /*- @@ -96,6 +96,40 @@ enum { RSNA_KEYERROR }; +struct ieee80211_rxinfo { + u_int32_t rxi_flags; + u_int32_t rxi_tstamp; + int rxi_rssi; +}; +#define IEEE80211_RXI_HWDEC 0x00000001 +#define IEEE80211_RXI_AMPDU_DONE 0x00000002 + +/* Block Acknowledgement Record */ +struct ieee80211_ba { + struct ieee80211_node *ba_ni; /* backpointer for callbacks */ + struct { + struct mbuf *m; + struct ieee80211_rxinfo rxi; + } *ba_buf; + struct timeout ba_to; + int ba_timeout_val; +#define IEEE80211_BA_MIN_TIMEOUT (10 * 1000) /* 10msec */ +#define IEEE80211_BA_MAX_TIMEOUT (10 * 1000 * 1000) /* 10sec */ + + int ba_state; +#define IEEE80211_BA_INIT 0 +#define IEEE80211_BA_REQUESTED 1 +#define IEEE80211_BA_AGREED 2 + + u_int16_t ba_winstart; + u_int16_t ba_winend; + u_int16_t ba_winsize; +#define IEEE80211_BA_MAX_WINSZ 128 /* maximum we will accept */ + + u_int16_t ba_head; + u_int8_t ba_token; +}; + /* * Node specific information. Note that drivers are expected * to derive from this structure to add device-specific per-node @@ -144,10 +178,10 @@ struct ieee80211_node { struct ifqueue ni_savedq; /* packets queued for pspoll */ /* RSN */ + struct timeout ni_eapol_to; u_int ni_rsn_state; u_int ni_rsn_gstate; u_int ni_rsn_retries; - struct timeout ni_rsn_timeout; u_int ni_rsnprotos; u_int ni_rsnakms; u_int ni_rsnciphers; @@ -168,6 +202,14 @@ struct ieee80211_node { u_int8_t ni_key_count; int ni_port_valid; + /* SA Query */ + u_int8_t ni_sa_query_trid[16]; + struct timeout ni_sa_query_to; + int ni_sa_query_count; + + /* HT-immediate Block Ack */ + struct ieee80211_ba ni_ba[IEEE80211_NUM_TID]; + /* others */ u_int16_t ni_associd; /* assoc response */ u_int16_t ni_txseq; /* seq to be transmitted */ @@ -192,6 +234,9 @@ struct ieee80211_node { #define IEEE80211_NODE_MFP 0x0080 /* MFP negotiated */ #define IEEE80211_NODE_PMK 0x0100 /* ni_pmk set */ #define IEEE80211_NODE_PMKID 0x0200 /* ni_pmkid set */ +#define IEEE80211_NODE_HT 0x0400 /* HT negotiated */ +#define IEEE80211_NODE_SA_QUERY 0x0800 /* SA Query in progress */ +#define IEEE80211_NODE_SA_QUERY_FAILED 0x1000 /* last SA Query failed */ }; RB_HEAD(ieee80211_tree, ieee80211_node); |