Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * hostapd / Hardware feature query and different modes |
| 3 | * Copyright 2002-2003, Instant802 Networks, Inc. |
| 4 | * Copyright 2005-2006, Devicescape Software, Inc. |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 5 | * Copyright (c) 2008-2011, Jouni Malinen <j@w1.fi> |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 6 | * |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 7 | * This software may be distributed under the terms of the BSD license. |
| 8 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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); |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 18 | int hostapd_acs_completed(struct hostapd_iface *iface, int err); |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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); |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 24 | int hostapd_check_edmg_capab(struct hostapd_iface *iface); |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 25 | int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface); |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 26 | int hostapd_prepare_rates(struct hostapd_iface *iface, |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 27 | struct hostapd_hw_modes *mode); |
Dmitry Shmidt | 7832adb | 2014-04-29 10:53:02 -0700 | [diff] [blame] | 28 | void hostapd_stop_setup_timers(struct hostapd_iface *iface); |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 29 | int hostapd_hw_skip_mode(struct hostapd_iface *iface, |
| 30 | struct hostapd_hw_modes *mode); |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 31 | #else /* NEED_AP_MLME */ |
| 32 | static inline void |
| 33 | hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, |
| 34 | size_t num_hw_features) |
| 35 | { |
| 36 | } |
| 37 | |
| 38 | static inline int hostapd_get_hw_features(struct hostapd_iface *iface) |
| 39 | { |
| 40 | return -1; |
| 41 | } |
| 42 | |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 43 | static inline int hostapd_acs_completed(struct hostapd_iface *iface, int err) |
| 44 | { |
| 45 | return -1; |
| 46 | } |
| 47 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 48 | static inline int hostapd_select_hw_mode(struct hostapd_iface *iface) |
| 49 | { |
Jouni Malinen | 87fd279 | 2011-05-16 18:35:42 +0300 | [diff] [blame] | 50 | return -100; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | static inline const char * hostapd_hw_mode_txt(int mode) |
| 54 | { |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 55 | return "UNKNOWN"; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan) |
| 59 | { |
| 60 | return -1; |
| 61 | } |
| 62 | |
| 63 | static inline int hostapd_check_ht_capab(struct hostapd_iface *iface) |
| 64 | { |
| 65 | return 0; |
| 66 | } |
| 67 | |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 68 | static inline int hostapd_check_edmg_capab(struct hostapd_iface *iface) |
| 69 | { |
| 70 | return 0; |
| 71 | } |
| 72 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 73 | static inline int hostapd_prepare_rates(struct hostapd_iface *iface, |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 74 | struct hostapd_hw_modes *mode) |
| 75 | { |
| 76 | return 0; |
| 77 | } |
| 78 | |
Dmitry Shmidt | 7832adb | 2014-04-29 10:53:02 -0700 | [diff] [blame] | 79 | static inline void hostapd_stop_setup_timers(struct hostapd_iface *iface) |
| 80 | { |
| 81 | } |
| 82 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 83 | static inline int hostapd_hw_skip_mode(struct hostapd_iface *iface, |
| 84 | struct hostapd_hw_modes *mode) |
| 85 | { |
| 86 | return 0; |
| 87 | } |
| 88 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 89 | static inline int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface) |
| 90 | { |
| 91 | return 0; |
| 92 | } |
| 93 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 94 | #endif /* NEED_AP_MLME */ |
| 95 | |
| 96 | #endif /* HW_FEATURES_H */ |