sme.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
  38. union wpa_event_data *data);
  39. void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
  40. const u8 *auth_frame, size_t len);
  41. #else /* CONFIG_SME */
  42. static inline void sme_authenticate(struct wpa_supplicant *wpa_s,
  43. struct wpa_bss *bss,
  44. struct wpa_ssid *ssid)
  45. {
  46. }
  47. static inline void sme_event_auth(struct wpa_supplicant *wpa_s,
  48. union wpa_event_data *data)
  49. {
  50. }
  51. static inline int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
  52. const u8 *ies, size_t ies_len)
  53. {
  54. return -1;
  55. }
  56. static inline void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
  57. union wpa_event_data *data)
  58. {
  59. }
  60. static inline void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
  61. union wpa_event_data *data)
  62. {
  63. }
  64. static inline void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
  65. union wpa_event_data *data)
  66. {
  67. }
  68. static inline void sme_event_disassoc(struct wpa_supplicant *wpa_s,
  69. struct disassoc_info *info)
  70. {
  71. }
  72. static inline void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s,
  73. const u8 *sa, const u8 *da,
  74. u16 reason_code)
  75. {
  76. }
  77. static inline void sme_state_changed(struct wpa_supplicant *wpa_s)
  78. {
  79. }
  80. static inline void
  81. sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
  82. const u8 *prev_pending_bssid)
  83. {
  84. }
  85. static inline void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s)
  86. {
  87. }
  88. static inline void sme_deinit(struct wpa_supplicant *wpa_s)
  89. {
  90. }
  91. static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
  92. {
  93. return 0;
  94. }
  95. static inline void sme_sched_obss_scan(struct wpa_supplicant *wpa_s,
  96. int enable)
  97. {
  98. }
  99. static inline void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
  100. union wpa_event_data *data)
  101. {
  102. }
  103. static inline void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
  104. const u8 *auth_frame, size_t len)
  105. {
  106. }
  107. #endif /* CONFIG_SME */
  108. #endif /* SME_H */