]>
Commit | Line | Data |
---|---|---|
9755ee17 AF |
1 | /* |
2 | * IEEE 802.11 driver (80211.o) -- hostapd interface | |
3 | * Copyright 2002-2004, Instant802 Networks, Inc. | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License version 2 as | |
7 | * published by the Free Software Foundation. | |
8 | */ | |
9 | ||
10 | #ifndef D80211_COMMON_H | |
11 | #define D80211_COMMON_H | |
12 | ||
13 | #include <linux/types.h> | |
14 | ||
15 | /* | |
16 | * This is common header information with user space. It is used on all | |
17 | * frames sent to wlan#ap interface. | |
18 | */ | |
19 | ||
20 | #define IEEE80211_FI_VERSION 0x80211001 | |
21 | ||
22 | struct ieee80211_frame_info { | |
23 | u32 version; | |
24 | u32 length; | |
25 | u64 mactime; | |
26 | u64 hosttime; | |
27 | u32 phytype; | |
28 | u32 channel; | |
29 | u32 datarate; | |
30 | u32 antenna; | |
31 | u32 priority; | |
32 | u32 ssi_type; | |
33 | u32 ssi_signal; | |
34 | u32 ssi_noise; | |
35 | u32 preamble; | |
36 | u32 encoding; | |
37 | ||
38 | /* Note: this structure is otherwise identical to capture format used | |
39 | * in linux-wlan-ng, but this additional field is used to provide meta | |
40 | * data about the frame to hostapd. This was the easiest method for | |
41 | * providing this information, but this might change in the future. */ | |
42 | u32 msg_type; | |
43 | } __attribute__ ((packed)); | |
44 | ||
45 | ||
46 | enum ieee80211_msg_type { | |
47 | ieee80211_msg_normal = 0, | |
48 | ieee80211_msg_tx_callback_ack = 1, | |
49 | ieee80211_msg_tx_callback_fail = 2, | |
50 | ieee80211_msg_passive_scan = 3, | |
51 | ieee80211_msg_wep_frame_unknown_key = 4, | |
52 | ieee80211_msg_michael_mic_failure = 5, | |
53 | ieee80211_msg_monitor = 6, | |
54 | ieee80211_msg_sta_not_assoc = 7, | |
55 | ieee80211_msg_set_aid_for_sta = 8 /* used by Intersil MVC driver */, | |
56 | ieee80211_msg_key_threshold_notification = 9, | |
57 | ieee80211_msg_radar = 11, | |
58 | }; | |
59 | ||
60 | struct ieee80211_msg_set_aid_for_sta { | |
61 | char sta_address[ETH_ALEN]; | |
62 | u16 aid; | |
63 | }; | |
64 | ||
65 | struct ieee80211_msg_key_notification { | |
66 | int tx_rx_count; | |
67 | char ifname[IFNAMSIZ]; | |
68 | u8 addr[ETH_ALEN]; /* ff:ff:ff:ff:ff:ff for broadcast keys */ | |
69 | }; | |
70 | ||
71 | ||
72 | enum ieee80211_phytype { | |
73 | ieee80211_phytype_fhss_dot11_97 = 1, | |
74 | ieee80211_phytype_dsss_dot11_97 = 2, | |
75 | ieee80211_phytype_irbaseband = 3, | |
76 | ieee80211_phytype_dsss_dot11_b = 4, | |
77 | ieee80211_phytype_pbcc_dot11_b = 5, | |
78 | ieee80211_phytype_ofdm_dot11_g = 6, | |
79 | ieee80211_phytype_pbcc_dot11_g = 7, | |
80 | ieee80211_phytype_ofdm_dot11_a = 8, | |
81 | ieee80211_phytype_dsss_dot11_turbog = 255, | |
82 | ieee80211_phytype_dsss_dot11_turbo = 256, | |
83 | }; | |
84 | ||
85 | enum ieee80211_ssi_type { | |
86 | ieee80211_ssi_none = 0, | |
87 | ieee80211_ssi_norm = 1, /* normalized, 0-1000 */ | |
88 | ieee80211_ssi_dbm = 2, | |
89 | ieee80211_ssi_raw = 3, /* raw SSI */ | |
90 | }; | |
91 | ||
92 | struct ieee80211_radar_info { | |
93 | int channel; | |
94 | int radar; | |
95 | int radar_type; | |
96 | }; | |
97 | ||
98 | #endif /* D80211_COMMON_H */ |