Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Jianmin Zhu | 5769244 | 2020-01-03 11:43:09 +0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2020 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(__LIM_SESSION_H) |
| 20 | #define __LIM_SESSION_H |
| 21 | |
| 22 | /**========================================================================= |
| 23 | |
| 24 | \file lim_session.h |
| 25 | |
| 26 | \brief prototype for lim Session related APIs |
| 27 | |
| 28 | \author Sunit Bhatia |
| 29 | |
| 30 | ========================================================================*/ |
| 31 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 32 | /* Master Structure: This will be part of PE Session Entry */ |
| 33 | typedef struct sPowersaveoffloadInfo { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 34 | uint8_t bcnmiss; |
| 35 | } tPowersaveoffloadInfo, tpPowersaveoffloadInfo; |
| 36 | |
| 37 | #ifdef WLAN_FEATURE_11W |
Jeff Johnson | 4a07a9b | 2018-11-21 23:51:02 -0800 | [diff] [blame] | 38 | struct comeback_timer_info { |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 39 | struct mac_context *mac; |
Jeff Johnson | 4a07a9b | 2018-11-21 23:51:02 -0800 | [diff] [blame] | 40 | uint8_t session_id; |
| 41 | tLimMlmStates lim_prev_mlm_state; /* Previous MLM State */ |
| 42 | tLimMlmStates lim_mlm_state; /* MLM State */ |
| 43 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 44 | #endif /* WLAN_FEATURE_11W */ |
| 45 | /*-------------------------------------------------------------------------- |
| 46 | Include Files |
| 47 | ------------------------------------------------------------------------*/ |
| 48 | |
| 49 | /*-------------------------------------------------------------------------- |
| 50 | Preprocessor definitions and constants |
| 51 | ------------------------------------------------------------------------*/ |
Srinivas Girigowda | d65dc5a | 2016-01-14 17:08:26 -0800 | [diff] [blame] | 52 | /* Maximum Number of WEP KEYS */ |
| 53 | #define MAX_WEP_KEYS 4 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 54 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 55 | #define SCH_PROTECTION_RESET_TIME 4000 |
| 56 | |
| 57 | /*-------------------------------------------------------------------------- |
| 58 | Type declarations |
| 59 | ------------------------------------------------------------------------*/ |
| 60 | typedef struct { |
| 61 | tSirMacBeaconInterval beaconInterval; |
| 62 | uint8_t fShortPreamble; |
| 63 | uint8_t llaCoexist; |
| 64 | uint8_t llbCoexist; |
| 65 | uint8_t llgCoexist; |
| 66 | uint8_t ht20Coexist; |
| 67 | uint8_t llnNonGFCoexist; |
| 68 | uint8_t fRIFSMode; |
| 69 | uint8_t fLsigTXOPProtectionFullSupport; |
| 70 | uint8_t gHTObssMode; |
| 71 | } tBeaconParams, *tpBeaconParams; |
| 72 | |
yeshwanth sriram guntuka | 7419da7 | 2017-01-19 21:17:30 +0530 | [diff] [blame] | 73 | typedef struct join_params { |
| 74 | uint16_t prot_status_code; |
| 75 | uint16_t pe_session_id; |
| 76 | tSirResultCodes result_code; |
| 77 | } join_params; |
| 78 | |
Jianmin Zhu | d252607 | 2019-04-25 14:04:13 +0800 | [diff] [blame] | 79 | struct reassoc_params { |
| 80 | uint16_t prot_status_code; |
| 81 | tSirResultCodes result_code; |
| 82 | struct pe_session *session; |
| 83 | }; |
| 84 | |
Peng Xu | 6363ec6 | 2017-05-15 11:06:33 -0700 | [diff] [blame] | 85 | #ifdef WLAN_FEATURE_11AX_BSS_COLOR |
| 86 | #define MAX_BSS_COLOR_VALUE 63 |
| 87 | #define TIME_BEACON_NOT_UPDATED 30000 |
| 88 | #define BSS_COLOR_SWITCH_COUNTDOWN 5 |
Kiran Kumar Lokere | 389c1f8 | 2019-08-10 10:47:29 -0700 | [diff] [blame] | 89 | #define OBSS_COLOR_COLLISION_DETECTION_STA_PERIOD_MS 120000 |
| 90 | #define OBSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS 120000 |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 91 | #define OBSS_COLOR_COLLISION_SCAN_PERIOD_MS 200 |
| 92 | #define OBSS_COLOR_COLLISION_FREE_SLOT_EXPIRY_MS 50000 |
Peng Xu | 6363ec6 | 2017-05-15 11:06:33 -0700 | [diff] [blame] | 93 | struct bss_color_info { |
| 94 | qdf_time_t timestamp; |
| 95 | uint64_t seen_count; |
| 96 | }; |
| 97 | #endif |
| 98 | |
Arif Hussain | ee10f90 | 2017-12-27 16:30:17 -0800 | [diff] [blame] | 99 | /** |
| 100 | * struct obss_detection_cfg - current obss detection cfg set to firmware |
| 101 | * @obss_11b_ap_detect_mode: detection mode for 11b access point. |
| 102 | * @obss_11b_sta_detect_mode: detection mode for 11b station. |
| 103 | * @obss_11g_ap_detect_mode: detection mode for 11g access point. |
| 104 | * @obss_11a_detect_mode: detection mode for 11a access point. |
| 105 | * @obss_ht_legacy_detect_mode: detection mode for ht ap with legacy mode. |
| 106 | * @obss_ht_mixed_detect_mode: detection mode for ht ap with mixed mode. |
| 107 | * @obss_ht_20mhz_detect_mode: detection mode for ht ap with 20mhz mode. |
| 108 | */ |
| 109 | struct obss_detection_cfg { |
| 110 | uint8_t obss_11b_ap_detect_mode; |
| 111 | uint8_t obss_11b_sta_detect_mode; |
| 112 | uint8_t obss_11g_ap_detect_mode; |
| 113 | uint8_t obss_11a_detect_mode; |
| 114 | uint8_t obss_ht_legacy_detect_mode; |
| 115 | uint8_t obss_ht_mixed_detect_mode; |
| 116 | uint8_t obss_ht_20mhz_detect_mode; |
| 117 | }; |
| 118 | |
Pragaspathi Thilagaraj | 54018e0 | 2019-04-25 01:32:17 +0530 | [diff] [blame] | 119 | #define ADAPTIVE_11R_STA_IE_LEN 0x0B |
| 120 | #define ADAPTIVE_11R_STA_OUI "\x00\x00\x0f\x22" |
| 121 | #define ADAPTIVE_11R_OUI_LEN 0x04 |
| 122 | #define ADAPTIVE_11R_OUI_SUBTYPE 0x00 |
| 123 | #define ADAPTIVE_11R_OUI_VERSION 0x01 |
| 124 | #define ADAPTIVE_11R_DATA_LEN 0x04 |
| 125 | #define ADAPTIVE_11R_OUI_DATA "\x00\x00\x00\x01" |
| 126 | |
sheenam monga | 26165ab | 2020-02-23 05:25:01 +0530 | [diff] [blame^] | 127 | #define BEACON_RPT_ERR_VSIE_STA_IE_LEN 0x08 |
| 128 | #define BEACON_RPT_ERR_VSIE_STA_OUI "\x00\x00\x0f\x22" |
| 129 | #define BEACON_RPT_ERR_VSIE_OUI_LEN 0X04 |
| 130 | #define BEACON_RPT_ERR_VSIE_DATA_LEN 0x03 |
| 131 | #define BEACON_RPT_ERR_VSIE_OUI_DATA "\x05\x01\x01" |
| 132 | |
Jeff Johnson | 2973702 | 2019-02-23 11:07:43 -0800 | [diff] [blame] | 133 | /** |
| 134 | * struct pe_session - per-vdev PE context |
| 135 | * @available: true if the entry is available, false if it is in use |
| 136 | * @peSessionId: unique ID assigned to the entry |
| 137 | * @vdev_id: ID of the vdev for which this entry is applicable |
| 138 | * @vdev: the actual vdev for which this entry is applicable |
Pragaspathi Thilagaraj | 0bd369d | 2019-04-08 00:07:53 +0530 | [diff] [blame] | 139 | * @connected_akm: AKM of current connection |
Pragaspathi Thilagaraj | 54018e0 | 2019-04-25 01:32:17 +0530 | [diff] [blame] | 140 | * @is_adaptive_11R_connection: flag to check if we are connecting |
gaurank kathpalia | 2fcec84 | 2019-08-05 17:22:27 +0530 | [diff] [blame] | 141 | * @ap_ecsa_wakelock: wakelock to complete CSA operation. |
| 142 | * @ap_ecsa_runtime_lock: runtime lock to complete SAP CSA operation. |
Pragaspathi Thilagaraj | 54018e0 | 2019-04-25 01:32:17 +0530 | [diff] [blame] | 143 | * to Adaptive 11R network |
Jeff Johnson | 2973702 | 2019-02-23 11:07:43 -0800 | [diff] [blame] | 144 | */ |
Jeff Johnson | 0f99bd8 | 2018-11-18 18:42:12 -0800 | [diff] [blame] | 145 | struct pe_session { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 146 | /* To check session table is in use or free */ |
| 147 | uint8_t available; |
| 148 | uint16_t peSessionId; |
Jeff Johnson | 2973702 | 2019-02-23 11:07:43 -0800 | [diff] [blame] | 149 | union { |
| 150 | uint8_t smeSessionId; |
| 151 | uint8_t vdev_id; |
| 152 | }; |
Rajeev Kumar Sirasanagandla | e3b5991 | 2018-08-24 15:53:31 +0530 | [diff] [blame] | 153 | struct wlan_objmgr_vdev *vdev; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 154 | |
Pragaspathi Thilagaraj | 7fb1422 | 2019-06-17 23:26:58 +0530 | [diff] [blame] | 155 | /* In AP role: BSSID and self_mac_addr will be the same. */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 156 | /* In STA role: they will be different */ |
| 157 | tSirMacAddr bssId; |
Pragaspathi Thilagaraj | 7fb1422 | 2019-06-17 23:26:58 +0530 | [diff] [blame] | 158 | tSirMacAddr self_mac_addr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 159 | tSirMacSSid ssId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 160 | uint8_t valid; |
| 161 | tLimMlmStates limMlmState; /* MLM State */ |
| 162 | tLimMlmStates limPrevMlmState; /* Previous MLM State */ |
| 163 | tLimSmeStates limSmeState; /* SME State */ |
| 164 | tLimSmeStates limPrevSmeState; /* Previous SME State */ |
| 165 | tLimSystemRole limSystemRole; |
Pragaspathi Thilagaraj | afd0a48 | 2019-05-23 13:02:36 +0530 | [diff] [blame] | 166 | enum bss_type bssType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 167 | tSirNwType nwType; |
Jeff Johnson | 704b891 | 2019-02-02 14:38:14 -0800 | [diff] [blame] | 168 | struct start_bss_req *pLimStartBssReq; /* handle to start bss req */ |
Pragaspathi Thilagaraj | 64ae59d | 2019-06-22 13:00:34 +0530 | [diff] [blame] | 169 | struct join_req *lim_join_req; /* handle to sme join req */ |
Jeff Johnson | 701444f | 2019-02-02 22:35:13 -0800 | [diff] [blame] | 170 | struct join_req *pLimReAssocReq; /* handle to sme reassoc req */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 171 | tpLimMlmJoinReq pLimMlmJoinReq; /* handle to MLM join Req */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 172 | void *pLimMlmReassocRetryReq; /* keep reasoc req for retry */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 173 | void *pLimMlmReassocReq; /* handle to MLM reassoc Req */ |
| 174 | uint16_t channelChangeReasonCode; |
| 175 | uint8_t dot11mode; |
| 176 | uint8_t htCapability; |
Pragaspathi Thilagaraj | 0bd369d | 2019-04-08 00:07:53 +0530 | [diff] [blame] | 177 | enum ani_akm_type connected_akm; |
| 178 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 179 | /* Supported Channel Width Set: 0-20MHz 1 - 40MHz */ |
| 180 | uint8_t htSupportedChannelWidthSet; |
| 181 | /* Recommended Tx Width Set |
| 182 | * 0 - use 20 MHz channel (control channel) |
| 183 | * 1 - use channel width enabled under Supported Channel Width Set |
| 184 | */ |
| 185 | uint8_t htRecommendedTxWidthSet; |
| 186 | /* Identifies the 40 MHz extension channel */ |
| 187 | ePhyChanBondState htSecondaryChannelOffset; |
Amruta Kulkarni | 453c4e2 | 2019-11-20 10:59:21 -0800 | [diff] [blame] | 188 | enum reg_wifi_band limRFBand; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 189 | uint8_t limIbssActive; /* TO SUPPORT CONCURRENCY */ |
| 190 | |
| 191 | /* These global varibales moved to session Table to support BT-AMP : Oct 9th review */ |
| 192 | tAniAuthType limCurrentAuthType; |
| 193 | uint16_t limCurrentBssCaps; |
| 194 | uint8_t limCurrentBssQosCaps; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 195 | uint8_t limSentCapsChangeNtf; |
| 196 | uint16_t limAID; |
| 197 | |
| 198 | /* Parameters For Reassociation */ |
| 199 | tSirMacAddr limReAssocbssId; |
Gururaj Pandurangi | 9bcf639 | 2019-10-30 12:11:49 -0700 | [diff] [blame] | 200 | uint32_t lim_reassoc_chan_freq; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 201 | /* CB paramaters required/duplicated for Reassoc since re-assoc mantains its own params in lim */ |
| 202 | uint8_t reAssocHtSupportedChannelWidthSet; |
| 203 | uint8_t reAssocHtRecommendedTxWidthSet; |
| 204 | ePhyChanBondState reAssocHtSecondaryChannelOffset; |
| 205 | tSirMacSSid limReassocSSID; |
| 206 | uint16_t limReassocBssCaps; |
| 207 | uint8_t limReassocBssQosCaps; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 208 | |
| 209 | /* Assoc or ReAssoc Response Data/Frame */ |
| 210 | void *limAssocResponseData; |
| 211 | |
| 212 | /** BSS Table parameters **/ |
| 213 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 214 | uint16_t statypeForBss; /* to know session is for PEER or SELF */ |
| 215 | uint8_t shortSlotTimeSupported; |
| 216 | uint8_t dtimPeriod; |
| 217 | tSirMacRateSet rateSet; |
| 218 | tSirMacRateSet extRateSet; |
| 219 | tSirMacHTOperatingMode htOperMode; |
Amruta Kulkarni | 1d93a85 | 2020-02-11 11:05:41 -0800 | [diff] [blame] | 220 | qdf_freq_t curr_op_freq; |
wadesong | b96f3ba | 2019-07-11 15:42:13 +0800 | [diff] [blame] | 221 | uint32_t curr_req_chan_freq; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 222 | uint8_t LimRxedBeaconCntDuringHB; |
| 223 | |
| 224 | /* Time stamp of the last beacon received from the BSS to which STA is connected. */ |
| 225 | uint64_t lastBeaconTimeStamp; |
| 226 | /* RX Beacon count for the current BSS to which STA is connected. */ |
| 227 | uint32_t currentBssBeaconCnt; |
Kiran Kumar Lokere | 6d3a30d | 2018-01-15 18:18:29 -0800 | [diff] [blame] | 228 | uint8_t bcon_dtim_period; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 229 | |
| 230 | uint32_t bcnLen; |
| 231 | uint8_t *beacon; /* Used to store last beacon / probe response before assoc. */ |
| 232 | |
| 233 | uint32_t assocReqLen; |
Pragaspathi Thilagaraj | f812ccf | 2019-06-22 13:07:04 +0530 | [diff] [blame] | 234 | uint8_t *assoc_req; /* Used to store association request frame */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 235 | |
| 236 | uint32_t assocRspLen; |
| 237 | uint8_t *assocRsp; /* Used to store association response received while associating */ |
| 238 | tAniSirDph dph; |
| 239 | void **parsedAssocReq; /* Used to store parsed assoc req from various requesting station */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 240 | uint32_t RICDataLen; /* Used to store the Ric data received in the assoc response */ |
| 241 | uint8_t *ricData; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 242 | #ifdef FEATURE_WLAN_ESE |
| 243 | uint32_t tspecLen; /* Used to store the TSPEC IEs received in the assoc response */ |
| 244 | uint8_t *tspecIes; |
| 245 | #endif |
| 246 | uint32_t encryptType; |
| 247 | |
| 248 | bool bTkipCntrMeasActive; /* Used to keep record of TKIP counter measures start/stop */ |
| 249 | |
| 250 | uint8_t gLimProtectionControl; /* used for 11n protection */ |
| 251 | |
| 252 | uint8_t gHTNonGFDevicesPresent; |
| 253 | |
| 254 | /* protection related config cache */ |
| 255 | tCfgProtection cfgProtection; |
| 256 | |
| 257 | /* Number of legacy STAs associated */ |
| 258 | tLimProtStaParams gLim11bParams; |
| 259 | |
| 260 | /* Number of 11A STAs associated */ |
| 261 | tLimProtStaParams gLim11aParams; |
| 262 | |
| 263 | /* Number of non-ht non-legacy STAs associated */ |
| 264 | tLimProtStaParams gLim11gParams; |
| 265 | |
| 266 | /* Number of nonGf STA associated */ |
| 267 | tLimProtStaParams gLimNonGfParams; |
| 268 | |
| 269 | /* Number of HT 20 STAs associated */ |
| 270 | tLimProtStaParams gLimHt20Params; |
| 271 | |
| 272 | /* Number of Lsig Txop not supported STAs associated */ |
| 273 | tLimProtStaParams gLimLsigTxopParams; |
| 274 | |
| 275 | /* Number of STAs that do not support short preamble */ |
| 276 | tLimNoShortParams gLimNoShortParams; |
| 277 | |
| 278 | /* Number of STAs that do not support short slot time */ |
| 279 | tLimNoShortSlotParams gLimNoShortSlotParams; |
| 280 | |
| 281 | /* OLBC parameters */ |
| 282 | tLimProtStaParams gLimOlbcParams; |
| 283 | |
| 284 | /* OLBC parameters */ |
| 285 | tLimProtStaParams gLimOverlap11gParams; |
| 286 | |
| 287 | tLimProtStaParams gLimOverlap11aParams; |
| 288 | tLimProtStaParams gLimOverlapHt20Params; |
| 289 | tLimProtStaParams gLimOverlapNonGfParams; |
| 290 | |
| 291 | /* cache for each overlap */ |
| 292 | tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE]; |
| 293 | |
| 294 | uint8_t privacy; |
| 295 | tAniAuthType authType; |
Srinivas Girigowda | d65dc5a | 2016-01-14 17:08:26 -0800 | [diff] [blame] | 296 | tSirKeyMaterial WEPKeyMaterial[MAX_WEP_KEYS]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 297 | |
| 298 | tDot11fIERSN gStartBssRSNIe; |
| 299 | tDot11fIEWPA gStartBssWPAIe; |
| 300 | tSirAPWPSIEs APWPSIEs; |
| 301 | uint8_t apUapsdEnable; |
| 302 | tSirWPSPBCSession *pAPWPSPBCSession; |
| 303 | uint32_t DefProbeRspIeBitmap[8]; |
| 304 | uint32_t proxyProbeRspEn; |
| 305 | tDot11fProbeResponse probeRespFrame; |
| 306 | uint8_t ssidHidden; |
| 307 | bool fwdWPSPBCProbeReq; |
| 308 | uint8_t wps_state; |
Abhishek Singh | f78bd2d | 2016-04-27 16:47:56 +0530 | [diff] [blame] | 309 | bool wps_registration; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 310 | |
| 311 | uint8_t limQosEnabled:1; /* 11E */ |
| 312 | uint8_t limWmeEnabled:1; /* WME */ |
| 313 | uint8_t limWsmEnabled:1; /* WSM */ |
| 314 | uint8_t limHcfEnabled:1; |
| 315 | uint8_t lim11dEnabled:1; |
| 316 | #ifdef WLAN_FEATURE_11W |
| 317 | uint8_t limRmfEnabled:1; /* 11W */ |
| 318 | #endif |
| 319 | uint32_t lim11hEnable; |
| 320 | |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 321 | int8_t maxTxPower; /* MIN (Regulatory and local power constraint) */ |
Pragaspathi Thilagaraj | e64714a | 2019-05-23 00:46:25 +0530 | [diff] [blame] | 322 | enum QDF_OPMODE opmode; |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 323 | int8_t txMgmtPower; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 324 | bool is11Rconnection; |
Pragaspathi Thilagaraj | 54018e0 | 2019-04-25 01:32:17 +0530 | [diff] [blame] | 325 | bool is_adaptive_11r_connection; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 326 | |
| 327 | #ifdef FEATURE_WLAN_ESE |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 328 | bool isESEconnection; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 329 | tEsePEContext eseContext; |
| 330 | #endif |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 331 | bool isFastTransitionEnabled; |
| 332 | bool isFastRoamIniFeatureEnabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 333 | tSirP2PNoaAttr p2pGoPsUpdate; |
| 334 | uint32_t defaultAuthFailureTimeout; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 335 | |
| 336 | /* EDCA QoS parameters |
| 337 | * gLimEdcaParams - These EDCA parameters are used locally on AP or STA. |
| 338 | * If STA, then these are values taken from the Assoc Rsp when associating, |
| 339 | * or Beacons/Probe Response after association. If AP, then these are |
| 340 | * values originally set locally on AP. |
| 341 | * |
| 342 | * gLimEdcaParamsBC - These EDCA parameters are use by AP to broadcast |
| 343 | * to other STATIONs in the BSS. |
| 344 | * |
| 345 | * gLimEdcaParamsActive: These EDCA parameters are what's actively being |
| 346 | * used on station. Specific AC values may be downgraded depending on |
| 347 | * admission control for that particular AC. |
| 348 | */ |
Srinivas Girigowda | 5b86fbd | 2019-03-21 14:54:14 -0700 | [diff] [blame] | 349 | tSirMacEdcaParamRecord gLimEdcaParams[QCA_WLAN_AC_ALL]; /* used locally */ |
| 350 | tSirMacEdcaParamRecord gLimEdcaParamsBC[QCA_WLAN_AC_ALL]; /* used for broadcast */ |
| 351 | tSirMacEdcaParamRecord gLimEdcaParamsActive[QCA_WLAN_AC_ALL]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 352 | |
| 353 | uint8_t gLimEdcaParamSetCount; |
| 354 | |
| 355 | tBeaconParams beaconParams; |
| 356 | uint8_t vhtCapability; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 357 | tLimOperatingModeInfo gLimOperatingMode; |
| 358 | uint8_t vhtCapabilityPresentInBeacon; |
| 359 | uint8_t ch_center_freq_seg0; |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 360 | enum phy_ch_width ch_width; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 361 | uint8_t ch_center_freq_seg1; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 362 | uint8_t enableVhtpAid; |
| 363 | uint8_t enableVhtGid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 364 | tLimWiderBWChannelSwitchInfo gLimWiderBWChannelSwitch; |
| 365 | uint8_t enableAmpduPs; |
| 366 | uint8_t enableHtSmps; |
| 367 | uint8_t htSmpsvalue; |
Archana Ramachandran | fec2481 | 2016-02-16 16:31:56 -0800 | [diff] [blame] | 368 | bool send_smps_action; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 369 | uint8_t spectrumMgtEnabled; |
| 370 | /* *********************11H related**************************** */ |
| 371 | tLimSpecMgmtInfo gLimSpecMgmt; |
| 372 | /* CB Primary/Secondary Channel Switch Info */ |
| 373 | tLimChannelSwitchInfo gLimChannelSwitch; |
| 374 | /* *********************End 11H related**************************** */ |
| 375 | |
| 376 | /*Flag to Track Status/Indicate HBFailure on this session */ |
| 377 | bool LimHBFailureStatus; |
| 378 | uint32_t gLimPhyMode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 379 | uint8_t txLdpcIniFeatureEnabled; |
| 380 | /** |
| 381 | * Following is the place holder for free peer index pool. |
| 382 | * A non-zero value indicates that peer index is available |
| 383 | * for assignment. |
| 384 | */ |
| 385 | uint8_t *gpLimPeerIdxpool; |
| 386 | uint8_t freePeerIdxHead; |
| 387 | uint8_t freePeerIdxTail; |
| 388 | uint16_t gLimNumOfCurrentSTAs; |
| 389 | #ifdef FEATURE_WLAN_TDLS |
Kabilan Kannan | 32eb502 | 2016-10-04 12:24:50 -0700 | [diff] [blame] | 390 | /* TDLS parameters to check whether TDLS |
| 391 | * and TDLS channel switch is allowed in the |
| 392 | * AP network |
| 393 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 394 | uint32_t peerAIDBitmap[2]; |
| 395 | bool tdls_prohibited; |
| 396 | bool tdls_chan_swit_prohibited; |
Bala Venkatesh | 33f270b | 2019-01-14 16:31:29 +0530 | [diff] [blame] | 397 | bool tdls_send_set_state_disable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 398 | #endif |
| 399 | bool fWaitForProbeRsp; |
| 400 | bool fIgnoreCapsChange; |
| 401 | bool fDeauthReceived; |
| 402 | #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM |
| 403 | int8_t rssi; |
| 404 | #endif |
Deepak Dhamdhere | 612392c | 2016-08-28 02:56:51 -0700 | [diff] [blame] | 405 | uint8_t max_amsdu_num; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 406 | uint8_t isCoalesingInIBSSAllowed; |
| 407 | |
Jeff Johnson | be119e6 | 2019-02-02 12:30:26 -0800 | [diff] [blame] | 408 | struct ht_config ht_config; |
Sandeep Puligilla | 9891743 | 2016-06-10 13:50:28 -0700 | [diff] [blame] | 409 | struct sir_vht_config vht_config; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 410 | /* |
| 411 | * Place holder for StartBssReq message |
| 412 | * received by SME state machine |
| 413 | */ |
| 414 | uint8_t gLimCurrentBssUapsd; |
| 415 | |
| 416 | /* Used on STA, this is a static UAPSD mask setting |
| 417 | * derived from SME_JOIN_REQ and SME_REASSOC_REQ. If a |
| 418 | * particular AC bit is set, it means the AC is both |
| 419 | * trigger enabled and delivery enabled. |
| 420 | */ |
| 421 | uint8_t gUapsdPerAcBitmask; |
| 422 | |
| 423 | /* Used on STA, this is a dynamic UPASD mask setting |
| 424 | * derived from AddTS Rsp and DelTS frame. If a |
| 425 | * particular AC bit is set, it means AC is trigger |
| 426 | * enabled. |
| 427 | */ |
| 428 | uint8_t gUapsdPerAcTriggerEnableMask; |
| 429 | |
| 430 | /* Used on STA, dynamic UPASD mask setting |
| 431 | * derived from AddTS Rsp and DelTs frame. If |
| 432 | * a particular AC bit is set, it means AC is |
| 433 | * delivery enabled. |
| 434 | */ |
| 435 | uint8_t gUapsdPerAcDeliveryEnableMask; |
| 436 | |
| 437 | /* Flag to skip CSA IE processing when CSA |
| 438 | * offload is enabled. |
| 439 | */ |
| 440 | uint8_t csaOffloadEnable; |
| 441 | |
| 442 | /* Used on STA for AC downgrade. This is a dynamic mask |
| 443 | * setting which keep tracks of ACs being admitted. |
| 444 | * If bit is set to 0: That partiular AC is not admitted |
| 445 | * If bit is set to 1: That particular AC is admitted |
| 446 | */ |
| 447 | uint8_t gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT]; |
| 448 | |
| 449 | /* Power Save Off load Parameters */ |
| 450 | tPowersaveoffloadInfo pmmOffloadInfo; |
| 451 | /* SMPS mode */ |
| 452 | uint8_t smpsMode; |
| 453 | |
| 454 | uint8_t chainMask; |
| 455 | |
| 456 | /* Flag to indicate Chan Sw announcement is required */ |
| 457 | uint8_t dfsIncludeChanSwIe; |
| 458 | |
| 459 | /* Flag to indicate Chan Wrapper Element is required */ |
| 460 | uint8_t dfsIncludeChanWrapperIe; |
| 461 | |
| 462 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 463 | uint8_t cc_switch_mode; |
| 464 | #endif |
| 465 | |
| 466 | bool isCiscoVendorAP; |
| 467 | |
Jeff Johnson | 21aac3a | 2019-02-02 14:26:13 -0800 | [diff] [blame] | 468 | struct add_ie_params add_ie_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 469 | |
| 470 | uint8_t *pSchProbeRspTemplate; |
| 471 | /* Beginning portion of the beacon frame to be written to TFP */ |
| 472 | uint8_t *pSchBeaconFrameBegin; |
| 473 | /* Trailing portion of the beacon frame to be written to TFP */ |
| 474 | uint8_t *pSchBeaconFrameEnd; |
| 475 | /* Size of the beginning portion */ |
| 476 | uint16_t schBeaconOffsetBegin; |
| 477 | /* Size of the trailing portion */ |
| 478 | uint16_t schBeaconOffsetEnd; |
| 479 | bool isOSENConnection; |
| 480 | /* DSCP to UP mapping for HS 2.0 */ |
Jeff Johnson | 7fb55e5 | 2019-02-06 11:28:12 -0800 | [diff] [blame] | 481 | struct qos_map_set QosMapSet; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 482 | |
| 483 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 484 | bool bRoamSynchInProgress; |
| 485 | #endif |
| 486 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 487 | /* Fast Transition (FT) */ |
| 488 | tftPEContext ftPEContext; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 489 | bool isNonRoamReassoc; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 490 | uint8_t is_key_installed; |
Jeff Johnson | 47d7524 | 2018-05-12 15:58:53 -0700 | [diff] [blame] | 491 | /* timer for resetting protection fileds at regular intervals */ |
Anurag Chouhan | 210db07 | 2016-02-22 18:42:15 +0530 | [diff] [blame] | 492 | qdf_mc_timer_t protection_fields_reset_timer; |
Pragaspathi Thilagaraj | 934275c | 2018-08-07 14:55:35 +0530 | [diff] [blame] | 493 | /* timer to decrement CSA/ECSA count */ |
| 494 | qdf_mc_timer_t ap_ecsa_timer; |
gaurank kathpalia | 2fcec84 | 2019-08-05 17:22:27 +0530 | [diff] [blame] | 495 | qdf_wake_lock_t ap_ecsa_wakelock; |
| 496 | qdf_runtime_lock_t ap_ecsa_runtime_lock; |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 497 | struct mac_context *mac_ctx; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 498 | /* |
| 499 | * variable to store state of various protection struct like |
| 500 | * gLimOlbcParams, gLimOverlap11gParams, gLimOverlapHt20Params etc |
| 501 | */ |
| 502 | uint16_t old_protection_state; |
| 503 | tSirMacAddr prev_ap_bssid; |
| 504 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
| 505 | /* tells if Q2Q IE, from another MDM device in AP MCC mode was recvd */ |
| 506 | bool sap_advertise_avoid_ch_ie; |
| 507 | #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ |
| 508 | #ifdef FEATURE_WLAN_ESE |
| 509 | uint8_t is_ese_version_ie_present; |
| 510 | #endif |
| 511 | uint8_t sap_dot11mc; |
| 512 | bool is_vendor_specific_vhtcaps; |
Kiran Kumar Lokere | 8172263 | 2017-09-26 12:11:43 -0700 | [diff] [blame] | 513 | uint8_t vendor_specific_vht_ie_sub_type; |
Kapil Gupta | 4b2efbb | 2016-10-03 13:07:20 +0530 | [diff] [blame] | 514 | bool vendor_vht_sap; |
Nitesh Shah | 0ddd4f6 | 2016-05-27 10:07:32 +0530 | [diff] [blame] | 515 | /* HS 2.0 Indication */ |
| 516 | tDot11fIEhs20vendor_ie hs20vendor_ie; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 517 | /* flag to indicate country code in beacon */ |
| 518 | uint8_t country_info_present; |
| 519 | uint8_t nss; |
Vignesh Viswanathan | d5a5f2e | 2018-06-01 15:35:51 +0530 | [diff] [blame] | 520 | bool nss_forced_1x1; |
Abhishek Singh | 96bda8e | 2015-12-03 16:45:35 +0530 | [diff] [blame] | 521 | bool add_bss_failed; |
Sandeep Puligilla | e087566 | 2016-02-12 16:09:21 -0800 | [diff] [blame] | 522 | /* To hold OBSS Scan IE Parameters */ |
| 523 | struct obss_scanparam obss_ht40_scanparam; |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 524 | uint8_t vdev_nss; |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 525 | /* Supported NSS is intersection of self and peer NSS */ |
| 526 | bool supported_nss_1x1; |
Agrawal Ashish | 0f94b57 | 2016-02-22 13:27:06 +0530 | [diff] [blame] | 527 | bool is_ext_caps_present; |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 528 | uint16_t beacon_tx_rate; |
Kondabattini, Ganesh | e4f18e0 | 2016-09-13 13:01:22 +0530 | [diff] [blame] | 529 | uint8_t *access_policy_vendor_ie; |
Kondabattini, Ganesh | b72e25c | 2016-09-02 14:43:59 +0530 | [diff] [blame] | 530 | uint8_t access_policy; |
Selvaraj, Sridhar | ac4fcf3 | 2016-09-28 12:57:32 +0530 | [diff] [blame] | 531 | bool ignore_assoc_disallowed; |
Abhishek Singh | 5695e2a | 2016-10-28 10:39:12 +0530 | [diff] [blame] | 532 | bool send_p2p_conf_frame; |
Deepak Dhamdhere | 2dae1bd | 2016-10-27 10:58:29 -0700 | [diff] [blame] | 533 | bool process_ho_fail; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 534 | /* Number of STAs that do not support ECSA capability */ |
| 535 | uint8_t lim_non_ecsa_cap_num; |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 536 | #ifdef WLAN_FEATURE_11AX |
Krishna Kumaar Natarajan | 4f1d772 | 2017-03-03 21:12:51 -0800 | [diff] [blame] | 537 | bool he_capable; |
Naveen Rawat | d8feac1 | 2017-09-08 15:08:39 -0700 | [diff] [blame] | 538 | tDot11fIEhe_cap he_config; |
| 539 | tDot11fIEhe_op he_op; |
Manikandan Mohan | 39accff | 2017-05-02 16:09:00 -0700 | [diff] [blame] | 540 | uint32_t he_sta_obsspd; |
Kiran Kumar Lokere | b2ea027 | 2019-08-27 19:16:36 -0700 | [diff] [blame] | 541 | bool he_6ghz_band; |
Peng Xu | 6363ec6 | 2017-05-15 11:06:33 -0700 | [diff] [blame] | 542 | #ifdef WLAN_FEATURE_11AX_BSS_COLOR |
| 543 | tDot11fIEbss_color_change he_bss_color_change; |
| 544 | struct bss_color_info bss_color_info[MAX_BSS_COLOR_VALUE]; |
| 545 | uint8_t bss_color_changing; |
| 546 | #endif |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 547 | #endif |
Selvaraj, Sridhar | 05ea079 | 2017-05-17 12:17:03 +0530 | [diff] [blame] | 548 | bool enable_bcast_probe_rsp; |
Tushnim Bhattacharyya | 3d17def | 2017-06-19 11:13:43 -0700 | [diff] [blame] | 549 | uint8_t ht_client_cnt; |
Abhishek Singh | b59f8d4 | 2017-07-31 14:42:47 +0530 | [diff] [blame] | 550 | bool force_24ghz_in_ht20; |
Kiran Kumar Lokere | f9dc791 | 2017-06-28 18:10:58 -0700 | [diff] [blame] | 551 | bool ch_switch_in_progress; |
Kiran Kumar Lokere | 722dccd | 2018-02-23 13:23:52 -0800 | [diff] [blame] | 552 | bool he_with_wep_tkip; |
Sridhar Selvaraj | 8c6f5e8 | 2017-08-21 14:53:46 +0530 | [diff] [blame] | 553 | #ifdef WLAN_FEATURE_FILS_SK |
| 554 | struct pe_fils_session *fils_info; |
| 555 | #endif |
Naveen Rawat | 6fc3c50 | 2017-09-06 16:14:11 -0700 | [diff] [blame] | 556 | /* previous auth frame's sequence number */ |
| 557 | uint16_t prev_auth_seq_num; |
Arif Hussain | ee10f90 | 2017-12-27 16:30:17 -0800 | [diff] [blame] | 558 | struct obss_detection_cfg obss_offload_cfg; |
Arif Hussain | 91fa322 | 2018-01-22 19:42:54 -0800 | [diff] [blame] | 559 | struct obss_detection_cfg current_obss_detection; |
Arif Hussain | 1513cb2 | 2018-01-05 19:56:31 -0800 | [diff] [blame] | 560 | bool is_session_obss_offload_enabled; |
| 561 | bool is_obss_reset_timer_initialized; |
Padma, Santhosh Kumar | b8f65d9 | 2017-09-14 13:05:42 +0530 | [diff] [blame] | 562 | bool sae_pmk_cached; |
Varun Reddy Yeturu | b5d858e | 2017-12-15 16:08:13 -0800 | [diff] [blame] | 563 | bool fw_roaming_started; |
| 564 | bool recvd_deauth_while_roaming; |
| 565 | bool recvd_disassoc_while_roaming; |
| 566 | bool deauth_disassoc_rc; |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 567 | enum wmi_obss_color_collision_evt_type obss_color_collision_dec_evt; |
| 568 | bool is_session_obss_color_collision_det_enabled; |
Srinivas Girigowda | 5b86fbd | 2019-03-21 14:54:14 -0700 | [diff] [blame] | 569 | tSirMacEdcaParamRecord ap_mu_edca_params[QCA_WLAN_AC_ALL]; |
Kiran Kumar Lokere | b52cfc8 | 2018-10-08 21:54:38 -0700 | [diff] [blame] | 570 | bool mu_edca_present; |
Abhinav Kumar | d528d19 | 2018-03-09 17:31:12 +0530 | [diff] [blame] | 571 | int8_t def_max_tx_pwr; |
Kiran Kumar Lokere | eac7fe9 | 2018-07-24 16:56:01 -0700 | [diff] [blame] | 572 | bool active_ba_64_session; |
Sandeep Puligilla | 01fcd3d | 2019-02-08 18:17:04 -0800 | [diff] [blame] | 573 | bool is_mbssid_enabled; |
Varun Reddy Yeturu | 4f849e5 | 2018-06-15 18:08:37 -0700 | [diff] [blame] | 574 | #ifdef WLAN_SUPPORT_TWT |
| 575 | uint8_t peer_twt_requestor; |
| 576 | uint8_t peer_twt_responder; |
| 577 | #endif |
Arif Hussain | 6686c0b | 2018-08-21 18:21:05 -0700 | [diff] [blame] | 578 | bool enable_session_twt_support; |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 579 | uint32_t cac_duration_ms; |
Abhishek Singh | 06522c5 | 2019-05-08 12:13:42 +0530 | [diff] [blame] | 580 | tSirResultCodes stop_bss_reason; |
Abhishek Ambure | 40972f1 | 2019-08-21 19:43:18 +0530 | [diff] [blame] | 581 | uint16_t prot_status_code; |
| 582 | tSirResultCodes result_code; |
Abhishek Singh | 20a8e44 | 2018-09-12 15:50:44 +0530 | [diff] [blame] | 583 | uint32_t dfs_regdomain; |
Jeff Johnson | 0f99bd8 | 2018-11-18 18:42:12 -0800 | [diff] [blame] | 584 | }; |
| 585 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 586 | /*------------------------------------------------------------------------- |
| 587 | Function declarations and documenation |
| 588 | ------------------------------------------------------------------------*/ |
| 589 | |
Qiwei Cai | 50a2108 | 2018-08-07 14:30:09 +0800 | [diff] [blame] | 590 | #ifdef WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY |
| 591 | /** |
| 592 | * pe_allocate_dph_node_array_buffer() - Allocate g_dph_node_array |
| 593 | * memory dynamically |
| 594 | * |
| 595 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_NOMEM on failure |
| 596 | */ |
| 597 | QDF_STATUS pe_allocate_dph_node_array_buffer(void); |
| 598 | |
| 599 | /** |
| 600 | * pe_free_dph_node_array_buffer() - Free memory allocated dynamically |
| 601 | * |
| 602 | * Return: None |
| 603 | */ |
| 604 | void pe_free_dph_node_array_buffer(void); |
| 605 | #else /* WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY */ |
| 606 | static inline QDF_STATUS pe_allocate_dph_node_array_buffer(void) |
| 607 | { |
| 608 | return QDF_STATUS_SUCCESS; |
| 609 | } |
| 610 | |
| 611 | static inline void pe_free_dph_node_array_buffer(void) |
| 612 | { |
| 613 | } |
| 614 | #endif /* WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY */ |
| 615 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 616 | /** |
Rajeev Kumar Sirasanagandla | e3b5991 | 2018-08-24 15:53:31 +0530 | [diff] [blame] | 617 | * pe_create_session() - Creates a new PE session given the BSSID |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 618 | * @mac: pointer to global adapter context |
Rajeev Kumar Sirasanagandla | e3b5991 | 2018-08-24 15:53:31 +0530 | [diff] [blame] | 619 | * @bssid: BSSID of the new session |
| 620 | * @sessionId: PE session ID is returned here, if PE session is created. |
| 621 | * @numSta: number of stations |
| 622 | * @bssType: bss type of new session to do conditional memory allocation. |
Abhishek Singh | 345be41 | 2019-11-19 10:59:29 +0530 | [diff] [blame] | 623 | * @vdev_id: vdev_id |
Abhishek Singh | ec2dbe2 | 2019-11-25 11:14:17 +0530 | [diff] [blame] | 624 | * @opmode: operating mode |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 625 | * |
| 626 | * This function returns the session context and the session ID if the session |
| 627 | * corresponding to the passed BSSID is found in the PE session table. |
| 628 | * |
| 629 | * Return: ptr to the session context or NULL if session can not be created. |
| 630 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 631 | struct pe_session *pe_create_session(struct mac_context *mac, |
Abhishek Singh | ec2dbe2 | 2019-11-25 11:14:17 +0530 | [diff] [blame] | 632 | uint8_t *bssid, uint8_t *sessionId, |
| 633 | uint16_t numSta, enum bss_type bssType, |
| 634 | uint8_t vdev_id, enum QDF_OPMODE opmode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 635 | |
| 636 | /** |
| 637 | * pe_find_session_by_bssid() - looks up the PE session given the BSSID. |
| 638 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 639 | * @mac: pointer to global adapter context |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 640 | * @bssid: BSSID of the new session |
| 641 | * @sessionId: session ID is returned here, if session is created. |
| 642 | * |
| 643 | * This function returns the session context and the session ID if the session |
| 644 | * corresponding to the given BSSID is found in the PE session table. |
| 645 | * |
| 646 | * Return: pointer to the session context or NULL if session is not found. |
| 647 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 648 | struct pe_session *pe_find_session_by_bssid(struct mac_context *mac, uint8_t *bssid, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 649 | uint8_t *sessionId); |
| 650 | |
| 651 | /** |
Abhishek Singh | c70afa3 | 2019-09-19 15:17:21 +0530 | [diff] [blame] | 652 | * pe_find_session_by_vdev_id() - looks up the PE session given the vdev_id. |
| 653 | * @mac: pointer to global adapter context |
| 654 | * @vdev_id: vdev id the session |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 655 | * |
| 656 | * Return: pointer to the session context or NULL if session is not found. |
| 657 | */ |
Abhishek Singh | c70afa3 | 2019-09-19 15:17:21 +0530 | [diff] [blame] | 658 | struct pe_session *pe_find_session_by_vdev_id(struct mac_context *mac, |
| 659 | uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 660 | |
| 661 | /** |
Jianmin Zhu | 5769244 | 2020-01-03 11:43:09 +0800 | [diff] [blame] | 662 | * pe_find_session_by_vdev_id_and_state() - Find PE session by vdev_id and |
| 663 | * mlm state. |
| 664 | * @mac: pointer to global adapter context |
| 665 | * @vdev_id: vdev id the session |
| 666 | * @vdev_id: vdev id the session |
| 667 | * |
| 668 | * During LFR2 roaming, new pe session is created before old pe session |
| 669 | * deleted, the 2 pe sessions have different pe session id, but same vdev id, |
| 670 | * can't get correct pe session by vdev id at this time. |
| 671 | * |
| 672 | * Return: pointer to the session context or NULL if session is not found. |
| 673 | */ |
| 674 | struct pe_session |
| 675 | *pe_find_session_by_vdev_id_and_state(struct mac_context *mac, |
| 676 | uint8_t vdev_id, |
| 677 | enum eLimMlmStates lim_state); |
| 678 | |
| 679 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 680 | * pe_find_session_by_peer_sta() - looks up the PE session given the Peer |
| 681 | * Station Address. |
| 682 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 683 | * @mac: pointer to global adapter context |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 684 | * @sa: Peer STA Address of the session |
| 685 | * @sessionId: session ID is returned here, if session is found. |
| 686 | * |
| 687 | * This function returns the session context and the session ID if the session |
| 688 | * corresponding to the given destination address is found in the PE session |
| 689 | * table. |
| 690 | * |
| 691 | * Return: pointer to the session context or NULL if session is not found. |
| 692 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 693 | struct pe_session *pe_find_session_by_peer_sta(struct mac_context *mac, uint8_t *sa, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 694 | uint8_t *sessionId); |
| 695 | |
| 696 | /** |
| 697 | * pe_find_session_by_session_id() - looks up the PE session given the session |
| 698 | * ID. |
| 699 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 700 | * @mac: pointer to global adapter context |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 701 | * @sessionId: session ID for which session context needs to be looked up. |
| 702 | * |
| 703 | * This function returns the session context if the session corresponding to |
| 704 | * the given session ID is found in the PE session table. |
| 705 | * |
| 706 | * Return: pointer to the session context or NULL if session is not found. |
| 707 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 708 | struct pe_session *pe_find_session_by_session_id(struct mac_context *mac, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 709 | uint8_t sessionId); |
| 710 | |
| 711 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 712 | * pe_delete_session() - deletes the PE session given the session ID. |
| 713 | * |
Jeff Johnson | 348973e | 2018-11-22 16:51:12 -0800 | [diff] [blame] | 714 | * @mac: pointer to global adapter context |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 715 | * @sessionId: session ID to delete. |
| 716 | * |
| 717 | * Return: void |
| 718 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 719 | void pe_delete_session(struct mac_context *mac, struct pe_session *pe_session); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 720 | |
Min Liu | 93073af | 2018-09-18 19:10:41 +0800 | [diff] [blame] | 721 | /** |
| 722 | * pe_find_session_by_scan_id() - looks up the PE session for given scan id |
| 723 | * @mac_ctx: pointer to global adapter context |
| 724 | * @scan_id: scan id |
| 725 | * |
| 726 | * looks up the PE session for given scan id |
| 727 | * |
| 728 | * Return: pe session entry for given scan id if found else NULL |
| 729 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 730 | struct pe_session *pe_find_session_by_scan_id(struct mac_context *mac_ctx, |
Min Liu | 93073af | 2018-09-18 19:10:41 +0800 | [diff] [blame] | 731 | uint32_t scan_id); |
| 732 | |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 733 | uint8_t pe_get_active_session_count(struct mac_context *mac_ctx); |
Sridhar Selvaraj | 0d5d2c7 | 2017-08-17 17:30:01 +0530 | [diff] [blame] | 734 | #ifdef WLAN_FEATURE_FILS_SK |
| 735 | /** |
| 736 | * pe_delete_fils_info: API to delete fils session info |
| 737 | * @session: pe session |
| 738 | * |
| 739 | * Return: void |
| 740 | */ |
Jeff Johnson | 0bb3316 | 2018-11-18 22:20:42 -0800 | [diff] [blame] | 741 | void pe_delete_fils_info(struct pe_session *session); |
Sridhar Selvaraj | 0d5d2c7 | 2017-08-17 17:30:01 +0530 | [diff] [blame] | 742 | #endif |
Vignesh Viswanathan | b3dbbc8 | 2018-04-06 00:06:27 +0530 | [diff] [blame] | 743 | |
| 744 | /** |
| 745 | * lim_set_bcn_probe_filter - set the beacon/probe filter in mac context |
| 746 | * |
| 747 | * @mac_ctx: pointer to global mac context |
| 748 | * @session: pointer to the PE session |
| 749 | * @ibss_ssid: SSID of the session for IBSS sessions |
| 750 | * @sap_channel: Operating Channel of the session for SAP sessions |
| 751 | * |
| 752 | * Sets the beacon/probe filter in the global mac context to filter |
| 753 | * and drop beacon/probe frames before posting it to PE queue |
| 754 | * |
| 755 | * Return: None |
| 756 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 757 | void lim_set_bcn_probe_filter(struct mac_context *mac_ctx, |
Jeff Johnson | 0bb3316 | 2018-11-18 22:20:42 -0800 | [diff] [blame] | 758 | struct pe_session *session, |
Vignesh Viswanathan | b3dbbc8 | 2018-04-06 00:06:27 +0530 | [diff] [blame] | 759 | tSirMacSSid *ibss_ssid, |
| 760 | uint8_t sap_channel); |
| 761 | |
| 762 | /** |
| 763 | * lim_reset_bcn_probe_filter - clear the beacon/probe filter in mac context |
| 764 | * |
| 765 | * @mac_ctx: pointer to the global mac context |
| 766 | * @session: pointer to the PE session whose filter is to be cleared |
| 767 | * |
| 768 | * Return: None |
| 769 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 770 | void lim_reset_bcn_probe_filter(struct mac_context *mac_ctx, struct pe_session *session); |
Vignesh Viswanathan | b3dbbc8 | 2018-04-06 00:06:27 +0530 | [diff] [blame] | 771 | |
| 772 | /** |
| 773 | * lim_update_bcn_probe_filter - Update the beacon/probe filter in mac context |
| 774 | * |
| 775 | * @mac_ctx: pointer to the global mac context |
| 776 | * @session: pointer to the PE session whose filter is to be cleared |
| 777 | * |
| 778 | * This API is applicable only for SAP sessions to update the SAP channel |
| 779 | * in the filter during a channel switch |
| 780 | * |
| 781 | * Return: None |
| 782 | */ |
Jeff Johnson | 9320c1e | 2018-12-02 13:09:20 -0800 | [diff] [blame] | 783 | void lim_update_bcn_probe_filter(struct mac_context *mac_ctx, struct pe_session *session); |
Vignesh Viswanathan | b3dbbc8 | 2018-04-06 00:06:27 +0530 | [diff] [blame] | 784 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 785 | #endif /* #if !defined( __LIM_SESSION_H ) */ |