Fix an issue where the random number generator's random event injector
[dragonfly.git] / contrib / hostapd-0.5.8 / hw_features.h
blob7e5d443432e8911b8503224157827395845b0655
1 /*
2 * hostapd / Hardware feature query and different modes
3 * Copyright 2002-2003, Instant802 Networks, Inc.
4 * Copyright 2005-2006, Devicescape Software, Inc.
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.
10 * Alternatively, this software may be distributed under the terms of BSD
11 * license.
13 * See README and COPYING for more details.
16 #ifndef HW_FEATURES_H
17 #define HW_FEATURES_H
19 #define HOSTAPD_CHAN_W_SCAN 0x00000001
20 #define HOSTAPD_CHAN_W_ACTIVE_SCAN 0x00000002
21 #define HOSTAPD_CHAN_W_IBSS 0x00000004
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_*) */
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
37 struct hostapd_rate_data {
38 int rate; /* rate in 100 kbps */
39 int flags; /* HOSTAPD_RATE_ flags */
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;
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);
61 #endif /* HW_FEATURES_H */