wps_supplicant.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * wpa_supplicant / WPS integration
  3. * Copyright (c) 2008, Jouni Malinen <j@w1.fi>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef WPS_SUPPLICANT_H
  15. #define WPS_SUPPLICANT_H
  16. #ifdef CONFIG_WPS
  17. int wpas_wps_init(struct wpa_supplicant *wpa_s);
  18. void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
  19. int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
  20. u8 wpas_wps_get_req_type(struct wpa_ssid *ssid);
  21. int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid);
  22. int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
  23. const char *pin);
  24. int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
  25. const char *pin);
  26. int wpas_wps_ssid_bss_match(struct wpa_ssid *ssid, struct wpa_scan_res *bss);
  27. int wpas_wps_ssid_wildcard_ok(struct wpa_ssid *ssid, struct wpa_scan_res *bss);
  28. int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
  29. struct wpa_scan_res *selected,
  30. struct wpa_ssid *ssid);
  31. void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
  32. #else /* CONFIG_WPS */
  33. static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
  34. {
  35. return 0;
  36. }
  37. static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
  38. {
  39. }
  40. static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
  41. {
  42. return 0;
  43. }
  44. static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
  45. {
  46. return 0;
  47. }
  48. static inline int wpas_wps_ssid_bss_match(struct wpa_ssid *ssid,
  49. struct wpa_scan_res *bss)
  50. {
  51. return -1;
  52. }
  53. static inline int wpas_wps_ssid_wildcard_ok(struct wpa_ssid *ssid,
  54. struct wpa_scan_res *bss)
  55. {
  56. return 0;
  57. }
  58. static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
  59. struct wpa_scan_res *selected,
  60. struct wpa_ssid *ssid)
  61. {
  62. return 0;
  63. }
  64. static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
  65. {
  66. }
  67. #endif /* CONFIG_WPS */
  68. #endif /* WPS_SUPPLICANT_H */