wnm_sta.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * IEEE 802.11v WNM related functions and structures
  3. * Copyright (c) 2011-2012, Qualcomm Atheros, Inc.
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef WNM_STA_H
  9. #define WNM_STA_H
  10. struct measurement_pilot {
  11. u8 measurement_pilot;
  12. u8 subelem_len;
  13. u8 subelems[255];
  14. };
  15. struct multiple_bssid {
  16. u8 max_bssid_indicator;
  17. u8 subelem_len;
  18. u8 subelems[255];
  19. };
  20. struct neighbor_report {
  21. u8 bssid[ETH_ALEN];
  22. u32 bssid_info;
  23. u8 regulatory_class;
  24. u8 channel_number;
  25. u8 phy_type;
  26. u8 preference; /* valid if preference_present=1 */
  27. u16 tsf_offset; /* valid if tsf_present=1 */
  28. u16 beacon_int; /* valid if tsf_present=1 */
  29. char country[2]; /* valid if country_present=1 */
  30. u8 rm_capab[5]; /* valid if rm_capab_present=1 */
  31. u16 bearing; /* valid if bearing_present=1 */
  32. u16 rel_height; /* valid if bearing_present=1 */
  33. u32 distance; /* valid if bearing_present=1 */
  34. u64 bss_term_tsf; /* valid if bss_term_present=1 */
  35. u16 bss_term_dur; /* valid if bss_term_present=1 */
  36. unsigned int preference_present:1;
  37. unsigned int tsf_present:1;
  38. unsigned int country_present:1;
  39. unsigned int rm_capab_present:1;
  40. unsigned int bearing_present:1;
  41. unsigned int bss_term_present:1;
  42. struct measurement_pilot *meas_pilot;
  43. struct multiple_bssid *mul_bssid;
  44. };
  45. int ieee802_11_send_wnmsleep_req(struct wpa_supplicant *wpa_s,
  46. u8 action, u16 intval, struct wpabuf *tfs_req);
  47. void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
  48. const struct ieee80211_mgmt *mgmt, size_t len);
  49. int wnm_send_bss_transition_mgmt_query(struct wpa_supplicant *wpa_s,
  50. u8 query_reason);
  51. void wnm_deallocate_memory(struct wpa_supplicant *wpa_s);
  52. #ifdef CONFIG_WNM
  53. int wnm_scan_process(struct wpa_supplicant *wpa_s);
  54. #else /* CONFIG_WNM */
  55. static inline int wnm_scan_process(struct wpa_supplicant *wpa_s)
  56. {
  57. return 0;
  58. }
  59. #endif /* CONFIG_WNM */
  60. #endif /* WNM_STA_H */