1/*
2 * hostapd / Hardware feature query and different modes
3 * Copyright 2002-2003, Instant802 Networks, Inc.
4 * Copyright 2005-2006, Devicescape Software, Inc.
5 * Copyright (c) 2008-2011, Jouni Malinen <j@w1.fi>
6 *
7 * This software may be distributed under the terms of the BSD license.
8 * See README for more details.
9 */
10
11#ifndef HW_FEATURES_H
12#define HW_FEATURES_H
13
14#ifdef NEED_AP_MLME
15void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
16			      size_t num_hw_features);
17int hostapd_get_hw_features(struct hostapd_iface *iface);
18int hostapd_acs_completed(struct hostapd_iface *iface, int err);
19int hostapd_select_hw_mode(struct hostapd_iface *iface);
20const char * hostapd_hw_mode_txt(int mode);
21int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
22int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
23int hostapd_check_ht_capab(struct hostapd_iface *iface);
24int hostapd_prepare_rates(struct hostapd_iface *iface,
25			  struct hostapd_hw_modes *mode);
26void hostapd_stop_setup_timers(struct hostapd_iface *iface);
27#else /* NEED_AP_MLME */
28static inline void
29hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
30			 size_t num_hw_features)
31{
32}
33
34static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
35{
36	return -1;
37}
38
39static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
40{
41	return -100;
42}
43
44static inline const char * hostapd_hw_mode_txt(int mode)
45{
46	return NULL;
47}
48
49static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
50{
51	return -1;
52}
53
54static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
55{
56	return 0;
57}
58
59static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
60					struct hostapd_hw_modes *mode)
61{
62	return 0;
63}
64
65static inline void hostapd_stop_setup_timers(struct hostapd_iface *iface)
66{
67}
68
69#endif /* NEED_AP_MLME */
70
71#endif /* HW_FEATURES_H */
72