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