aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_80211.h
diff options
context:
space:
mode:
authorJouni Malinen <jkmaline@cc.hut.fi>2005-05-12 22:54:16 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-12 22:54:16 -0400
commitff1d2767d5a43c85f944e86a45284b721f66196c (patch)
tree91c1b6dd20bd772bc112c0012830678b46b69604 /drivers/net/wireless/hostap/hostap_80211.h
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
Add HostAP wireless driver.
Includes minor cleanups from Adrian Bunk <bunk@stusta.de>.
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_80211.h')
-rw-r--r--drivers/net/wireless/hostap/hostap_80211.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/drivers/net/wireless/hostap/hostap_80211.h b/drivers/net/wireless/hostap/hostap_80211.h
new file mode 100644
index 00000000000..878151f4065
--- /dev/null
+++ b/drivers/net/wireless/hostap/hostap_80211.h
@@ -0,0 +1,107 @@
1#ifndef HOSTAP_80211_H
2#define HOSTAP_80211_H
3
4struct hostap_ieee80211_hdr {
5 u16 frame_control;
6 u16 duration_id;
7 u8 addr1[6];
8 u8 addr2[6];
9 u8 addr3[6];
10 u16 seq_ctrl;
11 u8 addr4[6];
12} __attribute__ ((packed));
13
14
15struct hostap_ieee80211_mgmt {
16 u16 frame_control;
17 u16 duration;
18 u8 da[6];
19 u8 sa[6];
20 u8 bssid[6];
21 u16 seq_ctrl;
22 union {
23 struct {
24 u16 auth_alg;
25 u16 auth_transaction;
26 u16 status_code;
27 /* possibly followed by Challenge text */
28 u8 variable[0];
29 } __attribute__ ((packed)) auth;
30 struct {
31 u16 reason_code;
32 } __attribute__ ((packed)) deauth;
33 struct {
34 u16 capab_info;
35 u16 listen_interval;
36 /* followed by SSID and Supported rates */
37 u8 variable[0];
38 } __attribute__ ((packed)) assoc_req;
39 struct {
40 u16 capab_info;
41 u16 status_code;
42 u16 aid;
43 /* followed by Supported rates */
44 u8 variable[0];
45 } __attribute__ ((packed)) assoc_resp, reassoc_resp;
46 struct {
47 u16 capab_info;
48 u16 listen_interval;
49 u8 current_ap[6];
50 /* followed by SSID and Supported rates */
51 u8 variable[0];
52 } __attribute__ ((packed)) reassoc_req;
53 struct {
54 u16 reason_code;
55 } __attribute__ ((packed)) disassoc;
56 struct {
57 } __attribute__ ((packed)) probe_req;
58 struct {
59 u8 timestamp[8];
60 u16 beacon_int;
61 u16 capab_info;
62 /* followed by some of SSID, Supported rates,
63 * FH Params, DS Params, CF Params, IBSS Params, TIM */
64 u8 variable[0];
65 } __attribute__ ((packed)) beacon, probe_resp;
66 } u;
67} __attribute__ ((packed));
68
69
70#define IEEE80211_MGMT_HDR_LEN 24
71#define IEEE80211_DATA_HDR3_LEN 24
72#define IEEE80211_DATA_HDR4_LEN 30
73
74
75struct hostap_80211_rx_status {
76 u32 mac_time;
77 u8 signal;
78 u8 noise;
79 u16 rate; /* in 100 kbps */
80};
81
82
83void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
84 struct hostap_80211_rx_status *rx_stats);
85
86
87/* prism2_rx_80211 'type' argument */
88enum {
89 PRISM2_RX_MONITOR, PRISM2_RX_MGMT, PRISM2_RX_NON_ASSOC,
90 PRISM2_RX_NULLFUNC_ACK
91};
92
93int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
94 struct hostap_80211_rx_status *rx_stats, int type);
95void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
96 struct hostap_80211_rx_status *rx_stats);
97void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
98 struct hostap_80211_rx_status *rx_stats);
99
100void hostap_dump_tx_80211(const char *name, struct sk_buff *skb);
101int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev);
102int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev);
103struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
104 struct prism2_crypt_data *crypt);
105int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev);
106
107#endif /* HOSTAP_80211_H */