Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * WPA Supplicant - background scan and roaming interface
  3. * Copyright (c) 2009-2010, 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, struct wpa_scan_results *scan_res);
  24. void (*notify_beacon_loss)(void *priv);
  25. void (*notify_signal_change)(void *priv, int above,
  26. int current_signal,
  27. int current_noise,
  28. int current_txrate);
  29. };
  30. #ifdef CONFIG_BGSCAN
  31. int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
  32. void bgscan_deinit(struct wpa_supplicant *wpa_s);
  33. int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
  34. struct wpa_scan_results *scan_res);
  35. void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
  36. void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
  37. int current_signal, int current_noise,
  38. int current_txrate);
  39. #else /* CONFIG_BGSCAN */
  40. static inline int bgscan_init(struct wpa_supplicant *wpa_s,
  41. struct wpa_ssid *ssid)
  42. {
  43. return 0;
  44. }
  45. static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
  46. {
  47. }
  48. static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
  49. struct wpa_scan_results *scan_res)
  50. {
  51. return 0;
  52. }
  53. static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
  54. {
  55. }
  56. static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
  57. int above, int current_signal,
  58. int current_noise,
  59. int current_txrate)
  60. {
  61. }
  62. #endif /* CONFIG_BGSCAN */
  63. #endif /* BGSCAN_H */