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