hw_features.h revision 87fd279308af3f806848c8f2ab65ef18c6ac4c30
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#ifdef NEED_AP_MLME
20void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
21			      size_t num_hw_features);
22int hostapd_get_hw_features(struct hostapd_iface *iface);
23int hostapd_select_hw_mode(struct hostapd_iface *iface);
24const char * hostapd_hw_mode_txt(int mode);
25int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
26int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
27int hostapd_check_ht_capab(struct hostapd_iface *iface);
28int hostapd_prepare_rates(struct hostapd_data *hapd,
29			  struct hostapd_hw_modes *mode);
30#else /* NEED_AP_MLME */
31static inline void
32hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
33			 size_t num_hw_features)
34{
35}
36
37static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
38{
39	return -1;
40}
41
42static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
43{
44	return -100;
45}
46
47static inline const char * hostapd_hw_mode_txt(int mode)
48{
49	return NULL;
50}
51
52static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
53{
54	return -1;
55}
56
57static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
58{
59	return 0;
60}
61
62static inline int hostapd_prepare_rates(struct hostapd_data *hapd,
63					struct hostapd_hw_modes *mode)
64{
65	return 0;
66}
67
68#endif /* NEED_AP_MLME */
69
70#endif /* HW_FEATURES_H */
71