blob: 783ae5e12642187a82b874ff2dceb94ce75e9051 [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);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080024int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070025 struct hostapd_hw_modes *mode);
26#else /* NEED_AP_MLME */
27static inline void
28hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
29 size_t num_hw_features)
30{
31}
32
33static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
34{
35 return -1;
36}
37
38static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
39{
Jouni Malinen87fd2792011-05-16 18:35:42 +030040 return -100;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070041}
42
43static inline const char * hostapd_hw_mode_txt(int mode)
44{
45 return NULL;
46}
47
48static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
49{
50 return -1;
51}
52
53static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
54{
55 return 0;
56}
57
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080058static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070059 struct hostapd_hw_modes *mode)
60{
61 return 0;
62}
63
64#endif /* NEED_AP_MLME */
65
66#endif /* HW_FEATURES_H */