blob: d2eb96dd38b942ea3ab96b0631f37cddaae56142 [file] [log] [blame]
Dmitry Shmidt61d9df32012-08-29 16:22:06 -07001/*
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
9#ifndef WNM_STA_H
10#define WNM_STA_H
11
Dmitry Shmidt44c95782013-05-17 09:51:35 -070012struct tsf_info {
Dmitry Shmidt44c95782013-05-17 09:51:35 -070013 u8 tsf_offset[2];
14 u8 beacon_interval[2];
15};
16
17struct condensed_country_string {
Dmitry Shmidt44c95782013-05-17 09:51:35 -070018 u8 country_string[2];
19};
20
21struct bss_transition_candidate {
Dmitry Shmidt44c95782013-05-17 09:51:35 -070022 u8 preference;
23};
24
25struct bss_termination_duration {
Dmitry Shmidtf940fbd2014-04-10 10:23:13 -070026 u8 duration[10];
Dmitry Shmidt44c95782013-05-17 09:51:35 -070027};
28
29struct bearing {
Dmitry Shmidt44c95782013-05-17 09:51:35 -070030 u8 bearing[8];
31};
32
33struct measurement_pilot {
Dmitry Shmidt44c95782013-05-17 09:51:35 -070034 u8 measurement_pilot;
Dmitry Shmidtf940fbd2014-04-10 10:23:13 -070035 u8 subelem_len;
36 u8 subelems[255];
Dmitry Shmidt44c95782013-05-17 09:51:35 -070037};
38
39struct rrm_enabled_capabilities {
Dmitry Shmidtf940fbd2014-04-10 10:23:13 -070040 u8 capabilities[5];
Dmitry Shmidt44c95782013-05-17 09:51:35 -070041};
42
43struct multiple_bssid {
Dmitry Shmidt44c95782013-05-17 09:51:35 -070044 u8 max_bssid_indicator;
Dmitry Shmidtf940fbd2014-04-10 10:23:13 -070045 u8 subelem_len;
46 u8 subelems[255];
Dmitry Shmidt44c95782013-05-17 09:51:35 -070047};
48
49struct neighbor_report {
50 u8 bssid[ETH_ALEN];
51 u8 bssid_information[4];
52 u8 regulatory_class;
53 u8 channel_number;
54 u8 phy_type;
55 struct tsf_info *tsf_info;
56 struct condensed_country_string *con_coun_str;
57 struct bss_transition_candidate *bss_tran_can;
58 struct bss_termination_duration *bss_term_dur;
59 struct bearing *bearing;
60 struct measurement_pilot *meas_pilot;
61 struct rrm_enabled_capabilities *rrm_cap;
62 struct multiple_bssid *mul_bssid;
63};
64
65
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070066int ieee802_11_send_wnmsleep_req(struct wpa_supplicant *wpa_s,
Dmitry Shmidta54fa5f2013-01-15 13:53:35 -080067 u8 action, u16 intval, struct wpabuf *tfs_req);
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070068
69void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -080070 const struct ieee80211_mgmt *mgmt, size_t len);
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070071
Dmitry Shmidt44c95782013-05-17 09:51:35 -070072void wnm_scan_response(struct wpa_supplicant *wpa_s,
73 struct wpa_scan_results *scan_res);
74
75int wnm_send_bss_transition_mgmt_query(struct wpa_supplicant *wpa_s,
76 u8 query_reason);
77void wnm_deallocate_memory(struct wpa_supplicant *wpa_s);
78
Dmitry Shmidt61d9df32012-08-29 16:22:06 -070079#endif /* WNM_STA_H */