hw_features.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_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. #else /* NEED_MLME */
  26. static inline void
  27. hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
  28. size_t num_hw_features)
  29. {
  30. }
  31. static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
  32. {
  33. return -1;
  34. }
  35. static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
  36. {
  37. return -1;
  38. }
  39. static inline const char * hostapd_hw_mode_txt(int mode)
  40. {
  41. return NULL;
  42. }
  43. static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
  44. {
  45. return -1;
  46. }
  47. #endif /* NEED_MLME */
  48. #endif /* HW_FEATURES_H */