hw_features.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. #else /* NEED_AP_MLME */
  25. static inline void
  26. hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
  27. size_t num_hw_features)
  28. {
  29. }
  30. static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
  31. {
  32. return -1;
  33. }
  34. static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
  35. {
  36. return -100;
  37. }
  38. static inline const char * hostapd_hw_mode_txt(int mode)
  39. {
  40. return NULL;
  41. }
  42. static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
  43. {
  44. return -1;
  45. }
  46. static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
  47. {
  48. return 0;
  49. }
  50. static inline int hostapd_prepare_rates(struct hostapd_iface *iface,
  51. struct hostapd_hw_modes *mode)
  52. {
  53. return 0;
  54. }
  55. #endif /* NEED_AP_MLME */
  56. #endif /* HW_FEATURES_H */