xref: /wlan-dirver/qcacld-3.0/components/wmi/inc/wmi_unified_roam_param.h (revision d6dfd790376307ca9b074bdcd67af368fa8731b0)
1 /*
2  * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 /*
19  * This file contains the API definitions for the ROAMING WMI APIs.
20  */
21 
22 #ifndef _WMI_UNIFIED_ROAM_PARAM_H_
23 #define _WMI_UNIFIED_ROAM_PARAM_H_
24 
25 #include <wlan_dlm_public_struct.h>
26 #include <wlan_cm_bss_score_param.h>
27 
28 /**
29  * struct gateway_update_req_param - gateway parameter update request
30  * @request_id: request id
31  * @vdev_id: vdev id
32  * @max_retries: Max ARP/NS retry attempts
33  * @timeout: Retry interval
34  * @ipv4_addr_type: on ipv4 network
35  * @ipv6_addr_type: on ipv6 network
36  * @gw_mac_addr: gateway mac addr
37  * @ipv4_addr: ipv4 addr
38  * @ipv6_addr: ipv6 addr
39  */
40 struct gateway_update_req_param {
41 	uint32_t     request_id;
42 	uint32_t     vdev_id;
43 	uint32_t     max_retries;
44 	uint32_t     timeout;
45 	uint32_t     ipv4_addr_type;
46 	uint32_t     ipv6_addr_type;
47 	struct qdf_mac_addr  gw_mac_addr;
48 	uint8_t      ipv4_addr[QDF_IPV4_ADDR_SIZE];
49 	uint8_t      ipv6_addr[QDF_IPV6_ADDR_SIZE];
50 };
51 
52 /**
53  * struct rssi_monitor_param - rssi monitoring
54  * @request_id: request id
55  * @vdev_id: vdev id
56  * @min_rssi: minimum rssi
57  * @max_rssi: maximum rssi
58  * @control: flag to indicate start or stop
59  */
60 struct rssi_monitor_param {
61 	uint32_t request_id;
62 	uint32_t vdev_id;
63 	int8_t   min_rssi;
64 	int8_t   max_rssi;
65 	bool     control;
66 };
67 
68 #define WMI_CFG_VALID_CHANNEL_LIST_LEN    100
69 /* Occupied channel list remains static */
70 #define WMI_CHANNEL_LIST_STATIC                   1
71 /* Occupied channel list can be learnt after init */
72 #define WMI_CHANNEL_LIST_DYNAMIC_INIT             2
73 /* Occupied channel list can be learnt after flush */
74 #define WMI_CHANNEL_LIST_DYNAMIC_FLUSH            3
75 /* Occupied channel list can be learnt after update */
76 #define WMI_CHANNEL_LIST_DYNAMIC_UPDATE           4
77 
78 /**
79  * struct plm_req_params - plm req parameter
80  * @diag_token: Dialog token
81  * @meas_token: measurement token
82  * @num_bursts: total number of bursts
83  * @burst_int: burst interval in seconds
84  * @meas_duration:in TU's,STA goes off-ch
85  * @burst_len: no of times the STA should cycle through PLM ch list
86  * @desired_tx_pwr: desired tx power
87  * @mac_addr: MC dest addr
88  * @plm_num_ch: channel numbers
89  * @plm_ch_freq_list: channel frequency list
90  * @vdev_id: vdev id
91  * @enable:  enable/disable
92  */
93 struct plm_req_params {
94 	uint16_t diag_token;
95 	uint16_t meas_token;
96 	uint16_t num_bursts;
97 	uint16_t burst_int;
98 	uint16_t meas_duration;
99 	/* no of times the STA should cycle through PLM ch list */
100 	uint8_t burst_len;
101 	int8_t desired_tx_pwr;
102 	struct qdf_mac_addr mac_addr;
103 	/* no of channels */
104 	uint8_t plm_num_ch;
105 	/* channel frequency list */
106 	uint32_t plm_ch_freq_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
107 	uint8_t vdev_id;
108 	bool enable;
109 };
110 
111 /**
112  * struct wmi_limit_off_chan_param - limit off channel parameters
113  * @vdev_id: vdev id
114  * @status: status of the command (enable/disable)
115  * @max_offchan_time: max off channel time
116  * @rest_time: home channel time
117  * @skip_dfs_chans: skip dfs channels during scan
118  */
119 struct wmi_limit_off_chan_param {
120 	uint32_t vdev_id;
121 	bool status;
122 	uint32_t max_offchan_time;
123 	uint32_t rest_time;
124 	bool skip_dfs_chans;
125 };
126 
127 #define WMI_MAX_HLP_IE_LEN 2048
128 /**
129  * struct hlp_params - HLP info params
130  * @vdev_id: vdev id
131  * @hlp_ie_len: HLP IE length
132  * @hlp_ie: HLP IE
133  */
134 struct hlp_params {
135 	uint8_t vdev_id;
136 	uint32_t  hlp_ie_len;
137 	uint8_t hlp_ie[WMI_MAX_HLP_IE_LEN];
138 };
139 
140 /**
141  * struct wmi_roam_auth_status_params - WPA3 roam auth response status
142  * parameters
143  * @vdev_id: Vdev on which roam preauth is happening
144  * @preauth_status: Status of the Auth response.
145  *      IEEE80211_STATUS_SUCCESS(0) for success. Corresponding
146  *      IEEE80211 failure status code for failure.
147  *
148  * @bssid: Candidate BSSID
149  * @pmkid: PMKID derived for the auth
150  */
151 struct wmi_roam_auth_status_params {
152 	uint32_t vdev_id;
153 	uint32_t preauth_status;
154 	struct qdf_mac_addr bssid;
155 	uint8_t pmkid[PMKID_LEN];
156 };
157 
158 /**
159  * struct wmi_invoke_neighbor_report_params - Invoke neighbor report request
160  *	from IW to FW
161  * @vdev_id: vdev id
162  * @send_resp_to_host: bool to send response to host or not
163  * @ssid: ssid given from the IW command
164  */
165 struct wmi_invoke_neighbor_report_params {
166 	uint32_t vdev_id;
167 	uint32_t send_resp_to_host;
168 	struct wlan_ssid ssid;
169 };
170 
171 /**
172  * struct set_pcl_cmd_params  - Set PCL command params
173  * @vdev_id: Vdev id
174  * @weights: PCL weights
175  */
176 struct set_pcl_cmd_params {
177 	uint8_t vdev_id;
178 	struct wmi_pcl_chan_weights *weights;
179 };
180 #endif /* _WMI_UNIFIED_ROAM_PARAM_H_ */
181