1e28a4053SRui Paulo /* 2e28a4053SRui Paulo * hostapd / Hardware feature query and different modes 3e28a4053SRui Paulo * Copyright 2002-2003, Instant802 Networks, Inc. 4e28a4053SRui Paulo * Copyright 2005-2006, Devicescape Software, Inc. 5f05cddf9SRui Paulo * Copyright (c) 2008-2011, Jouni Malinen <j@w1.fi> 6e28a4053SRui Paulo * 75b9c547cSRui Paulo * This software may be distributed under the terms of the BSD license. 85b9c547cSRui Paulo * See README for more details. 9e28a4053SRui Paulo */ 10e28a4053SRui Paulo 11e28a4053SRui Paulo #ifndef HW_FEATURES_H 12e28a4053SRui Paulo #define HW_FEATURES_H 13e28a4053SRui Paulo 14e28a4053SRui Paulo #ifdef NEED_AP_MLME 15e28a4053SRui Paulo void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, 16e28a4053SRui Paulo size_t num_hw_features); 17e28a4053SRui Paulo int hostapd_get_hw_features(struct hostapd_iface *iface); 18*a90b9d01SCy Schubert int hostapd_csa_update_hwmode(struct hostapd_iface *iface); 195b9c547cSRui Paulo int hostapd_acs_completed(struct hostapd_iface *iface, int err); 20e28a4053SRui Paulo int hostapd_select_hw_mode(struct hostapd_iface *iface); 21e28a4053SRui Paulo const char * hostapd_hw_mode_txt(int mode); 22e28a4053SRui Paulo int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan); 23e28a4053SRui Paulo int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq); 24e28a4053SRui Paulo int hostapd_check_ht_capab(struct hostapd_iface *iface); 25c1d255d3SCy Schubert int hostapd_check_edmg_capab(struct hostapd_iface *iface); 26c1d255d3SCy Schubert int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface); 27f05cddf9SRui Paulo int hostapd_prepare_rates(struct hostapd_iface *iface, 28f05cddf9SRui Paulo struct hostapd_hw_modes *mode); 295b9c547cSRui Paulo void hostapd_stop_setup_timers(struct hostapd_iface *iface); 30c1d255d3SCy Schubert int hostapd_hw_skip_mode(struct hostapd_iface *iface, 31c1d255d3SCy Schubert struct hostapd_hw_modes *mode); 32*a90b9d01SCy Schubert int hostapd_determine_mode(struct hostapd_iface *iface); 33e28a4053SRui Paulo #else /* NEED_AP_MLME */ 34e28a4053SRui Paulo static inline void 35e28a4053SRui Paulo hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, 36e28a4053SRui Paulo size_t num_hw_features) 37e28a4053SRui Paulo { 38e28a4053SRui Paulo } 39e28a4053SRui Paulo 40e28a4053SRui Paulo static inline int hostapd_get_hw_features(struct hostapd_iface *iface) 41e28a4053SRui Paulo { 42e28a4053SRui Paulo return -1; 43e28a4053SRui Paulo } 44e28a4053SRui Paulo 45*a90b9d01SCy Schubert static inline int hostapd_csa_update_hwmode(struct hostapd_iface *iface) 46*a90b9d01SCy Schubert { 47*a90b9d01SCy Schubert return 0; 48*a90b9d01SCy Schubert } 49*a90b9d01SCy Schubert 50325151a3SRui Paulo static inline int hostapd_acs_completed(struct hostapd_iface *iface, int err) 51325151a3SRui Paulo { 52325151a3SRui Paulo return -1; 53325151a3SRui Paulo } 54325151a3SRui Paulo 55e28a4053SRui Paulo static inline int hostapd_select_hw_mode(struct hostapd_iface *iface) 56e28a4053SRui Paulo { 57f05cddf9SRui Paulo return -100; 58e28a4053SRui Paulo } 59e28a4053SRui Paulo 60e28a4053SRui Paulo static inline const char * hostapd_hw_mode_txt(int mode) 61e28a4053SRui Paulo { 62c1d255d3SCy Schubert return "UNKNOWN"; 63e28a4053SRui Paulo } 64e28a4053SRui Paulo 65e28a4053SRui Paulo static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan) 66e28a4053SRui Paulo { 67e28a4053SRui Paulo return -1; 68e28a4053SRui Paulo } 69e28a4053SRui Paulo 70e28a4053SRui Paulo static inline int hostapd_check_ht_capab(struct hostapd_iface *iface) 71e28a4053SRui Paulo { 72e28a4053SRui Paulo return 0; 73e28a4053SRui Paulo } 74e28a4053SRui Paulo 75c1d255d3SCy Schubert static inline int hostapd_check_edmg_capab(struct hostapd_iface *iface) 76c1d255d3SCy Schubert { 77c1d255d3SCy Schubert return 0; 78c1d255d3SCy Schubert } 79c1d255d3SCy Schubert 80f05cddf9SRui Paulo static inline int hostapd_prepare_rates(struct hostapd_iface *iface, 81f05cddf9SRui Paulo struct hostapd_hw_modes *mode) 82f05cddf9SRui Paulo { 83f05cddf9SRui Paulo return 0; 84f05cddf9SRui Paulo } 85f05cddf9SRui Paulo 865b9c547cSRui Paulo static inline void hostapd_stop_setup_timers(struct hostapd_iface *iface) 875b9c547cSRui Paulo { 885b9c547cSRui Paulo } 895b9c547cSRui Paulo 90c1d255d3SCy Schubert static inline int hostapd_hw_skip_mode(struct hostapd_iface *iface, 91c1d255d3SCy Schubert struct hostapd_hw_modes *mode) 92c1d255d3SCy Schubert { 93c1d255d3SCy Schubert return 0; 94c1d255d3SCy Schubert } 95c1d255d3SCy Schubert 96c1d255d3SCy Schubert static inline int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface) 97c1d255d3SCy Schubert { 98c1d255d3SCy Schubert return 0; 99c1d255d3SCy Schubert } 100c1d255d3SCy Schubert 101*a90b9d01SCy Schubert static inline int hostapd_determine_mode(struct hostapd_iface *iface) 102*a90b9d01SCy Schubert { 103*a90b9d01SCy Schubert return 0; 104*a90b9d01SCy Schubert } 105*a90b9d01SCy Schubert 106e28a4053SRui Paulo #endif /* NEED_AP_MLME */ 107e28a4053SRui Paulo 108e28a4053SRui Paulo #endif /* HW_FEATURES_H */ 109