123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef HW_FEATURES_H
- #define HW_FEATURES_H
- #define HOSTAPD_CHAN_DISABLED 0x00000001
- #define HOSTAPD_CHAN_PASSIVE_SCAN 0x00000002
- #define HOSTAPD_CHAN_NO_IBSS 0x00000004
- #define HOSTAPD_CHAN_RADAR 0x00000008
- struct hostapd_channel_data {
- short chan;
- short freq;
- int flag;
- u8 max_tx_power;
- };
- #define HOSTAPD_RATE_ERP 0x00000001
- #define HOSTAPD_RATE_BASIC 0x00000002
- #define HOSTAPD_RATE_PREAMBLE2 0x00000004
- #define HOSTAPD_RATE_SUPPORTED 0x00000010
- #define HOSTAPD_RATE_OFDM 0x00000020
- #define HOSTAPD_RATE_CCK 0x00000040
- #define HOSTAPD_RATE_MANDATORY 0x00000100
- struct hostapd_rate_data {
- int rate;
- int flags;
- };
- struct hostapd_hw_modes {
- int mode;
- int num_channels;
- struct hostapd_channel_data *channels;
- int num_rates;
- struct hostapd_rate_data *rates;
- };
- #ifdef NEED_MLME
- void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
- size_t num_hw_features);
- int hostapd_get_hw_features(struct hostapd_iface *iface);
- int hostapd_select_hw_mode(struct hostapd_iface *iface);
- const char * hostapd_hw_mode_txt(int mode);
- int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
- int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
- #else
- static inline void
- hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
- size_t num_hw_features)
- {
- }
- static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
- {
- return -1;
- }
- static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
- {
- return -1;
- }
- static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
- {
- return -1;
- }
- #endif
- #endif
|