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