blob: 73663d0af051aa21720324a4f7179384462c0100 [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);
Sunil Ravi2a14cf12023-11-21 00:54:38 +000018int hostapd_csa_update_hwmode(struct hostapd_iface *iface);
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -080019int hostapd_acs_completed(struct hostapd_iface *iface, int err);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070020int hostapd_select_hw_mode(struct hostapd_iface *iface);
21const char * hostapd_hw_mode_txt(int mode);
22int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
23int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
24int hostapd_check_ht_capab(struct hostapd_iface *iface);
Hai Shalomc3565922019-10-28 11:58:20 -070025int hostapd_check_edmg_capab(struct hostapd_iface *iface);
Hai Shalom60840252021-02-19 19:02:11 -080026int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080027int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070028 struct hostapd_hw_modes *mode);
Dmitry Shmidt7832adb2014-04-29 10:53:02 -070029void hostapd_stop_setup_timers(struct hostapd_iface *iface);
Hai Shalomfdcde762020-04-02 11:19:20 -070030int hostapd_hw_skip_mode(struct hostapd_iface *iface,
31 struct hostapd_hw_modes *mode);
Sunil Ravi2a14cf12023-11-21 00:54:38 +000032int hostapd_determine_mode(struct hostapd_iface *iface);
Sunil Ravic0f5d412024-09-11 22:12:49 +000033void hostapd_free_multi_hw_info(struct hostapd_multi_hw_info *multi_hw_info);
34int hostapd_set_current_hw_info(struct hostapd_iface *iface, int oper_freq);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070035#else /* NEED_AP_MLME */
36static inline void
37hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
38 size_t num_hw_features)
39{
40}
41
42static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
43{
44 return -1;
45}
46
Sunil Ravi2a14cf12023-11-21 00:54:38 +000047static inline int hostapd_csa_update_hwmode(struct hostapd_iface *iface)
48{
49 return 0;
50}
51
Dmitry Shmidt912c6ec2015-03-30 13:16:51 -070052static inline int hostapd_acs_completed(struct hostapd_iface *iface, int err)
53{
54 return -1;
55}
56
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070057static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
58{
Jouni Malinen87fd2792011-05-16 18:35:42 +030059 return -100;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070060}
61
62static inline const char * hostapd_hw_mode_txt(int mode)
63{
Hai Shalomfdcde762020-04-02 11:19:20 -070064 return "UNKNOWN";
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070065}
66
67static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
68{
69 return -1;
70}
71
72static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
73{
74 return 0;
75}
76
Hai Shalomc3565922019-10-28 11:58:20 -070077static inline int hostapd_check_edmg_capab(struct hostapd_iface *iface)
78{
79 return 0;
80}
81
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080082static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070083 struct hostapd_hw_modes *mode)
84{
85 return 0;
86}
87
Dmitry Shmidt7832adb2014-04-29 10:53:02 -070088static inline void hostapd_stop_setup_timers(struct hostapd_iface *iface)
89{
90}
91
Hai Shalomfdcde762020-04-02 11:19:20 -070092static inline int hostapd_hw_skip_mode(struct hostapd_iface *iface,
93 struct hostapd_hw_modes *mode)
94{
95 return 0;
96}
97
Hai Shalom60840252021-02-19 19:02:11 -080098static inline int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface)
99{
100 return 0;
101}
102
Sunil Ravi2a14cf12023-11-21 00:54:38 +0000103static inline int hostapd_determine_mode(struct hostapd_iface *iface)
104{
105 return 0;
106}
107
Sunil Ravic0f5d412024-09-11 22:12:49 +0000108static inline
109void hostapd_free_multi_hw_info(struct hostapd_multi_hw_info *multi_hw_info)
110{
111}
112
113static inline int hostapd_set_current_hw_info(struct hostapd_iface *iface,
114 u32 oper_freq)
115{
116 return 0;
117}
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700118#endif /* NEED_AP_MLME */
119
120#endif /* HW_FEATURES_H */