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