blob: 8a27418d590fe126593f89fb0dd2674899555ac6 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Ashish Kumar Dhanotiya443d31f2017-10-13 12:41:19 +05302 * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080019#if !defined(WLAN_HDD_ASSOC_H__)
20#define WLAN_HDD_ASSOC_H__
21
22/**
23 * DOC: wlan_hdd_assoc.h
24 *
25 */
26
27/* Include files */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080028#include <sme_api.h>
29#include <wlan_defs.h>
Dhanashri Atreb08959a2016-03-01 17:28:03 -080030#include "cdp_txrx_peer_ops.h"
Anurag Chouhan5de8d172016-07-13 14:44:28 +053031#include <net/cfg80211.h>
32#include <linux/ieee80211.h>
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080033
34/* Preprocessor Definitions and Constants */
35#ifdef FEATURE_WLAN_TDLS
36#define HDD_MAX_NUM_TDLS_STA 8
37#define HDD_MAX_NUM_TDLS_STA_P_UAPSD_OFFCHAN 1
38#define TDLS_STA_INDEX_VALID(staId) \
Nishank Aggarwal4dbbc912017-05-05 14:38:24 +053039 (((staId) >= 0) && ((staId) < 0xFF))
Bala Venkatesh110b03e2018-07-10 16:02:08 +053040#else
41#define HDD_MAX_NUM_TDLS_STA 0
42
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080043#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080044/* Timeout (in ms) for Link to Up before Registering Station */
45#define ASSOC_LINKUP_TIMEOUT 60
46
Rajeev Kumar8e3e2832015-11-06 16:02:54 -080047/* Timeout in ms for peer info request commpletion */
48#define IBSS_PEER_INFO_REQ_TIMOEUT 1000
49
Naveen Rawatf28315c2016-06-29 18:06:02 -070050#define INVALID_PEER_IDX -1
51
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080052/**
Deepak Dhamdheref16015f2016-06-01 14:28:09 -070053 * enum eConnectionState - connection state values at HDD
54 * @eConnectionState_NotConnected: Not associated in Infra or participating in
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080055 * in an IBSS / Ad-hoc network
56 * @eConnectionState_Connecting: While connection in progress
57 * @eConnectionState_Associated: Associated in an Infrastructure network
58 * @eConnectionState_IbssDisconnected: Participating in an IBSS network though
59 * disconnected (no partner stations in the IBSS)
60 * @eConnectionState_IbssConnected: Participating in an IBSS network with
61 * partner stations also present
Deepak Dhamdheref16015f2016-06-01 14:28:09 -070062 * @eConnectionState_Disconnecting: Disconnecting in an Infrastructure network.
63 * @eConnectionState_NdiDisconnected: NDI in disconnected state - no peers
64 * @eConnectionState_NdiConnected: NDI in connected state - at least one peer
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080065 */
66typedef enum {
67 eConnectionState_NotConnected,
68 eConnectionState_Connecting,
69 eConnectionState_Associated,
70 eConnectionState_IbssDisconnected,
71 eConnectionState_IbssConnected,
Deepak Dhamdheref16015f2016-06-01 14:28:09 -070072 eConnectionState_Disconnecting,
73 eConnectionState_NdiDisconnected,
74 eConnectionState_NdiConnected,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080075} eConnectionState;
76
77/**
Srinivas Girigowda72136692017-03-25 15:14:01 -070078 * enum peer_status - Peer status
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080079 * @ePeerConnected: peer connected
80 * @ePeerDisconnected: peer disconnected
81 */
Srinivas Girigowda72136692017-03-25 15:14:01 -070082enum peer_status {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080083 ePeerConnected = 1,
84 ePeerDisconnected
Srinivas Girigowda72136692017-03-25 15:14:01 -070085};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080086
87/**
Anurag Chouhan5de8d172016-07-13 14:44:28 +053088 * struct hdd_conn_flag - connection flags
89 * @ht_present: ht element present or not
90 * @vht_present: vht element present or not
91 * @hs20_present: hs20 element present or not
Anurag Chouhand939d3d2016-07-20 17:45:48 +053092 * @ht_op_present: ht operation present or not
93 * @vht_op_present: vht operation present or not
Anurag Chouhan5de8d172016-07-13 14:44:28 +053094 */
95struct hdd_conn_flag {
96 uint8_t ht_present:1;
97 uint8_t vht_present:1;
98 uint8_t hs20_present:1;
99 uint8_t ht_op_present:1;
100 uint8_t vht_op_present:1;
101 uint8_t reserved:3;
102};
103
104/*defines for tx_BF_cap_info */
105#define TX_BF_CAP_INFO_TX_BF 0x00000001
106#define TX_BF_CAP_INFO_RX_STAG_RED_SOUNDING 0x00000002
107#define TX_BF_CAP_INFO_TX_STAG_RED_SOUNDING 0x00000004
108#define TX_BF_CAP_INFO_RX_ZFL 0x00000008
109#define TX_BF_CAP_INFO_TX_ZFL 0x00000010
110#define TX_BF_CAP_INFO_IMP_TX_BF 0x00000020
111#define TX_BF_CAP_INFO_CALIBRATION 0x000000c0
112#define TX_BF_CAP_INFO_CALIBRATION_SHIFT 6
113#define TX_BF_CAP_INFO_EXP_CSIT_BF 0x00000100
114#define TX_BF_CAP_INFO_EXP_UNCOMP_STEER_MAT 0x00000200
115#define TX_BF_CAP_INFO_EXP_BF_CSI_FB 0x00001c00
116#define TX_BF_CAP_INFO_EXP_BF_CSI_FB_SHIFT 10
117#define TX_BF_CAP_INFO_EXP_UNCMP_STEER_MAT 0x0000e000
118#define TX_BF_CAP_INFO_EXP_UNCMP_STEER_MAT_SHIFT 13
119#define TX_BF_CAP_INFO_EXP_CMP_STEER_MAT_FB 0x00070000
120#define TX_BF_CAP_INFO_EXP_CMP_STEER_MAT_FB_SHIFT 16
121#define TX_BF_CAP_INFO_CSI_NUM_BF_ANT 0x00180000
122#define TX_BF_CAP_INFO_CSI_NUM_BF_ANT_SHIFT 18
123#define TX_BF_CAP_INFO_UNCOMP_STEER_MAT_BF_ANT 0x00600000
124#define TX_BF_CAP_INFO_UNCOMP_STEER_MAT_BF_ANT_SHIFT 20
125#define TX_BF_CAP_INFO_COMP_STEER_MAT_BF_ANT 0x01800000
126#define TX_BF_CAP_INFO_COMP_STEER_MAT_BF_ANT_SHIFT 22
127#define TX_BF_CAP_INFO_RSVD 0xfe000000
128
129/* defines for antenna selection info */
130#define ANTENNA_SEL_INFO 0x01
131#define ANTENNA_SEL_INFO_EXP_CSI_FB_TX 0x02
132#define ANTENNA_SEL_INFO_ANT_ID_FB_TX 0x04
133#define ANTENNA_SEL_INFO_EXP_CSI_FB 0x08
134#define ANTENNA_SEL_INFO_ANT_ID_FB 0x10
135#define ANTENNA_SEL_INFO_RX_AS 0x20
136#define ANTENNA_SEL_INFO_TX_SOUNDING_PPDU 0x40
137#define ANTENNA_SEL_INFO_RSVD 0x80
138
139/**
Jeff Johnsone4bad252017-08-14 14:09:28 -0700140 * struct hdd_connection_info - structure to store connection information
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800141 * @connState: connection state of the NIC
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800142 * @bssId: BSSID
143 * @SSID: SSID Info
144 * @staId: Station ID
145 * @peerMacAddress:Peer Mac Address of the IBSS Stations
146 * @authType: Auth Type
147 * @ucEncryptionType: Unicast Encryption Type
148 * @mcEncryptionType: Multicast Encryption Type
149 * @Keys: Keys
150 * @operationChannel: Operation Channel
151 * @uIsAuthenticated: Remembers authenticated state
152 * @dot11Mode: dot11Mode
153 * @proxyARPService: proxy arp service
Govind Singhedc5cda2015-10-23 17:11:35 +0530154 * @ptk_installed: ptk installed state
155 * @gtk_installed: gtk installed state
Kanchanapally, Vidyullathae3062812015-05-22 17:28:57 +0530156 * @nss: number of spatial streams negotiated
157 * @rate_flags: rate flags for current connection
Anurag Chouhan5de8d172016-07-13 14:44:28 +0530158 * @freq: channel frequency
159 * @txrate: txrate structure holds nss & datarate info
160 * @noise: holds noise information
161 * @ht_caps: holds ht capabilities info
162 * @vht_caps: holds vht capabilities info
163 * @hs20vendor_ie: holds passpoint/hs20 info
Anurag Chouhand939d3d2016-07-20 17:45:48 +0530164 * @conn_flag: flag conn info params is present or not
Anurag Chouhan5de8d172016-07-13 14:44:28 +0530165 * @roam_count: roaming counter
166 * @signal: holds rssi info
167 * @assoc_status_code: holds assoc fail reason
Padma, Santhosh Kumar16dacfb2017-03-21 19:05:40 +0530168 * @congestion: holds congestion percentage
Zhang Qian32fd43e2017-08-24 18:36:28 +0800169 * @last_ssid: holds last ssid
170 * @last_auth_type: holds last auth type
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800171 */
Jeff Johnsone4bad252017-08-14 14:09:28 -0700172struct hdd_connection_info {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800173 eConnectionState connState;
Anurag Chouhan6d760662016-02-20 16:05:43 +0530174 struct qdf_mac_addr bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800175 tCsrSSIDInfo SSID;
Naveen Rawatc45d1622016-07-05 12:20:09 -0700176 uint8_t staId[MAX_PEERS];
177 struct qdf_mac_addr peerMacAddress[MAX_PEERS];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800178 eCsrAuthType authType;
179 eCsrEncryptionType ucEncryptionType;
180 eCsrEncryptionType mcEncryptionType;
181 tCsrKeys Keys;
182 uint8_t operationChannel;
183 uint8_t uIsAuthenticated;
184 uint32_t dot11Mode;
185 uint8_t proxyARPService;
Govind Singhedc5cda2015-10-23 17:11:35 +0530186 bool ptk_installed;
187 bool gtk_installed;
Kanchanapally, Vidyullathae3062812015-05-22 17:28:57 +0530188 uint8_t nss;
189 uint32_t rate_flags;
Anurag Chouhan5de8d172016-07-13 14:44:28 +0530190 uint32_t freq;
191 struct rate_info txrate;
192 int8_t noise;
193 struct ieee80211_ht_cap ht_caps;
194 struct ieee80211_vht_cap vht_caps;
195 struct hdd_conn_flag conn_flag;
196 tDot11fIEhs20vendor_ie hs20vendor_ie;
197 struct ieee80211_ht_operation ht_operation;
198 struct ieee80211_vht_operation vht_operation;
199 uint32_t roam_count;
200 int8_t signal;
201 int32_t assoc_status_code;
Padma, Santhosh Kumar16dacfb2017-03-21 19:05:40 +0530202 uint32_t cca;
Zhang Qian32fd43e2017-08-24 18:36:28 +0800203 tCsrSSIDInfo last_ssid;
204 eCsrAuthType last_auth_type;
Jeff Johnsone4bad252017-08-14 14:09:28 -0700205};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800206
207/* Forward declarations */
Jeff Johnsonb1704c82017-08-29 14:40:57 -0700208struct hdd_adapter;
Jeff Johnson40dae4e2017-08-29 14:00:25 -0700209struct hdd_station_ctx;
Himanshu Agarwal6c3607a2018-01-12 12:04:19 +0530210struct hdd_context;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800211
212/**
213 * hdd_is_connecting() - Function to check connection progress
214 * @hdd_sta_ctx: pointer to global HDD Station context
215 *
216 * Return: true if connecting, false otherwise
217 */
Jeff Johnson40dae4e2017-08-29 14:00:25 -0700218bool hdd_is_connecting(struct hdd_station_ctx *hdd_sta_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800219
gaurank kathpalia82a1b2b2018-07-10 16:49:10 +0530220/*
221 * hdd_is_fils_connection: API to determine if connection is FILS
222 * @adapter: hdd adapter
223 *
224 * Return: true if fils connection else false
225 */
226bool hdd_is_fils_connection(struct hdd_adapter *adapter);
227
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800228/**
229 * hdd_conn_is_connected() - Function to check connection status
Jeff Johnsond377dce2017-10-04 10:32:42 -0700230 * @sta_ctx: pointer to global HDD Station context
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800231 *
232 * Return: false if any errors encountered, true otherwise
233 */
Jeff Johnsond377dce2017-10-04 10:32:42 -0700234bool hdd_conn_is_connected(struct hdd_station_ctx *sta_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800235
236/**
Dustin Brown0127a732018-07-19 14:06:34 -0700237 * hdd_adapter_is_connected_sta() - check if @adapter is a connected station
238 * @adapter: the adapter to check
239 *
240 * Return: true if @adapter is a connected station
241 */
242bool hdd_adapter_is_connected_sta(struct hdd_adapter *adapter);
243
244/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800245 * hdd_conn_get_connected_band() - get current connection radio band
Jeff Johnsond377dce2017-10-04 10:32:42 -0700246 * @sta_ctx: pointer to global HDD Station context
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800247 *
Kiran Kumar Lokereb1d412e2017-04-23 17:19:43 -0700248 * Return: BAND_2G or BAND_5G based on current AP connection
249 * BAND_ALL if not connected
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800250 */
Jeff Johnsond377dce2017-10-04 10:32:42 -0700251enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *sta_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800252
253/**
Himanshu Agarwal6c3607a2018-01-12 12:04:19 +0530254 * hdd_get_sta_connection_in_progress() - get STA for which connection
255 * is in progress
256 * @hdd_ctx: hdd context
257 *
258 * Return: hdd adpater for which connection is in progress
259 */
260struct hdd_adapter *hdd_get_sta_connection_in_progress(
261 struct hdd_context *hdd_ctx);
262
263/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800264 * hdd_sme_roam_callback() - hdd sme roam callback
265 * @pContext: pointer to adapter context
Jeff Johnsonfd060852017-10-04 10:50:51 -0700266 * @roam_info: pointer to roam info
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800267 * @roamId: roam id
268 * @roamStatus: roam status
269 * @roamResult: roam result
270 *
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530271 * Return: QDF_STATUS enumeration
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800272 */
Jeff Johnson172237b2017-11-07 15:32:59 -0800273QDF_STATUS hdd_sme_roam_callback(void *pContext,
274 struct csr_roam_info *roam_info,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800275 uint32_t roamId,
276 eRoamCmdStatus roamStatus,
277 eCsrRoamResult roamResult);
278
279/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800280 * hdd_set_genie_to_csr() - set genie to csr
Jeff Johnsonba388342017-10-02 13:31:01 -0700281 * @adapter: pointer to adapter
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800282 * @RSNAuthType: pointer to auth type
283 *
284 * Return: 0 on success, error number otherwise
285 */
Jeff Johnson53367842017-10-03 11:10:34 -0700286int hdd_set_genie_to_csr(struct hdd_adapter *adapter,
287 eCsrAuthType *RSNAuthType);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800288
289/**
290 * hdd_set_csr_auth_type() - set csr auth type
Jeff Johnsonba388342017-10-02 13:31:01 -0700291 * @adapter: pointer to adapter
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800292 * @RSNAuthType: auth type
293 *
294 * Return: 0 on success, error number otherwise
295 */
Jeff Johnson53367842017-10-03 11:10:34 -0700296int hdd_set_csr_auth_type(struct hdd_adapter *adapter,
297 eCsrAuthType RSNAuthType);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800298
Kabilan Kannan32eb5022016-10-04 12:24:50 -0700299#ifdef FEATURE_WLAN_TDLS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800300/**
301 * hdd_roam_register_tdlssta() - register new TDLS station
Jeff Johnsonba388342017-10-02 13:31:01 -0700302 * @adapter: pointer to adapter
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800303 * @peerMac: pointer to peer MAC address
304 * @staId: station identifier
Jeff Johnsona8ce1272018-03-01 14:39:10 -0800305 * @qos: Quality of service
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800306 *
Jeff Johnsona8ce1272018-03-01 14:39:10 -0800307 * Construct the staDesc and register the new STA with the Data Plane.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800308 * This is called as part of ADD_STA in the TDLS setup.
309 *
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530310 * Return: QDF_STATUS enumeration
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800311 */
Jeff Johnsonba388342017-10-02 13:31:01 -0700312QDF_STATUS hdd_roam_register_tdlssta(struct hdd_adapter *adapter,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800313 const uint8_t *peerMac, uint16_t staId,
Jeff Johnsona8ce1272018-03-01 14:39:10 -0800314 uint8_t qos);
Kabilan Kannan32eb5022016-10-04 12:24:50 -0700315#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800316
Jeff Johnson53367842017-10-03 11:10:34 -0700317QDF_STATUS hdd_roam_deregister_tdlssta(struct hdd_adapter *adapter,
318 uint8_t staId);
Nitesh Shah99dd9552017-03-20 19:27:47 +0530319
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800320/**
321 * hdd_perform_roam_set_key_complete() - perform set key complete
Jeff Johnsonba388342017-10-02 13:31:01 -0700322 * @adapter: pointer to adapter
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800323 *
324 * Return: none
325 */
Jeff Johnsonba388342017-10-02 13:31:01 -0700326void hdd_perform_roam_set_key_complete(struct hdd_adapter *adapter);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800327
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800328#ifdef FEATURE_WLAN_ESE
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800329/**
330 * hdd_indicate_ese_bcn_report_no_results() - beacon report no scan results
Jeff Johnsonba388342017-10-02 13:31:01 -0700331 * @adapter: pointer to adapter
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800332 * @measurementToken: measurement token
333 * @flag: flag
334 * @numBss: number of bss
335 *
336 * If the measurement is none and no scan results found,
337 * indicate the supplicant about measurement done.
338 *
339 * Return: none
340 */
341void
Jeff Johnsonba388342017-10-02 13:31:01 -0700342hdd_indicate_ese_bcn_report_no_results(const struct hdd_adapter *adapter,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800343 const uint16_t measurementToken,
344 const bool flag,
345 const uint8_t numBss);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800346#endif /* FEATURE_WLAN_ESE */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800347
Jeff Johnsonba388342017-10-02 13:31:01 -0700348QDF_STATUS hdd_change_peer_state(struct hdd_adapter *adapter,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800349 uint8_t sta_id,
350 enum ol_txrx_peer_state sta_state,
351 bool roam_synch_in_progress);
Varun Reddy Yeturud5939f82015-12-24 18:14:02 -0800352#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Jeff Johnson172237b2017-11-07 15:32:59 -0800353bool hdd_is_roam_sync_in_progress(struct csr_roam_info *roaminfo);
Varun Reddy Yeturud5939f82015-12-24 18:14:02 -0800354#else
Jeff Johnson172237b2017-11-07 15:32:59 -0800355static inline bool hdd_is_roam_sync_in_progress(struct csr_roam_info *roaminfo)
Varun Reddy Yeturud5939f82015-12-24 18:14:02 -0800356{
357 return false;
358}
359#endif
360
Kabilan Kannan256e3182017-05-02 16:02:37 -0700361QDF_STATUS hdd_update_dp_vdev_flags(void *cbk_data,
362 uint8_t sta_id,
363 uint32_t vdev_param,
364 bool is_link_up);
365
Jeff Johnson85b5c112017-08-11 15:15:23 -0700366QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
Jeff Johnsondf66e3f2017-11-07 15:15:55 -0800367 struct csr_roam_info *roam_info,
Jeff Johnsone58271f2017-10-06 09:58:59 -0700368 uint8_t sta_id,
369 struct qdf_mac_addr *peer_mac_addr,
370 struct bss_description *bss_desc);
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700371
Jeff Johnson40dae4e2017-08-29 14:00:25 -0700372bool hdd_save_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id,
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700373 struct qdf_mac_addr *peer_mac_addr);
Jeff Johnson40dae4e2017-08-29 14:00:25 -0700374void hdd_delete_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id);
Jeff Johnsonb1704c82017-08-29 14:40:57 -0700375QDF_STATUS hdd_roam_deregister_sta(struct hdd_adapter *adapter, uint8_t sta_id);
Deepak Dhamdherea6d2f4c2016-06-04 00:24:52 -0700376
Naveen Rawat05376ee2016-07-18 16:43:32 -0700377#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Abhinav Kumareab25932018-07-13 11:48:43 +0530378QDF_STATUS
379hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
380 const tSirMacAddr bssid, int channel);
Sridhar Selvaraje5260442017-08-19 10:12:03 +0530381/**
382 * hdd_save_gtk_params() - Save GTK offload params
383 * @adapter: HDD adapter
384 * @csr_roam_info: CSR roam info
385 * @is_reassoc: boolean to indicate roaming
386 *
387 * Return: None
388 */
389void hdd_save_gtk_params(struct hdd_adapter *adapter,
Jeff Johnson172237b2017-11-07 15:32:59 -0800390 struct csr_roam_info *csr_roam_info, bool is_reassoc);
Himanshu Agarwalb4823b52016-09-26 15:18:07 +0530391#else
Abhinav Kumareab25932018-07-13 11:48:43 +0530392static inline QDF_STATUS
393hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
394 const tSirMacAddr bssid, int channel)
Himanshu Agarwalb4823b52016-09-26 15:18:07 +0530395{
Abhinav Kumareab25932018-07-13 11:48:43 +0530396 return QDF_STATUS_SUCCESS;
Himanshu Agarwalb4823b52016-09-26 15:18:07 +0530397}
Sridhar Selvaraje5260442017-08-19 10:12:03 +0530398static inline void hdd_save_gtk_params(struct hdd_adapter *adapter,
Jeff Johnson172237b2017-11-07 15:32:59 -0800399 struct csr_roam_info *csr_roam_info,
Sridhar Selvaraje5260442017-08-19 10:12:03 +0530400 bool is_reassoc)
401{
402}
Naveen Rawat05376ee2016-07-18 16:43:32 -0700403#endif
404
Ashish Kumar Dhanotiya443d31f2017-10-13 12:41:19 +0530405/**
406 * hdd_copy_ht_caps()- copy ht caps info from roam ht caps
407 * info to source ht_cap info of type ieee80211_ht_cap.
408 * @hdd_ht_cap: pointer to Source ht_cap info of type ieee80211_ht_cap
409 * @roam_ht_cap: pointer to roam ht_caps info
410 *
411 * Return: None
412 */
413
414void hdd_copy_ht_caps(struct ieee80211_ht_cap *hdd_ht_cap,
415 tDot11fIEHTCaps *roam_ht_cap);
416
417/**
418 * hdd_copy_vht_caps()- copy vht caps info from roam vht caps
419 * info to source vht_cap info of type ieee80211_vht_cap.
420 * @hdd_vht_cap: pointer to Source vht_cap info of type ieee80211_vht_cap
421 * @roam_vht_cap: pointer to roam vht_caps info
422 *
423 * Return: None
424 */
425void hdd_copy_vht_caps(struct ieee80211_vht_cap *hdd_vht_cap,
426 tDot11fIEVHTCaps *roam_vht_cap);
427
Jeff Johnson7f2c5912018-03-23 11:42:28 -0700428/**
429 * hdd_roam_profile_init() - initialize adapter roam profile
430 * @adapter: The HDD adapter being initialized
431 *
432 * This function initializes the roam profile that is embedded within
433 * the adapter.
434 *
435 * Return: void
436 */
437void hdd_roam_profile_init(struct hdd_adapter *adapter);
438
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800439#endif