autoscan.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * WPA Supplicant - auto scan
  3. * Copyright (c) 2012, Intel Corporation. All rights reserved.
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef AUTOSCAN_H
  9. #define AUTOSCAN_H
  10. struct wpa_supplicant;
  11. struct autoscan_ops {
  12. const char *name;
  13. void * (*init)(struct wpa_supplicant *wpa_s, const char *params);
  14. void (*deinit)(void *priv);
  15. int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
  16. };
  17. #ifdef CONFIG_AUTOSCAN
  18. int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan);
  19. void autoscan_deinit(struct wpa_supplicant *wpa_s);
  20. int autoscan_notify_scan(struct wpa_supplicant *wpa_s,
  21. struct wpa_scan_results *scan_res);
  22. #else /* CONFIG_AUTOSCAN */
  23. static inline int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan)
  24. {
  25. return 0;
  26. }
  27. static inline void autoscan_deinit(struct wpa_supplicant *wpa_s)
  28. {
  29. }
  30. static inline int autoscan_notify_scan(struct wpa_supplicant *wpa_s,
  31. struct wpa_scan_results *scan_res)
  32. {
  33. return 0;
  34. }
  35. #endif /* CONFIG_AUTOSCAN */
  36. #endif /* AUTOSCAN_H */