blob: dd24f95b2ad82112c6ea5e51aba68fc02794ab61 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * hostapd / Hardware feature query and different modes
3 * Copyright 2002-2003, Instant802 Networks, Inc.
4 * Copyright 2005-2006, Devicescape Software, Inc.
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -08005 * Copyright (c) 2008-2011, Jouni Malinen <j@w1.fi>
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07006 *
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -08007 * This software may be distributed under the terms of the BSD license.
8 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07009 */
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);
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -080018int hostapd_acs_completed(struct hostapd_iface *iface, int err);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070019int 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);
Hai Shalomc3565922019-10-28 11:58:20 -070024int hostapd_check_edmg_capab(struct hostapd_iface *iface);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080025int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070026 struct hostapd_hw_modes *mode);
Dmitry Shmidt7832adb2014-04-29 10:53:02 -070027void hostapd_stop_setup_timers(struct hostapd_iface *iface);
Hai Shalomfdcde762020-04-02 11:19:20 -070028int hostapd_hw_skip_mode(struct hostapd_iface *iface,
29 struct hostapd_hw_modes *mode);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070030#else /* NEED_AP_MLME */
31static inline void
32hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
33 size_t num_hw_features)
34{
35}
36
37static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
38{
39 return -1;
40}
41
Dmitry Shmidt912c6ec2015-03-30 13:16:51 -070042static inline int hostapd_acs_completed(struct hostapd_iface *iface, int err)
43{
44 return -1;
45}
46
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070047static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
48{
Jouni Malinen87fd2792011-05-16 18:35:42 +030049 return -100;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070050}
51
52static inline const char * hostapd_hw_mode_txt(int mode)
53{
Hai Shalomfdcde762020-04-02 11:19:20 -070054 return "UNKNOWN";
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070055}
56
57static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
58{
59 return -1;
60}
61
62static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
63{
64 return 0;
65}
66
Hai Shalomc3565922019-10-28 11:58:20 -070067static inline int hostapd_check_edmg_capab(struct hostapd_iface *iface)
68{
69 return 0;
70}
71
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080072static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070073 struct hostapd_hw_modes *mode)
74{
75 return 0;
76}
77
Dmitry Shmidt7832adb2014-04-29 10:53:02 -070078static inline void hostapd_stop_setup_timers(struct hostapd_iface *iface)
79{
80}
81
Hai Shalomfdcde762020-04-02 11:19:20 -070082static inline int hostapd_hw_skip_mode(struct hostapd_iface *iface,
83 struct hostapd_hw_modes *mode)
84{
85 return 0;
86}
87
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070088#endif /* NEED_AP_MLME */
89
90#endif /* HW_FEATURES_H */