sme.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. * wpa_supplicant - SME
  3. * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef SME_H
  9. #define SME_H
  10. #ifdef CONFIG_SME
  11. void sme_authenticate(struct wpa_supplicant *wpa_s,
  12. struct wpa_bss *bss, struct wpa_ssid *ssid);
  13. void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
  14. const u8 *bssid, u16 auth_type);
  15. void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data);
  16. int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
  17. const u8 *ies, size_t ies_len);
  18. void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
  19. union wpa_event_data *data);
  20. void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
  21. union wpa_event_data *data);
  22. void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
  23. union wpa_event_data *data);
  24. void sme_event_disassoc(struct wpa_supplicant *wpa_s,
  25. struct disassoc_info *info);
  26. void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s, const u8 *sa,
  27. const u8 *da, u16 reason_code);
  28. void sme_sa_query_rx(struct wpa_supplicant *wpa_s, const u8 *sa,
  29. const u8 *data, size_t len);
  30. void sme_state_changed(struct wpa_supplicant *wpa_s);
  31. void sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
  32. const u8 *prev_pending_bssid);
  33. void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s);
  34. void sme_deinit(struct wpa_supplicant *wpa_s);
  35. int sme_proc_obss_scan(struct wpa_supplicant *wpa_s);
  36. void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, int enable);
  37. #else /* CONFIG_SME */
  38. static inline void sme_authenticate(struct wpa_supplicant *wpa_s,
  39. struct wpa_bss *bss,
  40. struct wpa_ssid *ssid)
  41. {
  42. }
  43. static inline void sme_event_auth(struct wpa_supplicant *wpa_s,
  44. union wpa_event_data *data)
  45. {
  46. }
  47. static inline int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
  48. const u8 *ies, size_t ies_len)
  49. {
  50. return -1;
  51. }
  52. static inline void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
  53. union wpa_event_data *data)
  54. {
  55. }
  56. static inline void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
  57. union wpa_event_data *data)
  58. {
  59. }
  60. static inline void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
  61. union wpa_event_data *data)
  62. {
  63. }
  64. static inline void sme_event_disassoc(struct wpa_supplicant *wpa_s,
  65. struct disassoc_info *info)
  66. {
  67. }
  68. static inline void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s,
  69. const u8 *sa, const u8 *da,
  70. u16 reason_code)
  71. {
  72. }
  73. static inline void sme_state_changed(struct wpa_supplicant *wpa_s)
  74. {
  75. }
  76. static inline void
  77. sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
  78. const u8 *prev_pending_bssid)
  79. {
  80. }
  81. static inline void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s)
  82. {
  83. }
  84. static inline void sme_deinit(struct wpa_supplicant *wpa_s)
  85. {
  86. }
  87. static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
  88. {
  89. return 0;
  90. }
  91. static inline void sme_sched_obss_scan(struct wpa_supplicant *wpa_s,
  92. int enable)
  93. {
  94. }
  95. #endif /* CONFIG_SME */
  96. #endif /* SME_H */