Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 2 | * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * 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 Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #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 Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 28 | #include <sme_api.h> |
| 29 | #include <wlan_defs.h> |
Dhanashri Atre | b08959a | 2016-03-01 17:28:03 -0800 | [diff] [blame] | 30 | #include "cdp_txrx_peer_ops.h" |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 31 | #include <net/cfg80211.h> |
| 32 | #include <linux/ieee80211.h> |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 33 | |
| 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 Aggarwal | 4dbbc91 | 2017-05-05 14:38:24 +0530 | [diff] [blame] | 39 | (((staId) >= 0) && ((staId) < 0xFF)) |
Bala Venkatesh | 110b03e | 2018-07-10 16:02:08 +0530 | [diff] [blame] | 40 | #else |
| 41 | #define HDD_MAX_NUM_TDLS_STA 0 |
| 42 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 43 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 44 | /* Timeout (in ms) for Link to Up before Registering Station */ |
| 45 | #define ASSOC_LINKUP_TIMEOUT 60 |
| 46 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 47 | /* Timeout in ms for peer info request commpletion */ |
| 48 | #define IBSS_PEER_INFO_REQ_TIMOEUT 1000 |
| 49 | |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 50 | #define INVALID_PEER_IDX -1 |
| 51 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 52 | /** |
Deepak Dhamdhere | f16015f | 2016-06-01 14:28:09 -0700 | [diff] [blame] | 53 | * enum eConnectionState - connection state values at HDD |
| 54 | * @eConnectionState_NotConnected: Not associated in Infra or participating in |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 55 | * 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 Dhamdhere | f16015f | 2016-06-01 14:28:09 -0700 | [diff] [blame] | 62 | * @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 Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 65 | */ |
| 66 | typedef enum { |
| 67 | eConnectionState_NotConnected, |
| 68 | eConnectionState_Connecting, |
| 69 | eConnectionState_Associated, |
| 70 | eConnectionState_IbssDisconnected, |
| 71 | eConnectionState_IbssConnected, |
Deepak Dhamdhere | f16015f | 2016-06-01 14:28:09 -0700 | [diff] [blame] | 72 | eConnectionState_Disconnecting, |
| 73 | eConnectionState_NdiDisconnected, |
| 74 | eConnectionState_NdiConnected, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 75 | } eConnectionState; |
| 76 | |
| 77 | /** |
Srinivas Girigowda | 7213669 | 2017-03-25 15:14:01 -0700 | [diff] [blame] | 78 | * enum peer_status - Peer status |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 79 | * @ePeerConnected: peer connected |
| 80 | * @ePeerDisconnected: peer disconnected |
| 81 | */ |
Srinivas Girigowda | 7213669 | 2017-03-25 15:14:01 -0700 | [diff] [blame] | 82 | enum peer_status { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 83 | ePeerConnected = 1, |
| 84 | ePeerDisconnected |
Srinivas Girigowda | 7213669 | 2017-03-25 15:14:01 -0700 | [diff] [blame] | 85 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 86 | |
| 87 | /** |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 88 | * 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 Chouhan | d939d3d | 2016-07-20 17:45:48 +0530 | [diff] [blame] | 92 | * @ht_op_present: ht operation present or not |
| 93 | * @vht_op_present: vht operation present or not |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 94 | */ |
| 95 | struct 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 Johnson | e4bad25 | 2017-08-14 14:09:28 -0700 | [diff] [blame] | 140 | * struct hdd_connection_info - structure to store connection information |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 141 | * @connState: connection state of the NIC |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 142 | * @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 Singh | edc5cda | 2015-10-23 17:11:35 +0530 | [diff] [blame] | 154 | * @ptk_installed: ptk installed state |
| 155 | * @gtk_installed: gtk installed state |
Kanchanapally, Vidyullatha | e306281 | 2015-05-22 17:28:57 +0530 | [diff] [blame] | 156 | * @nss: number of spatial streams negotiated |
| 157 | * @rate_flags: rate flags for current connection |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 158 | * @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 Chouhan | d939d3d | 2016-07-20 17:45:48 +0530 | [diff] [blame] | 164 | * @conn_flag: flag conn info params is present or not |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 165 | * @roam_count: roaming counter |
| 166 | * @signal: holds rssi info |
| 167 | * @assoc_status_code: holds assoc fail reason |
Padma, Santhosh Kumar | 16dacfb | 2017-03-21 19:05:40 +0530 | [diff] [blame] | 168 | * @congestion: holds congestion percentage |
Zhang Qian | 32fd43e | 2017-08-24 18:36:28 +0800 | [diff] [blame] | 169 | * @last_ssid: holds last ssid |
| 170 | * @last_auth_type: holds last auth type |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 171 | */ |
Jeff Johnson | e4bad25 | 2017-08-14 14:09:28 -0700 | [diff] [blame] | 172 | struct hdd_connection_info { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 173 | eConnectionState connState; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 174 | struct qdf_mac_addr bssId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 175 | tCsrSSIDInfo SSID; |
Naveen Rawat | c45d162 | 2016-07-05 12:20:09 -0700 | [diff] [blame] | 176 | uint8_t staId[MAX_PEERS]; |
| 177 | struct qdf_mac_addr peerMacAddress[MAX_PEERS]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 178 | 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 Singh | edc5cda | 2015-10-23 17:11:35 +0530 | [diff] [blame] | 186 | bool ptk_installed; |
| 187 | bool gtk_installed; |
Kanchanapally, Vidyullatha | e306281 | 2015-05-22 17:28:57 +0530 | [diff] [blame] | 188 | uint8_t nss; |
| 189 | uint32_t rate_flags; |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 190 | 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 Kumar | 16dacfb | 2017-03-21 19:05:40 +0530 | [diff] [blame] | 202 | uint32_t cca; |
Zhang Qian | 32fd43e | 2017-08-24 18:36:28 +0800 | [diff] [blame] | 203 | tCsrSSIDInfo last_ssid; |
| 204 | eCsrAuthType last_auth_type; |
Jeff Johnson | e4bad25 | 2017-08-14 14:09:28 -0700 | [diff] [blame] | 205 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 206 | |
| 207 | /* Forward declarations */ |
Jeff Johnson | b1704c8 | 2017-08-29 14:40:57 -0700 | [diff] [blame] | 208 | struct hdd_adapter; |
Jeff Johnson | 40dae4e | 2017-08-29 14:00:25 -0700 | [diff] [blame] | 209 | struct hdd_station_ctx; |
Himanshu Agarwal | 6c3607a | 2018-01-12 12:04:19 +0530 | [diff] [blame] | 210 | struct hdd_context; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 211 | |
| 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 Johnson | 40dae4e | 2017-08-29 14:00:25 -0700 | [diff] [blame] | 218 | bool hdd_is_connecting(struct hdd_station_ctx *hdd_sta_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 219 | |
gaurank kathpalia | 82a1b2b | 2018-07-10 16:49:10 +0530 | [diff] [blame] | 220 | /* |
| 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 | */ |
| 226 | bool hdd_is_fils_connection(struct hdd_adapter *adapter); |
| 227 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 228 | /** |
| 229 | * hdd_conn_is_connected() - Function to check connection status |
Jeff Johnson | d377dce | 2017-10-04 10:32:42 -0700 | [diff] [blame] | 230 | * @sta_ctx: pointer to global HDD Station context |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 231 | * |
| 232 | * Return: false if any errors encountered, true otherwise |
| 233 | */ |
Jeff Johnson | d377dce | 2017-10-04 10:32:42 -0700 | [diff] [blame] | 234 | bool hdd_conn_is_connected(struct hdd_station_ctx *sta_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 235 | |
| 236 | /** |
Dustin Brown | 0127a73 | 2018-07-19 14:06:34 -0700 | [diff] [blame] | 237 | * 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 | */ |
| 242 | bool hdd_adapter_is_connected_sta(struct hdd_adapter *adapter); |
| 243 | |
| 244 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 245 | * hdd_conn_get_connected_band() - get current connection radio band |
Jeff Johnson | d377dce | 2017-10-04 10:32:42 -0700 | [diff] [blame] | 246 | * @sta_ctx: pointer to global HDD Station context |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 247 | * |
Kiran Kumar Lokere | b1d412e | 2017-04-23 17:19:43 -0700 | [diff] [blame] | 248 | * Return: BAND_2G or BAND_5G based on current AP connection |
| 249 | * BAND_ALL if not connected |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 250 | */ |
Jeff Johnson | d377dce | 2017-10-04 10:32:42 -0700 | [diff] [blame] | 251 | enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *sta_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 252 | |
| 253 | /** |
Himanshu Agarwal | 6c3607a | 2018-01-12 12:04:19 +0530 | [diff] [blame] | 254 | * 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 | */ |
| 260 | struct hdd_adapter *hdd_get_sta_connection_in_progress( |
| 261 | struct hdd_context *hdd_ctx); |
| 262 | |
| 263 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 264 | * hdd_sme_roam_callback() - hdd sme roam callback |
| 265 | * @pContext: pointer to adapter context |
Jeff Johnson | fd06085 | 2017-10-04 10:50:51 -0700 | [diff] [blame] | 266 | * @roam_info: pointer to roam info |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 267 | * @roamId: roam id |
| 268 | * @roamStatus: roam status |
| 269 | * @roamResult: roam result |
| 270 | * |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 271 | * Return: QDF_STATUS enumeration |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 272 | */ |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 273 | QDF_STATUS hdd_sme_roam_callback(void *pContext, |
| 274 | struct csr_roam_info *roam_info, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 275 | uint32_t roamId, |
| 276 | eRoamCmdStatus roamStatus, |
| 277 | eCsrRoamResult roamResult); |
| 278 | |
| 279 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 280 | * hdd_set_genie_to_csr() - set genie to csr |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 281 | * @adapter: pointer to adapter |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 282 | * @RSNAuthType: pointer to auth type |
| 283 | * |
| 284 | * Return: 0 on success, error number otherwise |
| 285 | */ |
Jeff Johnson | 5336784 | 2017-10-03 11:10:34 -0700 | [diff] [blame] | 286 | int hdd_set_genie_to_csr(struct hdd_adapter *adapter, |
| 287 | eCsrAuthType *RSNAuthType); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 288 | |
| 289 | /** |
| 290 | * hdd_set_csr_auth_type() - set csr auth type |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 291 | * @adapter: pointer to adapter |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 292 | * @RSNAuthType: auth type |
| 293 | * |
| 294 | * Return: 0 on success, error number otherwise |
| 295 | */ |
Jeff Johnson | 5336784 | 2017-10-03 11:10:34 -0700 | [diff] [blame] | 296 | int hdd_set_csr_auth_type(struct hdd_adapter *adapter, |
| 297 | eCsrAuthType RSNAuthType); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 298 | |
Kabilan Kannan | 32eb502 | 2016-10-04 12:24:50 -0700 | [diff] [blame] | 299 | #ifdef FEATURE_WLAN_TDLS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 300 | /** |
| 301 | * hdd_roam_register_tdlssta() - register new TDLS station |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 302 | * @adapter: pointer to adapter |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 303 | * @peerMac: pointer to peer MAC address |
| 304 | * @staId: station identifier |
Jeff Johnson | a8ce127 | 2018-03-01 14:39:10 -0800 | [diff] [blame] | 305 | * @qos: Quality of service |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 306 | * |
Jeff Johnson | a8ce127 | 2018-03-01 14:39:10 -0800 | [diff] [blame] | 307 | * Construct the staDesc and register the new STA with the Data Plane. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 308 | * This is called as part of ADD_STA in the TDLS setup. |
| 309 | * |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 310 | * Return: QDF_STATUS enumeration |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 311 | */ |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 312 | QDF_STATUS hdd_roam_register_tdlssta(struct hdd_adapter *adapter, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 313 | const uint8_t *peerMac, uint16_t staId, |
Jeff Johnson | a8ce127 | 2018-03-01 14:39:10 -0800 | [diff] [blame] | 314 | uint8_t qos); |
Kabilan Kannan | 32eb502 | 2016-10-04 12:24:50 -0700 | [diff] [blame] | 315 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 316 | |
Jeff Johnson | 5336784 | 2017-10-03 11:10:34 -0700 | [diff] [blame] | 317 | QDF_STATUS hdd_roam_deregister_tdlssta(struct hdd_adapter *adapter, |
| 318 | uint8_t staId); |
Nitesh Shah | 99dd955 | 2017-03-20 19:27:47 +0530 | [diff] [blame] | 319 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 320 | /** |
| 321 | * hdd_perform_roam_set_key_complete() - perform set key complete |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 322 | * @adapter: pointer to adapter |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 323 | * |
| 324 | * Return: none |
| 325 | */ |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 326 | void hdd_perform_roam_set_key_complete(struct hdd_adapter *adapter); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 327 | |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 328 | #ifdef FEATURE_WLAN_ESE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 329 | /** |
| 330 | * hdd_indicate_ese_bcn_report_no_results() - beacon report no scan results |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 331 | * @adapter: pointer to adapter |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 332 | * @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 | */ |
| 341 | void |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 342 | hdd_indicate_ese_bcn_report_no_results(const struct hdd_adapter *adapter, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 343 | const uint16_t measurementToken, |
| 344 | const bool flag, |
| 345 | const uint8_t numBss); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 346 | #endif /* FEATURE_WLAN_ESE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 347 | |
Jeff Johnson | ba38834 | 2017-10-02 13:31:01 -0700 | [diff] [blame] | 348 | QDF_STATUS hdd_change_peer_state(struct hdd_adapter *adapter, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 349 | uint8_t sta_id, |
| 350 | enum ol_txrx_peer_state sta_state, |
| 351 | bool roam_synch_in_progress); |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 352 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 353 | bool hdd_is_roam_sync_in_progress(struct csr_roam_info *roaminfo); |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 354 | #else |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 355 | static inline bool hdd_is_roam_sync_in_progress(struct csr_roam_info *roaminfo) |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 356 | { |
| 357 | return false; |
| 358 | } |
| 359 | #endif |
| 360 | |
Kabilan Kannan | 256e318 | 2017-05-02 16:02:37 -0700 | [diff] [blame] | 361 | QDF_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 Johnson | 85b5c11 | 2017-08-11 15:15:23 -0700 | [diff] [blame] | 366 | QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter, |
Jeff Johnson | df66e3f | 2017-11-07 15:15:55 -0800 | [diff] [blame] | 367 | struct csr_roam_info *roam_info, |
Jeff Johnson | e58271f | 2017-10-06 09:58:59 -0700 | [diff] [blame] | 368 | uint8_t sta_id, |
| 369 | struct qdf_mac_addr *peer_mac_addr, |
| 370 | struct bss_description *bss_desc); |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 371 | |
Jeff Johnson | 40dae4e | 2017-08-29 14:00:25 -0700 | [diff] [blame] | 372 | bool hdd_save_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id, |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 373 | struct qdf_mac_addr *peer_mac_addr); |
Jeff Johnson | 40dae4e | 2017-08-29 14:00:25 -0700 | [diff] [blame] | 374 | void hdd_delete_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id); |
Jeff Johnson | b1704c8 | 2017-08-29 14:40:57 -0700 | [diff] [blame] | 375 | QDF_STATUS hdd_roam_deregister_sta(struct hdd_adapter *adapter, uint8_t sta_id); |
Deepak Dhamdhere | a6d2f4c | 2016-06-04 00:24:52 -0700 | [diff] [blame] | 376 | |
Naveen Rawat | 05376ee | 2016-07-18 16:43:32 -0700 | [diff] [blame] | 377 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Abhinav Kumar | eab2593 | 2018-07-13 11:48:43 +0530 | [diff] [blame] | 378 | QDF_STATUS |
| 379 | hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter, |
| 380 | const tSirMacAddr bssid, int channel); |
Sridhar Selvaraj | e526044 | 2017-08-19 10:12:03 +0530 | [diff] [blame] | 381 | /** |
| 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 | */ |
| 389 | void hdd_save_gtk_params(struct hdd_adapter *adapter, |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 390 | struct csr_roam_info *csr_roam_info, bool is_reassoc); |
Himanshu Agarwal | b4823b5 | 2016-09-26 15:18:07 +0530 | [diff] [blame] | 391 | #else |
Abhinav Kumar | eab2593 | 2018-07-13 11:48:43 +0530 | [diff] [blame] | 392 | static inline QDF_STATUS |
| 393 | hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter, |
| 394 | const tSirMacAddr bssid, int channel) |
Himanshu Agarwal | b4823b5 | 2016-09-26 15:18:07 +0530 | [diff] [blame] | 395 | { |
Abhinav Kumar | eab2593 | 2018-07-13 11:48:43 +0530 | [diff] [blame] | 396 | return QDF_STATUS_SUCCESS; |
Himanshu Agarwal | b4823b5 | 2016-09-26 15:18:07 +0530 | [diff] [blame] | 397 | } |
Sridhar Selvaraj | e526044 | 2017-08-19 10:12:03 +0530 | [diff] [blame] | 398 | static inline void hdd_save_gtk_params(struct hdd_adapter *adapter, |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 399 | struct csr_roam_info *csr_roam_info, |
Sridhar Selvaraj | e526044 | 2017-08-19 10:12:03 +0530 | [diff] [blame] | 400 | bool is_reassoc) |
| 401 | { |
| 402 | } |
Naveen Rawat | 05376ee | 2016-07-18 16:43:32 -0700 | [diff] [blame] | 403 | #endif |
| 404 | |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 405 | /** |
| 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 | |
| 414 | void 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 | */ |
| 425 | void hdd_copy_vht_caps(struct ieee80211_vht_cap *hdd_vht_cap, |
| 426 | tDot11fIEVHTCaps *roam_vht_cap); |
| 427 | |
Jeff Johnson | 7f2c591 | 2018-03-23 11:42:28 -0700 | [diff] [blame] | 428 | /** |
| 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 | */ |
| 437 | void hdd_roam_profile_init(struct hdd_adapter *adapter); |
| 438 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 439 | #endif |