hw_features.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 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. #ifndef HW_FEATURES_H
  17. #define HW_FEATURES_H
  18. #ifdef NEED_AP_MLME
  19. void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
  20. size_t num_hw_features);
  21. int hostapd_get_hw_features(struct hostapd_iface *iface);
  22. int hostapd_select_hw_mode(struct hostapd_iface *iface);
  23. const char * hostapd_hw_mode_txt(int mode);
  24. int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
  25. int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
  26. int hostapd_check_ht_capab(struct hostapd_iface *iface);
  27. int hostapd_prepare_rates(struct hostapd_iface *iface,
  28. struct hostapd_hw_modes *mode);
  29. #else /* NEED_AP_MLME */
  30. static inline void
  31. hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
  32. size_t num_hw_features)
  33. {
  34. }
  35. static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
  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. #endif /* NEED_AP_MLME */
  61. #endif /* HW_FEATURES_H */