hw_features.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 software may be distributed under the terms of the BSD license.
  8. * See README for more details.
  9. */
  10. #ifndef HW_FEATURES_H
  11. #define HW_FEATURES_H
  12. #ifdef NEED_AP_MLME
  13. void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
  14. size_t num_hw_features);
  15. int hostapd_get_hw_features(struct hostapd_iface *iface);
  16. int hostapd_acs_completed(struct hostapd_iface *iface, int err);
  17. int hostapd_select_hw_mode(struct hostapd_iface *iface);
  18. const char * hostapd_hw_mode_txt(int mode);
  19. int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
  20. int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
  21. int hostapd_check_ht_capab(struct hostapd_iface *iface);
  22. int hostapd_prepare_rates(struct hostapd_iface *iface,
  23. struct hostapd_hw_modes *mode);
  24. void hostapd_stop_setup_timers(struct hostapd_iface *iface);
  25. #else /* NEED_AP_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_acs_completed(struct hostapd_iface *iface, int err)
  36. {
  37. return -1;
  38. }
  39. static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
  40. {
  41. return -100;
  42. }
  43. static inline const char * hostapd_hw_mode_txt(int mode)
  44. {
  45. return NULL;
  46. }
  47. static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
  48. {
  49. return -1;
  50. }
  51. static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
  52. {
  53. return 0;
  54. }
  55. static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
  56. struct hostapd_hw_modes *mode)
  57. {
  58. return 0;
  59. }
  60. static inline void hostapd_stop_setup_timers(struct hostapd_iface *iface)
  61. {
  62. }
  63. #endif /* NEED_AP_MLME */
  64. #endif /* HW_FEATURES_H */