hw_features.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * hostapd / Hardware feature query and different modes
  3. * Copyright 2002-2003, Instant802 Networks, Inc.
  4. * Copyright 2005-2006, Devicescape Software, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * Alternatively, this software may be distributed under the terms of BSD
  11. * license.
  12. *
  13. * See README and COPYING for more details.
  14. */
  15. #ifndef HW_FEATURES_H
  16. #define HW_FEATURES_H
  17. #ifdef NEED_AP_MLME
  18. void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
  19. size_t num_hw_features);
  20. int hostapd_get_hw_features(struct hostapd_iface *iface);
  21. int hostapd_select_hw_mode(struct hostapd_iface *iface);
  22. const char * hostapd_hw_mode_txt(int mode);
  23. int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
  24. int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
  25. int hostapd_check_ht_capab(struct hostapd_iface *iface);
  26. #else /* NEED_AP_MLME */
  27. static inline void
  28. hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
  29. size_t num_hw_features)
  30. {
  31. }
  32. static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
  33. {
  34. return -1;
  35. }
  36. static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
  37. {
  38. return -1;
  39. }
  40. static inline const char * hostapd_hw_mode_txt(int mode)
  41. {
  42. return NULL;
  43. }
  44. static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
  45. {
  46. return -1;
  47. }
  48. static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
  49. {
  50. return 0;
  51. }
  52. #endif /* NEED_AP_MLME */
  53. #endif /* HW_FEATURES_H */