blob: abadcd137db1e8b66b1bf9ff8be4177f8ffff0e7 [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 *
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
21void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
22 size_t num_hw_features);
23int hostapd_get_hw_features(struct hostapd_iface *iface);
24int hostapd_select_hw_mode(struct hostapd_iface *iface);
25const char * hostapd_hw_mode_txt(int mode);
26int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
27int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
28int hostapd_check_ht_capab(struct hostapd_iface *iface);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080029int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070030 struct hostapd_hw_modes *mode);
31#else /* NEED_AP_MLME */
32static inline void
33hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
34 size_t num_hw_features)
35{
36}
37
38static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
39{
40 return -1;
41}
42
43static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
44{
Jouni Malinen87fd2792011-05-16 18:35:42 +030045 return -100;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070046}
47
48static inline const char * hostapd_hw_mode_txt(int mode)
49{
50 return NULL;
51}
52
53static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
54{
55 return -1;
56}
57
58static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
59{
60 return 0;
61}
62
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080063static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070064 struct hostapd_hw_modes *mode)
65{
66 return 0;
67}
68
69#endif /* NEED_AP_MLME */
70
71#endif /* HW_FEATURES_H */