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_check_edmg_capab(struct hostapd_iface *iface);
25int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface);
26int hostapd_prepare_rates(struct hostapd_iface *iface,
27			  struct hostapd_hw_modes *mode);
28void hostapd_stop_setup_timers(struct hostapd_iface *iface);
29int hostapd_hw_skip_mode(struct hostapd_iface *iface,
30			 struct hostapd_hw_modes *mode);
31#else /* NEED_AP_MLME */
32static inline void
33hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
34			 size_t num_hw_features)
35{
36}
37
38static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
39{
40	return -1;
41}
42
43static inline int hostapd_acs_completed(struct hostapd_iface *iface, int err)
44{
45	return -1;
46}
47
48static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
49{
50	return -100;
51}
52
53static inline const char * hostapd_hw_mode_txt(int mode)
54{
55	return "UNKNOWN";
56}
57
58static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
59{
60	return -1;
61}
62
63static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
64{
65	return 0;
66}
67
68static inline int hostapd_check_edmg_capab(struct hostapd_iface *iface)
69{
70	return 0;
71}
72
73static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
74					struct hostapd_hw_modes *mode)
75{
76	return 0;
77}
78
79static inline void hostapd_stop_setup_timers(struct hostapd_iface *iface)
80{
81}
82
83static inline int hostapd_hw_skip_mode(struct hostapd_iface *iface,
84				       struct hostapd_hw_modes *mode)
85{
86	return 0;
87}
88
89static inline int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface)
90{
91	return 0;
92}
93
94#endif /* NEED_AP_MLME */
95
96#endif /* HW_FEATURES_H */
97