bgscan.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * WPA Supplicant - background scan and roaming interface
  3. * Copyright (c) 2009, 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 BGSCAN_H
  15. #define BGSCAN_H
  16. struct wpa_supplicant;
  17. struct wpa_ssid;
  18. struct bgscan_ops {
  19. const char *name;
  20. void * (*init)(struct wpa_supplicant *wpa_s, const char *params,
  21. const struct wpa_ssid *ssid);
  22. void (*deinit)(void *priv);
  23. int (*notify_scan)(void *priv);
  24. void (*notify_beacon_loss)(void *priv);
  25. void (*notify_signal_change)(void *priv);
  26. };
  27. #ifdef CONFIG_BGSCAN
  28. int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
  29. void bgscan_deinit(struct wpa_supplicant *wpa_s);
  30. int bgscan_notify_scan(struct wpa_supplicant *wpa_s);
  31. void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
  32. void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s);
  33. #else /* CONFIG_BGSCAN */
  34. static inline int bgscan_init(struct wpa_supplicant *wpa_s,
  35. struct wpa_ssid *ssid)
  36. {
  37. return 0;
  38. }
  39. static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
  40. {
  41. }
  42. static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s)
  43. {
  44. return 0;
  45. }
  46. static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
  47. {
  48. }
  49. static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s)
  50. {
  51. }
  52. #endif /* CONFIG_BGSCAN */
  53. #endif /* BGSCAN_H */