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 9 #ifndef WNM_STA_H 10 #define WNM_STA_H 11 12 struct measurement_pilot { 13 u8 measurement_pilot; 14 u8 subelem_len; 15 u8 subelems[255]; 16 }; 17 18 struct multiple_bssid { 19 u8 max_bssid_indicator; 20 u8 subelem_len; 21 u8 subelems[255]; 22 }; 23 24 struct neighbor_report { 25 u8 bssid[ETH_ALEN]; 26 u32 bssid_info; 27 u8 regulatory_class; 28 u8 channel_number; 29 u8 phy_type; 30 u8 preference; /* valid if preference_present=1 */ 31 u16 tsf_offset; /* valid if tsf_present=1 */ 32 u16 beacon_int; /* valid if tsf_present=1 */ 33 char country[2]; /* valid if country_present=1 */ 34 u8 rm_capab[5]; /* valid if rm_capab_present=1 */ 35 u16 bearing; /* valid if bearing_present=1 */ 36 u16 rel_height; /* valid if bearing_present=1 */ 37 u32 distance; /* valid if bearing_present=1 */ 38 u64 bss_term_tsf; /* valid if bss_term_present=1 */ 39 u16 bss_term_dur; /* valid if bss_term_present=1 */ 40 unsigned int preference_present:1; 41 unsigned int tsf_present:1; 42 unsigned int country_present:1; 43 unsigned int rm_capab_present:1; 44 unsigned int bearing_present:1; 45 unsigned int bss_term_present:1; 46 unsigned int acceptable:1; 47 #ifdef CONFIG_MBO 48 unsigned int is_first:1; 49 #endif /* CONFIG_MBO */ 50 struct measurement_pilot *meas_pilot; 51 struct multiple_bssid *mul_bssid; 52 int freq; 53 }; 54 55 56 int ieee802_11_send_wnmsleep_req(struct wpa_supplicant *wpa_s, 57 u8 action, u16 intval, struct wpabuf *tfs_req); 58 59 void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s, 60 u8 *sender, u8 *payload, size_t len); 61 62 void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *ie, 63 size_t len); 64 65 size_t wpas_mbo_ie_bss_trans_reject(struct wpa_supplicant *wpa_s, u8 *pos, 66 size_t len, 67 enum mbo_transition_reject_reason reason); 68 69 int wnm_send_bss_transition_mgmt_query(struct wpa_supplicant *wpa_s, 70 u8 query_reason, 71 const char *btm_candidates, 72 int cand_list); 73 74 void wnm_deallocate_memory(struct wpa_supplicant *wpa_s); 75 int wnm_scan_process(struct wpa_supplicant *wpa_s, int reply_on_fail); 76 void wnm_bss_tm_connect(struct wpa_supplicant *wpa_s, 77 struct wpa_bss *bss, char *ssid, 78 int after_new_scan); 79 int wpa_is_bss_tmp_disallowed(struct wpa_supplicant *wpa_s, 80 struct wpa_bss *bss); 81 82 #endif /* WNM_STA_H */ 83