sme.h 3.0 KB

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