]> git.ipfire.org Git - thirdparty/hostap.git/blob - src/ap/hw_features.h
hostapd: Add AP DFS support
[thirdparty/hostap.git] / src / ap / hw_features.h
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 program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Alternatively, this software may be distributed under the terms of BSD
12 * license.
13 *
14 * See README and COPYING for more details.
15 */
16
17 #ifndef HW_FEATURES_H
18 #define HW_FEATURES_H
19
20 #ifdef NEED_AP_MLME
21 void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
22 size_t num_hw_features);
23 int hostapd_get_hw_features(struct hostapd_iface *iface);
24 int hostapd_select_hw_mode(struct hostapd_iface *iface);
25 const char * hostapd_hw_mode_txt(int mode);
26 int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
27 int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
28 int hostapd_check_ht_capab(struct hostapd_iface *iface);
29 int hostapd_prepare_rates(struct hostapd_iface *iface,
30 struct hostapd_hw_modes *mode);
31 int hostapd_hw_get_channel_flag(struct hostapd_data *hapd, int chan);
32 #else /* NEED_AP_MLME */
33 static inline void
34 hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
35 size_t num_hw_features)
36 {
37 }
38
39 static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
40 {
41 return -1;
42 }
43
44 static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
45 {
46 return -100;
47 }
48
49 static inline const char * hostapd_hw_mode_txt(int mode)
50 {
51 return NULL;
52 }
53
54 static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
55 {
56 return -1;
57 }
58
59 static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
60 {
61 return 0;
62 }
63
64 static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
65 struct hostapd_hw_modes *mode)
66 {
67 return 0;
68 }
69
70 #endif /* NEED_AP_MLME */
71
72 #endif /* HW_FEATURES_H */