]> bbs.cooldavid.org Git - net-next-2.6.git/blame - drivers/net/wireless/hostap/hostap_80211.h
Merge branch 'master' of /repos/git/net-next-2.6
[net-next-2.6.git] / drivers / net / wireless / hostap / hostap_80211.h
CommitLineData
ff1d2767
JM
1#ifndef HOSTAP_80211_H
2#define HOSTAP_80211_H
3
5fad5a2e 4#include <linux/types.h>
1ea893fd 5#include <linux/skbuff.h>
d0cf9c0d 6#include <linux/netdevice.h>
5fad5a2e 7
ff1d2767 8struct hostap_ieee80211_mgmt {
8a9faf3c
AV
9 __le16 frame_control;
10 __le16 duration;
ff1d2767
JM
11 u8 da[6];
12 u8 sa[6];
13 u8 bssid[6];
8a9faf3c 14 __le16 seq_ctrl;
ff1d2767
JM
15 union {
16 struct {
8a9faf3c
AV
17 __le16 auth_alg;
18 __le16 auth_transaction;
19 __le16 status_code;
ff1d2767
JM
20 /* possibly followed by Challenge text */
21 u8 variable[0];
ba2d3587 22 } __packed auth;
ff1d2767 23 struct {
8a9faf3c 24 __le16 reason_code;
ba2d3587 25 } __packed deauth;
ff1d2767 26 struct {
8a9faf3c
AV
27 __le16 capab_info;
28 __le16 listen_interval;
ff1d2767
JM
29 /* followed by SSID and Supported rates */
30 u8 variable[0];
ba2d3587 31 } __packed assoc_req;
ff1d2767 32 struct {
8a9faf3c
AV
33 __le16 capab_info;
34 __le16 status_code;
35 __le16 aid;
ff1d2767
JM
36 /* followed by Supported rates */
37 u8 variable[0];
ba2d3587 38 } __packed assoc_resp, reassoc_resp;
ff1d2767 39 struct {
8a9faf3c
AV
40 __le16 capab_info;
41 __le16 listen_interval;
ff1d2767
JM
42 u8 current_ap[6];
43 /* followed by SSID and Supported rates */
44 u8 variable[0];
ba2d3587 45 } __packed reassoc_req;
ff1d2767 46 struct {
8a9faf3c 47 __le16 reason_code;
ba2d3587 48 } __packed disassoc;
ff1d2767 49 struct {
ba2d3587 50 } __packed probe_req;
ff1d2767
JM
51 struct {
52 u8 timestamp[8];
8a9faf3c
AV
53 __le16 beacon_int;
54 __le16 capab_info;
ff1d2767
JM
55 /* followed by some of SSID, Supported rates,
56 * FH Params, DS Params, CF Params, IBSS Params, TIM */
57 u8 variable[0];
ba2d3587 58 } __packed beacon, probe_resp;
ff1d2767 59 } u;
ba2d3587 60} __packed;
ff1d2767
JM
61
62
63#define IEEE80211_MGMT_HDR_LEN 24
64#define IEEE80211_DATA_HDR3_LEN 24
65#define IEEE80211_DATA_HDR4_LEN 30
66
67
68struct hostap_80211_rx_status {
69 u32 mac_time;
70 u8 signal;
71 u8 noise;
72 u16 rate; /* in 100 kbps */
73};
74
ff1d2767
JM
75/* prism2_rx_80211 'type' argument */
76enum {
77 PRISM2_RX_MONITOR, PRISM2_RX_MGMT, PRISM2_RX_NON_ASSOC,
78 PRISM2_RX_NULLFUNC_ACK
79};
80
81int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
82 struct hostap_80211_rx_status *rx_stats, int type);
83void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
84 struct hostap_80211_rx_status *rx_stats);
85void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
86 struct hostap_80211_rx_status *rx_stats);
87
88void hostap_dump_tx_80211(const char *name, struct sk_buff *skb);
d0cf9c0d
SH
89netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
90 struct net_device *dev);
91netdev_tx_t hostap_mgmt_start_xmit(struct sk_buff *skb,
92 struct net_device *dev);
93netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
94 struct net_device *dev);
ff1d2767
JM
95
96#endif /* HOSTAP_80211_H */