wnm_sta.h revision 1.1.1.5 1 1.1 christos /*
2 1.1 christos * IEEE 802.11v WNM related functions and structures
3 1.1 christos * Copyright (c) 2011-2012, Qualcomm Atheros, Inc.
4 1.1 christos *
5 1.1 christos * This software may be distributed under the terms of the BSD license.
6 1.1 christos * See README for more details.
7 1.1 christos */
8 1.1 christos
9 1.1 christos #ifndef WNM_STA_H
10 1.1 christos #define WNM_STA_H
11 1.1 christos
12 1.1.1.2 christos struct measurement_pilot {
13 1.1.1.2 christos u8 measurement_pilot;
14 1.1.1.2 christos u8 subelem_len;
15 1.1.1.2 christos u8 subelems[255];
16 1.1.1.2 christos };
17 1.1.1.2 christos
18 1.1.1.2 christos struct multiple_bssid {
19 1.1.1.2 christos u8 max_bssid_indicator;
20 1.1.1.2 christos u8 subelem_len;
21 1.1.1.2 christos u8 subelems[255];
22 1.1.1.2 christos };
23 1.1.1.2 christos
24 1.1.1.2 christos struct neighbor_report {
25 1.1.1.2 christos u8 bssid[ETH_ALEN];
26 1.1.1.3 christos u32 bssid_info;
27 1.1.1.2 christos u8 regulatory_class;
28 1.1.1.2 christos u8 channel_number;
29 1.1.1.2 christos u8 phy_type;
30 1.1.1.3 christos u8 preference; /* valid if preference_present=1 */
31 1.1.1.3 christos u16 tsf_offset; /* valid if tsf_present=1 */
32 1.1.1.3 christos u16 beacon_int; /* valid if tsf_present=1 */
33 1.1.1.3 christos char country[2]; /* valid if country_present=1 */
34 1.1.1.3 christos u8 rm_capab[5]; /* valid if rm_capab_present=1 */
35 1.1.1.3 christos u16 bearing; /* valid if bearing_present=1 */
36 1.1.1.3 christos u16 rel_height; /* valid if bearing_present=1 */
37 1.1.1.3 christos u32 distance; /* valid if bearing_present=1 */
38 1.1.1.3 christos u64 bss_term_tsf; /* valid if bss_term_present=1 */
39 1.1.1.3 christos u16 bss_term_dur; /* valid if bss_term_present=1 */
40 1.1.1.3 christos unsigned int preference_present:1;
41 1.1.1.3 christos unsigned int tsf_present:1;
42 1.1.1.3 christos unsigned int country_present:1;
43 1.1.1.3 christos unsigned int rm_capab_present:1;
44 1.1.1.3 christos unsigned int bearing_present:1;
45 1.1.1.3 christos unsigned int bss_term_present:1;
46 1.1.1.5 christos unsigned int acceptable:1;
47 1.1.1.5 christos #ifdef CONFIG_MBO
48 1.1.1.5 christos unsigned int is_first:1;
49 1.1.1.5 christos #endif /* CONFIG_MBO */
50 1.1.1.2 christos struct measurement_pilot *meas_pilot;
51 1.1.1.2 christos struct multiple_bssid *mul_bssid;
52 1.1.1.3 christos int freq;
53 1.1.1.2 christos };
54 1.1.1.2 christos
55 1.1 christos
56 1.1 christos int ieee802_11_send_wnmsleep_req(struct wpa_supplicant *wpa_s,
57 1.1 christos u8 action, u16 intval, struct wpabuf *tfs_req);
58 1.1 christos
59 1.1 christos void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
60 1.1.1.2 christos const struct ieee80211_mgmt *mgmt, size_t len);
61 1.1.1.2 christos
62 1.1.1.2 christos int wnm_send_bss_transition_mgmt_query(struct wpa_supplicant *wpa_s,
63 1.1.1.5 christos u8 query_reason,
64 1.1.1.5 christos const char *btm_candidates,
65 1.1.1.5 christos int cand_list);
66 1.1.1.5 christos
67 1.1.1.2 christos void wnm_deallocate_memory(struct wpa_supplicant *wpa_s);
68 1.1.1.5 christos int wnm_send_coloc_intf_report(struct wpa_supplicant *wpa_s, u8 dialog_token,
69 1.1.1.5 christos const struct wpabuf *elems);
70 1.1.1.5 christos void wnm_set_coloc_intf_elems(struct wpa_supplicant *wpa_s,
71 1.1.1.5 christos struct wpabuf *elems);
72 1.1 christos
73 1.1.1.3 christos
74 1.1.1.3 christos #ifdef CONFIG_WNM
75 1.1.1.3 christos
76 1.1.1.3 christos int wnm_scan_process(struct wpa_supplicant *wpa_s, int reply_on_fail);
77 1.1.1.5 christos void wnm_clear_coloc_intf_reporting(struct wpa_supplicant *wpa_s);
78 1.1.1.3 christos
79 1.1.1.3 christos #else /* CONFIG_WNM */
80 1.1.1.3 christos
81 1.1.1.3 christos static inline int wnm_scan_process(struct wpa_supplicant *wpa_s,
82 1.1.1.3 christos int reply_on_fail)
83 1.1.1.3 christos {
84 1.1.1.3 christos return 0;
85 1.1.1.3 christos }
86 1.1.1.3 christos
87 1.1.1.5 christos static inline void wnm_clear_coloc_intf_reporting(struct wpa_supplicant *wpa_s)
88 1.1.1.5 christos {
89 1.1.1.5 christos }
90 1.1.1.5 christos
91 1.1.1.3 christos #endif /* CONFIG_WNM */
92 1.1.1.3 christos
93 1.1 christos #endif /* WNM_STA_H */
94