Add HAMMER support to the installer
[dragonfly.git] / contrib / hostapd-0.5.8 / hw_features.h
1 /*
2  * hostapd / Hardware feature query and different modes
3  * Copyright 2002-2003, Instant802 Networks, Inc.
4  * Copyright 2005-2006, Devicescape Software, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * Alternatively, this software may be distributed under the terms of BSD
11  * license.
12  *
13  * See README and COPYING for more details.
14  */
15
16 #ifndef HW_FEATURES_H
17 #define HW_FEATURES_H
18
19 #define HOSTAPD_CHAN_W_SCAN 0x00000001
20 #define HOSTAPD_CHAN_W_ACTIVE_SCAN 0x00000002
21 #define HOSTAPD_CHAN_W_IBSS 0x00000004
22
23 struct hostapd_channel_data {
24         short chan; /* channel number (IEEE 802.11) */
25         short freq; /* frequency in MHz */
26         int flag; /* flag for hostapd use (HOSTAPD_CHAN_*) */
27 };
28
29 #define HOSTAPD_RATE_ERP 0x00000001
30 #define HOSTAPD_RATE_BASIC 0x00000002
31 #define HOSTAPD_RATE_PREAMBLE2 0x00000004
32 #define HOSTAPD_RATE_SUPPORTED 0x00000010
33 #define HOSTAPD_RATE_OFDM 0x00000020
34 #define HOSTAPD_RATE_CCK 0x00000040
35 #define HOSTAPD_RATE_MANDATORY 0x00000100
36
37 struct hostapd_rate_data {
38         int rate; /* rate in 100 kbps */
39         int flags; /* HOSTAPD_RATE_ flags */
40 };
41
42 struct hostapd_hw_modes {
43         int mode;
44         int num_channels;
45         struct hostapd_channel_data *channels;
46         int num_rates;
47         struct hostapd_rate_data *rates;
48 };
49
50
51 void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
52                               size_t num_hw_features);
53 int hostapd_get_hw_features(struct hostapd_iface *iface);
54 int hostapd_select_hw_mode_start(struct hostapd_iface *iface,
55                                  hostapd_iface_cb cb);
56 int hostapd_select_hw_mode_stop(struct hostapd_iface *iface);
57 const char * hostapd_hw_mode_txt(int mode);
58 int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
59 int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
60
61 #endif /* HW_FEATURES_H */