Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Sravan Kumar Kairam | fb0b19d | 2018-02-01 12:25:28 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. |
Kiet Lam | 1ed83fc | 2014-02-19 01:15:45 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 26 | */ |
Kiet Lam | 1ed83fc | 2014-02-19 01:15:45 -0800 | [diff] [blame] | 27 | |
| 28 | |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 29 | |
| 30 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 31 | #ifndef WLAN_QCT_TLI_H |
| 32 | #define WLAN_QCT_TLI_H |
| 33 | |
| 34 | /*=========================================================================== |
| 35 | |
| 36 | W L A N T R A N S P O R T L A Y E R |
| 37 | I N T E R N A L A P I |
| 38 | |
| 39 | |
| 40 | DESCRIPTION |
| 41 | This file contains the internal declarations used within wlan transport |
| 42 | layer module. |
| 43 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 44 | ===========================================================================*/ |
| 45 | |
| 46 | |
| 47 | /*=========================================================================== |
| 48 | |
| 49 | EDIT HISTORY FOR FILE |
| 50 | |
| 51 | |
| 52 | This section contains comments describing changes made to the module. |
| 53 | Notice that changes are listed in reverse chronological order. |
| 54 | |
| 55 | |
| 56 | $Header:$ $DateTime: $ $Author: $ |
| 57 | |
| 58 | |
| 59 | when who what, where, why |
| 60 | -------- --- ---------------------------------------------------------- |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 61 | 08/19/13 rajekuma Added RMC support in TL |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 62 | 02/19/10 bad Fixed 802.11 to 802.3 ft issues with WAPI |
| 63 | 01/14/10 rnair Fixed the byte order for the WAI packet type. |
| 64 | 01/08/10 lti Added TL Data Caching |
| 65 | 10/09/09 rnair Add support for WAPI |
| 66 | 02/02/09 sch Add Handoff support |
| 67 | 12/09/08 lti Fixes for AMSS compilation |
| 68 | 12/02/08 lti Fix fo trigger frame generation |
| 69 | 10/31/08 lti Fix fo TL tx suspend |
| 70 | 10/01/08 lti Merged in fixes from reordering |
| 71 | 09/05/08 lti Fixes following QOS unit testing |
| 72 | 08/06/08 lti Added QOS support |
| 73 | 07/18/08 lti Fixes following integration |
| 74 | Added frame translation |
| 75 | 06/26/08 lti Fixes following unit testing |
| 76 | 05/05/08 lti Created module. |
| 77 | |
| 78 | ===========================================================================*/ |
| 79 | |
| 80 | |
| 81 | |
| 82 | /*=========================================================================== |
| 83 | |
| 84 | INCLUDE FILES FOR MODULE |
| 85 | |
| 86 | ===========================================================================*/ |
| 87 | |
| 88 | /*---------------------------------------------------------------------------- |
| 89 | * Include Files |
| 90 | * -------------------------------------------------------------------------*/ |
| 91 | #include "vos_packet.h" |
| 92 | #include "vos_api.h" |
| 93 | #include "vos_timer.h" |
| 94 | #include "vos_mq.h" |
| 95 | #include "vos_list.h" |
| 96 | #include "wlan_qct_tl.h" |
| 97 | #include "pmcApi.h" |
| 98 | #include "wlan_qct_hal.h" |
| 99 | |
| 100 | |
| 101 | #define STATIC static |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 102 | /*---------------------------------------------------------------------------- |
| 103 | * Preprocessor Definitions and Constants |
| 104 | * -------------------------------------------------------------------------*/ |
| 105 | |
| 106 | /*Maximum number of TIDs */ |
| 107 | #define WLAN_MAX_TID 8 |
| 108 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 109 | /*Offset of the OUI field inside the LLC/SNAP header*/ |
| 110 | #define WLANTL_LLC_OUI_OFFSET 3 |
| 111 | |
| 112 | /*Size of the OUI type field inside the LLC/SNAP header*/ |
| 113 | #define WLANTL_LLC_OUI_SIZE 3 |
| 114 | |
| 115 | /*Offset of the protocol type field inside the LLC/SNAP header*/ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 116 | #define WLANTL_LLC_PROTO_TYPE_OFFSET (WLANTL_LLC_OUI_OFFSET + WLANTL_LLC_OUI_SIZE) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 117 | |
| 118 | /*Size of the protocol type field inside the LLC/SNAP header*/ |
| 119 | #define WLANTL_LLC_PROTO_TYPE_SIZE 2 |
| 120 | |
| 121 | /*802.1x protocol type */ |
| 122 | #define WLANTL_LLC_8021X_TYPE 0x888E |
| 123 | |
| 124 | /*WAPI protocol type */ |
| 125 | #define WLANTL_LLC_WAI_TYPE 0x88b4 |
Hanumantha Reddy Pothula | ee001fc | 2015-05-26 15:21:53 +0530 | [diff] [blame] | 126 | #define WLANTL_ETHERTYPE_ARP 0x0806 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 127 | |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 128 | #ifdef FEATURE_WLAN_TDLS |
| 129 | #define WLANTL_LLC_TDLS_TYPE 0x890d |
| 130 | #endif |
| 131 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 132 | /*Length offset inside the AMSDU sub-frame header*/ |
| 133 | #define WLANTL_AMSDU_SUBFRAME_LEN_OFFSET 12 |
| 134 | |
| 135 | /*802.3 header definitions*/ |
| 136 | #define WLANTL_802_3_HEADER_LEN 14 |
| 137 | |
| 138 | /* Offset of DA field in a 802.3 header*/ |
| 139 | #define WLANTL_802_3_HEADER_DA_OFFSET 0 |
| 140 | |
| 141 | /*802.11 header definitions - header len without QOS ctrl field*/ |
| 142 | #define WLANTL_802_11_HEADER_LEN 24 |
| 143 | |
| 144 | /*802.11 header length + QOS ctrl field*/ |
| 145 | #define WLANTL_MPDU_HEADER_LEN 32 |
| 146 | |
| 147 | /*802.11 header definitions*/ |
| 148 | #define WLANTL_802_11_MAX_HEADER_LEN 40 |
| 149 | |
| 150 | /*802.11 header definitions - qos ctrl field len*/ |
| 151 | #define WLANTL_802_11_HEADER_QOS_CTL 2 |
| 152 | |
| 153 | /*802.11 header definitions - ht ctrl field len*/ |
| 154 | #define WLANTL_802_11_HEADER_HT_CTL 4 |
| 155 | |
| 156 | /* Offset of Addr1 field in a 802.11 header*/ |
| 157 | #define WLANTL_802_11_HEADER_ADDR1_OFFSET 4 |
| 158 | |
| 159 | /*802.11 ADDR4 MAC addr field len */ |
| 160 | #define WLANTL_802_11_HEADER_ADDR4_LEN VOS_MAC_ADDR_SIZE |
| 161 | |
| 162 | /* Length of an AMSDU sub-frame */ |
| 163 | #define TL_AMSDU_SUBFRM_HEADER_LEN 14 |
| 164 | |
| 165 | /* Length of the LLC header*/ |
| 166 | #define WLANTL_LLC_HEADER_LEN 8 |
| 167 | |
| 168 | /*As per 802.11 spec */ |
| 169 | #define WLANTL_MGMT_FRAME_TYPE 0x00 |
| 170 | #define WLANTL_CTRL_FRAME_TYPE 0x10 |
| 171 | #define WLANTL_DATA_FRAME_TYPE 0x20 |
| 172 | |
Siddharth Bhal | 4551b10 | 2014-10-09 21:36:36 +0530 | [diff] [blame] | 173 | #define WLANTL_MGMT_PROBE_REQ_FRAME_TYPE 0x04 |
| 174 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 175 | /*Value of the data type field in the 802.11 frame */ |
| 176 | #define WLANTL_80211_DATA_TYPE 0x02 |
| 177 | #define WLANTL_80211_DATA_QOS_SUBTYPE 0x08 |
| 178 | #define WLANTL_80211_NULL_QOS_SUBTYPE 0x0C |
Dino Mycle | 3b9536d | 2014-07-09 22:05:24 +0530 | [diff] [blame] | 179 | #define WLANTL_80211_MGMT_ACTION_SUBTYPE 0x0D |
| 180 | #define WLANTL_80211_MGMT_ACTION_NO_ACK_SUBTYPE 0x0E |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 181 | |
Madan Mohan Koyyalamudi | a148e1e | 2012-11-30 14:52:59 -0800 | [diff] [blame] | 182 | /*Defines for internal utility functions */ |
| 183 | #define WLANTL_FRAME_TYPE_BCAST 0xff |
| 184 | #define WLANTL_FRAME_TYPE_MCAST 0x01 |
| 185 | #define WLANTL_FRAME_TYPE_UCAST 0x00 |
| 186 | |
Dino Mycle | 3b9536d | 2014-07-09 22:05:24 +0530 | [diff] [blame] | 187 | #define WLANTL_FRAME_TYPESUBTYPE_MASK 0x3F |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 188 | |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 189 | #ifdef WLAN_FEATURE_RMC |
| 190 | #define WLANTL_RMC_HASH_TABLE_SIZE (32) |
| 191 | #endif |
| 192 | |
Sravan Kumar Kairam | 60b8cf0 | 2016-12-12 16:22:09 +0530 | [diff] [blame] | 193 | #define WLANTL_SAMPLE_INTERVAL 50 |
| 194 | #define WLANTL_SAMPLE_COUNT 2 |
| 195 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 196 | /*------------------------------------------------------------------------- |
| 197 | BT-AMP related definition - !!! should probably be moved to BT-AMP header |
| 198 | ---------------------------------------------------------------------------*/ |
| 199 | |
| 200 | /*------------------------------------------------------------------------- |
| 201 | Helper macros |
| 202 | ---------------------------------------------------------------------------*/ |
Alok Kumar | da6c888 | 2017-12-08 11:11:59 +0530 | [diff] [blame] | 203 | /*Checks STAID for MONITOR interface*/ |
| 204 | #define WLANTL_STA_ID_MONIFACE( _staid )( _staid == 253 || _staid == 254 || _staid == 255 ) |
| 205 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 206 | /*Checks STA index validity*/ |
| 207 | #define WLANTL_STA_ID_INVALID( _staid )( _staid >= WLAN_MAX_STA_COUNT ) |
| 208 | |
| 209 | /*As per Libra behavior */ |
| 210 | #define WLANTL_STA_ID_BCAST 0xFF |
| 211 | |
| 212 | /*Checks TID validity*/ |
| 213 | #define WLANTL_TID_INVALID( _tid ) ( _tid >= WLAN_MAX_TID ) |
| 214 | |
| 215 | /*Checks AC validity*/ |
| 216 | #define WLANTL_AC_INVALID( _tid ) ( _tid >= WLANTL_MAX_AC ) |
| 217 | |
| 218 | /*Determines the addr field offset based on the frame xtl bit*/ |
| 219 | #define WLANTL_MAC_ADDR_ALIGN( _dxtl ) \ |
| 220 | ( ( 0 == _dxtl ) ? \ |
| 221 | WLANTL_802_3_HEADER_DA_OFFSET: WLANTL_802_11_HEADER_ADDR1_OFFSET ) |
| 222 | |
| 223 | /*Determines the header len based on the disable xtl field*/ |
| 224 | #define WLANTL_MAC_HEADER_LEN( _dxtl) \ |
| 225 | ( ( 0 == _dxtl )? \ |
| 226 | WLANTL_802_3_HEADER_LEN:WLANTL_802_11_HEADER_LEN ) |
| 227 | |
| 228 | /*Determines the necesary length of the BD header - in case |
| 229 | UMA translation is enabled enough room needs to be left in front of the |
| 230 | packet for the 802.11 header to be inserted*/ |
| 231 | #define WLANTL_BD_HEADER_LEN( _dxtl ) \ |
| 232 | ( ( 0 == _dxtl )? \ |
| 233 | (WLANHAL_TX_BD_HEADER_SIZE+WLANTL_802_11_MAX_HEADER_LEN): WLANHAL_TX_BD_HEADER_SIZE ) |
| 234 | |
| 235 | |
| 236 | #define WLAN_TL_CEIL( _a, _b) (( 0 != (_a)%(_b))? (_a)/(_b) + 1: (_a)/(_b)) |
| 237 | |
| 238 | /*get TL control block from vos global context */ |
| 239 | #define VOS_GET_TL_CB(_pvosGCtx) \ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 240 | ((WLANTL_CbType*)vos_get_context( VOS_MODULE_ID_TL, _pvosGCtx)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 241 | |
| 242 | /* Check whether Rx frame is LS or EAPOL packet (other than data) */ |
| 243 | #define WLANTL_BAP_IS_NON_DATA_PKT_TYPE(usType) \ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 244 | ((WLANTL_BT_AMP_TYPE_AR == usType) || (WLANTL_BT_AMP_TYPE_SEC == usType) || \ |
| 245 | (WLANTL_BT_AMP_TYPE_LS_REQ == usType) || (WLANTL_BT_AMP_TYPE_LS_REP == usType)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 246 | |
| 247 | /*get RSSI0 from a RX BD*/ |
| 248 | /* 7 bits in phystats represent -100dBm to +27dBm */ |
| 249 | #define WLAN_TL_RSSI_CORRECTION 100 |
| 250 | #define WLANTL_GETRSSI0(pBD) (WDA_GETRSSI0(pBD) - WLAN_TL_RSSI_CORRECTION) |
| 251 | |
| 252 | /*get RSSI1 from a RX BD*/ |
| 253 | #define WLANTL_GETRSSI1(pBD) (WDA_GETRSSI1(pBD) - WLAN_TL_RSSI_CORRECTION) |
| 254 | |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 255 | #define WLANTL_GETSNR(pBD) WDA_GET_RX_SNR(pBD) |
| 256 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 257 | /* Check whether Rx frame is LS or EAPOL packet (other than data) */ |
| 258 | #define WLANTL_BAP_IS_NON_DATA_PKT_TYPE(usType) \ |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 259 | ((WLANTL_BT_AMP_TYPE_AR == usType) || (WLANTL_BT_AMP_TYPE_SEC == usType) || \ |
| 260 | (WLANTL_BT_AMP_TYPE_LS_REQ == usType) || (WLANTL_BT_AMP_TYPE_LS_REP == usType)) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 261 | |
Mihir Shete | b733727 | 2014-04-11 15:53:08 +0530 | [diff] [blame] | 262 | #define WLANTL_CACHE_TRACE_WATERMARK 100 |
Sravan Kumar Kairam | e0e7844 | 2017-09-18 18:00:53 +0530 | [diff] [blame] | 263 | |
| 264 | #define WLANTL_RSSI_SAMPLE_CNT 20 |
| 265 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 266 | /*--------------------------------------------------------------------------- |
| 267 | TL signals for TX thread |
| 268 | ---------------------------------------------------------------------------*/ |
| 269 | typedef enum |
| 270 | { |
| 271 | /*Suspend signal - following serialization of a HAL suspend request*/ |
| 272 | WLANTL_TX_SIG_SUSPEND = 0, |
| 273 | |
| 274 | /*Res need signal - triggered when all pending TxComp have been received |
| 275 | and TL is low on resources*/ |
| 276 | WLANTL_TX_RES_NEEDED = 1, |
| 277 | |
Katya Nigam | 664f503 | 2014-05-05 12:24:32 +0530 | [diff] [blame] | 278 | /* Forwarding RX cached frames. This is not used anymore as it is |
| 279 | replaced by WLANTL_RX_FWD_CACHED in RX thread*/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 280 | WLANTL_TX_FWD_CACHED = 2, |
| 281 | |
| 282 | /* Serialized STAID AC Indication */ |
| 283 | WLANTL_TX_STAID_AC_IND = 3, |
| 284 | |
| 285 | /* Serialzie TX transmit request */ |
| 286 | WLANTL_TX_START_XMIT = 4, |
| 287 | |
| 288 | /* Serialzie Finish UL Authentication request */ |
| 289 | WLANTL_FINISH_ULA = 5, |
| 290 | |
Madan Mohan Koyyalamudi | a96f544 | 2013-05-10 11:32:06 +0530 | [diff] [blame] | 291 | /* Serialized Snapshot request indication */ |
| 292 | WLANTL_TX_SNAPSHOT = 6, |
| 293 | |
Mihir Shete | fd62d9d | 2014-08-06 15:08:21 +0530 | [diff] [blame] | 294 | /* Detected a fatal error issue SSR */ |
| 295 | WLANTL_TX_FATAL_ERROR = 7, |
| 296 | |
Mihir Shete | 327c2ab | 2014-11-13 15:17:02 +0530 | [diff] [blame] | 297 | WLANTL_TX_FW_DEBUG = 8, |
| 298 | |
Sravan Kumar Kairam | e9d186c | 2015-11-27 23:37:02 +0530 | [diff] [blame] | 299 | WLANTL_TX_KICKDXE = 9, |
| 300 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 301 | WLANTL_TX_MAX |
| 302 | }WLANTL_TxSignalsType; |
| 303 | |
Katya Nigam | 664f503 | 2014-05-05 12:24:32 +0530 | [diff] [blame] | 304 | |
| 305 | /*--------------------------------------------------------------------------- |
| 306 | TL signals for RX thread |
| 307 | ---------------------------------------------------------------------------*/ |
| 308 | typedef enum |
| 309 | { |
| 310 | |
| 311 | /* Forwarding RX cached frames */ |
| 312 | WLANTL_RX_FWD_CACHED = 0, |
| 313 | |
Sravan Kumar Kairam | 091e5b6 | 2017-01-23 14:14:20 +0530 | [diff] [blame] | 314 | /* Forward pre assoc cached frames */ |
| 315 | WLANTL_RX_FWD_PRE_ASSOC_CACHED = 1, |
Katya Nigam | 664f503 | 2014-05-05 12:24:32 +0530 | [diff] [blame] | 316 | }WLANTL_RxSignalsType; |
| 317 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 318 | /*--------------------------------------------------------------------------- |
| 319 | STA Event type |
| 320 | ---------------------------------------------------------------------------*/ |
| 321 | typedef enum |
| 322 | { |
| 323 | /* Transmit frame event */ |
| 324 | WLANTL_TX_EVENT = 0, |
| 325 | |
| 326 | /* Receive frame event */ |
| 327 | WLANTL_RX_EVENT = 1, |
| 328 | |
| 329 | WLANTL_MAX_EVENT |
| 330 | }WLANTL_STAEventType; |
| 331 | |
| 332 | /*--------------------------------------------------------------------------- |
| 333 | |
| 334 | DESCRIPTION |
| 335 | State machine used by transport layer for receiving or transmitting |
| 336 | packets. |
| 337 | |
| 338 | PARAMETERS |
| 339 | |
| 340 | IN |
| 341 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 342 | control block can be extracted from its context |
| 343 | ucSTAId: identifier of the station being processed |
| 344 | vosDataBuff: pointer to the tx/rx vos buffer |
| 345 | |
| 346 | RETURN VALUE |
| 347 | The result code associated with performing the operation |
| 348 | |
| 349 | ---------------------------------------------------------------------------*/ |
| 350 | typedef VOS_STATUS (*WLANTL_STAFuncType)( v_PVOID_t pAdapter, |
| 351 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 352 | vos_pkt_t** pvosDataBuff, |
| 353 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 354 | |
| 355 | /*--------------------------------------------------------------------------- |
| 356 | STA FSM Entry type |
| 357 | ---------------------------------------------------------------------------*/ |
| 358 | typedef struct |
| 359 | { |
| 360 | WLANTL_STAFuncType pfnSTATbl[WLANTL_MAX_EVENT]; |
| 361 | } WLANTL_STAFsmEntryType; |
| 362 | |
| 363 | /* Receive in connected state - only EAPOL or WAI*/ |
| 364 | VOS_STATUS WLANTL_STARxConn( v_PVOID_t pAdapter, |
| 365 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 366 | vos_pkt_t** pvosDataBuff, |
| 367 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 368 | |
| 369 | /* Transmit in connected state - only EAPOL or WAI*/ |
| 370 | VOS_STATUS WLANTL_STATxConn( v_PVOID_t pAdapter, |
| 371 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 372 | vos_pkt_t** pvosDataBuff, |
| 373 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 374 | |
| 375 | /* Receive in authenticated state - all data allowed*/ |
| 376 | VOS_STATUS WLANTL_STARxAuth( v_PVOID_t pAdapter, |
| 377 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 378 | vos_pkt_t** pvosDataBuff, |
| 379 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 380 | |
| 381 | /* Transmit in authenticated state - all data allowed*/ |
| 382 | VOS_STATUS WLANTL_STATxAuth( v_PVOID_t pAdapter, |
| 383 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 384 | vos_pkt_t** pvosDataBuff, |
| 385 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 386 | |
| 387 | /* Receive in disconnected state - no data allowed*/ |
| 388 | VOS_STATUS WLANTL_STARxDisc( v_PVOID_t pAdapter, |
| 389 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 390 | vos_pkt_t** pvosDataBuff, |
| 391 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 392 | |
| 393 | /* Transmit in disconnected state - no data allowed*/ |
| 394 | VOS_STATUS WLANTL_STATxDisc( v_PVOID_t pAdapter, |
| 395 | v_U8_t ucSTAId, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 396 | vos_pkt_t** pvosDataBuff, |
| 397 | v_BOOL_t bForwardIAPPwithLLC); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 398 | |
| 399 | /* TL State Machine */ |
| 400 | STATIC const WLANTL_STAFsmEntryType tlSTAFsm[WLANTL_STA_MAX_STATE] = |
| 401 | { |
| 402 | /* WLANTL_STA_INIT */ |
| 403 | { { |
| 404 | NULL, /* WLANTL_TX_EVENT - no packets should get transmitted*/ |
| 405 | NULL, /* WLANTL_RX_EVENT - no packets should be received - drop*/ |
| 406 | } }, |
| 407 | |
| 408 | /* WLANTL_STA_CONNECTED */ |
| 409 | { { |
| 410 | WLANTL_STATxConn, /* WLANTL_TX_EVENT - only EAPoL or WAI frames are allowed*/ |
| 411 | WLANTL_STARxConn, /* WLANTL_RX_EVENT - only EAPoL or WAI frames can be rx*/ |
| 412 | } }, |
| 413 | |
| 414 | /* WLANTL_STA_AUTHENTICATED */ |
| 415 | { { |
| 416 | WLANTL_STATxAuth, /* WLANTL_TX_EVENT - all data frames allowed*/ |
| 417 | WLANTL_STARxAuth, /* WLANTL_RX_EVENT - all data frames can be rx */ |
| 418 | } }, |
| 419 | |
| 420 | /* WLANTL_STA_DISCONNECTED */ |
| 421 | { { |
| 422 | WLANTL_STATxDisc, /* WLANTL_TX_EVENT - do nothing */ |
| 423 | WLANTL_STARxDisc, /* WLANTL_RX_EVENT - frames will still be fwd-ed*/ |
| 424 | } } |
| 425 | }; |
| 426 | |
| 427 | /*--------------------------------------------------------------------------- |
| 428 | Reordering information |
| 429 | ---------------------------------------------------------------------------*/ |
| 430 | |
| 431 | #define WLANTL_MAX_WINSIZE 64 |
| 432 | #define WLANTL_MAX_BA_SESSION 40 |
| 433 | |
| 434 | typedef struct |
| 435 | { |
| 436 | v_BOOL_t isAvailable; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 437 | v_U64_t ullReplayCounter[WLANTL_MAX_WINSIZE]; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 438 | v_PVOID_t arrayBuffer[WLANTL_MAX_WINSIZE]; |
| 439 | } WLANTL_REORDER_BUFFER_T; |
| 440 | |
| 441 | |
| 442 | /* To handle Frame Q aging, timer is needed |
| 443 | * After timer expired, Qed frames have to be routed to upper layer |
| 444 | * WLANTL_TIMER_EXPIER_UDATA_T is user data type for timer callback |
| 445 | */ |
| 446 | typedef struct |
| 447 | { |
| 448 | /* Global contect, HAL, HDD need this */ |
| 449 | v_PVOID_t pAdapter; |
| 450 | |
| 451 | /* TL context handle */ |
| 452 | v_PVOID_t pTLHandle; |
| 453 | |
| 454 | /* Current STAID, to know STA context */ |
| 455 | v_U32_t STAID; |
| 456 | |
| 457 | v_U8_t TID; |
| 458 | } WLANTL_TIMER_EXPIER_UDATA_T; |
| 459 | |
| 460 | typedef struct |
| 461 | { |
| 462 | /*specifies if re-order session exists*/ |
| 463 | v_U8_t ucExists; |
| 464 | |
| 465 | /* Current Index */ |
| 466 | v_U32_t ucCIndex; |
| 467 | |
| 468 | /* Count of the total packets in list*/ |
| 469 | v_U16_t usCount; |
| 470 | |
| 471 | /* vos ttimer to handle Qed frames aging */ |
| 472 | vos_timer_t agingTimer; |
| 473 | |
| 474 | /* Q windoe size */ |
| 475 | v_U32_t winSize; |
| 476 | |
| 477 | /* Available RX frame buffer size */ |
| 478 | v_U32_t bufferSize; |
| 479 | |
| 480 | /* Start Sequence number */ |
| 481 | v_U32_t SSN; |
| 482 | |
| 483 | /* BA session ID, generate by HAL */ |
| 484 | v_U32_t sessionID; |
| 485 | |
| 486 | v_U32_t currentESN; |
| 487 | |
| 488 | v_U32_t pendingFramesCount; |
| 489 | |
| 490 | vos_lock_t reorderLock; |
| 491 | |
| 492 | /* Aging timer callback user data */ |
| 493 | WLANTL_TIMER_EXPIER_UDATA_T timerUdata; |
| 494 | |
| 495 | WLANTL_REORDER_BUFFER_T *reorderBuffer; |
Madan Mohan Koyyalamudi | 31e4cad | 2013-08-21 20:21:14 +0530 | [diff] [blame] | 496 | |
| 497 | v_U16_t LastSN; |
Sravan Kumar Kairam | a97e237 | 2016-11-11 17:20:03 +0530 | [diff] [blame] | 498 | bool set_data_filter; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 499 | }WLANTL_BAReorderType; |
| 500 | |
| 501 | |
| 502 | /*--------------------------------------------------------------------------- |
| 503 | UAPSD information |
| 504 | ---------------------------------------------------------------------------*/ |
| 505 | typedef struct |
| 506 | { |
| 507 | /* flag set when a UAPSD session with triggers generated in fw is being set*/ |
| 508 | v_U8_t ucSet; |
| 509 | }WLANTL_UAPSDInfoType; |
| 510 | |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 511 | #ifdef WLAN_FEATURE_RMC |
| 512 | struct tTL_RMCList |
| 513 | { |
| 514 | struct tTL_RMCList *next; |
| 515 | v_MACADDR_t rmcAddr; |
| 516 | v_U16_t mcSeqCtl; |
| 517 | v_U32_t rxMCDupcnt; |
| 518 | }; |
| 519 | |
| 520 | typedef struct tTL_RMCList WLANTL_RMC_SESSION; |
| 521 | #endif |
| 522 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 523 | /*--------------------------------------------------------------------------- |
Mihir Shete | b733727 | 2014-04-11 15:53:08 +0530 | [diff] [blame] | 524 | per-STA cache info |
| 525 | ---------------------------------------------------------------------------*/ |
| 526 | typedef struct |
| 527 | { |
| 528 | v_U16_t cacheSize; |
| 529 | v_TIME_t cacheInitTime; |
| 530 | v_TIME_t cacheDoneTime; |
| 531 | v_TIME_t cacheClearTime; |
| 532 | }WLANTL_CacheInfoType; |
| 533 | |
Dino Mycle | 3b9536d | 2014-07-09 22:05:24 +0530 | [diff] [blame] | 534 | |
Mihir Shete | b733727 | 2014-04-11 15:53:08 +0530 | [diff] [blame] | 535 | /*--------------------------------------------------------------------------- |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 536 | STA Client type |
| 537 | ---------------------------------------------------------------------------*/ |
| 538 | typedef struct |
| 539 | { |
| 540 | /* Flag that keeps track of registration; only one STA with unique |
| 541 | ID allowed */ |
| 542 | v_U8_t ucExists; |
| 543 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 544 | /* Function pointer to the receive packet handler from HDD */ |
| 545 | WLANTL_STARxCBType pfnSTARx; |
| 546 | |
| 547 | /* Function pointer to the transmit complete confirmation handler |
| 548 | from HDD */ |
| 549 | WLANTL_TxCompCBType pfnSTATxComp; |
| 550 | |
| 551 | /* Function pointer to the packet retrieval routine in HDD */ |
| 552 | WLANTL_STAFetchPktCBType pfnSTAFetchPkt; |
| 553 | |
| 554 | /* Reordering information for the STA */ |
| 555 | WLANTL_BAReorderType atlBAReorderInfo[WLAN_MAX_TID]; |
| 556 | |
| 557 | /* STA Descriptor, contains information related to the new added STA */ |
| 558 | WLAN_STADescType wSTADesc; |
| 559 | |
| 560 | /* Current connectivity state of the STA */ |
| 561 | WLANTL_STAStateType tlState; |
| 562 | |
| 563 | /* Station priority */ |
| 564 | WLANTL_STAPriorityType tlPri; |
| 565 | |
| 566 | /* Value of the averaged RSSI for this station */ |
| 567 | v_S7_t rssiAvg; |
| 568 | |
| 569 | /* Value of the averaged RSSI for this station in BMPS */ |
| 570 | v_S7_t rssiAvgBmps; |
| 571 | |
Shailender Karmuchi | 13c0d08 | 2013-03-26 14:41:39 -0700 | [diff] [blame] | 572 | /* Value of the Alpha to calculate RSSI average */ |
| 573 | v_S7_t rssiAlpha; |
| 574 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 575 | /* Value of the averaged RSSI for this station */ |
| 576 | v_U32_t uLinkQualityAvg; |
| 577 | |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 578 | /* Sum of SNR for snrIdx number of consecutive frames */ |
| 579 | v_U32_t snrSum; |
| 580 | |
| 581 | /* Number of consecutive frames over which snrSum is calculated */ |
| 582 | v_S7_t snrIdx; |
| 583 | |
| 584 | /* Average SNR of previous 20 frames */ |
| 585 | v_S7_t prevSnrAvg; |
| 586 | |
| 587 | /* Average SNR returned by fw */ |
| 588 | v_S7_t snrAvgBmps; |
| 589 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 590 | /* Tx packet count per station per TID */ |
| 591 | v_U32_t auTxCount[WLAN_MAX_TID]; |
| 592 | |
| 593 | /* Rx packet count per station per TID */ |
| 594 | v_U32_t auRxCount[WLAN_MAX_TID]; |
| 595 | |
| 596 | /* Suspend flag */ |
| 597 | v_U8_t ucTxSuspended; |
| 598 | |
| 599 | /* Pointer to the AMSDU chain maintained by the AMSDU de-aggregation |
| 600 | completion sub-module */ |
| 601 | vos_pkt_t* vosAMSDUChainRoot; |
| 602 | |
| 603 | /* Pointer to the root of the chain */ |
| 604 | vos_pkt_t* vosAMSDUChain; |
| 605 | |
| 606 | /* Used for saving/restoring frame header for 802.3/11 AMSDU sub-frames */ |
| 607 | v_U8_t aucMPDUHeader[WLANTL_MPDU_HEADER_LEN]; |
| 608 | |
| 609 | /* length of the header */ |
| 610 | v_U8_t ucMPDUHeaderLen; |
| 611 | |
| 612 | /* Enabled ACs currently serviced by TL (automatic setup in TL)*/ |
Kanchanapally, Vidyullatha | ed969c6 | 2015-02-18 11:39:11 +0530 | [diff] [blame] | 613 | v_U8_t aucACMask[WLANTL_NUM_TX_QUEUES]; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 614 | |
| 615 | /* Current AC to be retrieved */ |
| 616 | WLANTL_ACEnumType ucCurrentAC; |
| 617 | |
| 618 | /*Packet pending flag - set if tx is pending for the station*/ |
| 619 | v_U8_t ucPktPending; |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 620 | |
Madan Mohan Koyyalamudi | 1541a5b | 2012-10-29 16:18:21 -0700 | [diff] [blame] | 621 | /*EAPOL Packet pending flag - set if EAPOL packet is pending for the station*/ |
| 622 | v_U8_t ucEapolPktPending; |
| 623 | |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 624 | /*used on tx packet to signal when there is no more data to tx for the |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 625 | moment=> packets can be passed to BAL */ |
| 626 | v_U8_t ucNoMoreData; |
| 627 | |
| 628 | /* Last serviced AC to be retrieved */ |
| 629 | WLANTL_ACEnumType ucServicedAC; |
| 630 | |
| 631 | /* Current weight for the AC */ |
| 632 | v_U8_t ucCurrentWeight; |
| 633 | |
| 634 | /* Info used for UAPSD trigger frame generation */ |
| 635 | WLANTL_UAPSDInfoType wUAPSDInfo[WLANTL_MAX_AC]; |
| 636 | |
| 637 | /* flag to signal if a trigger frames is pending */ |
| 638 | v_U8_t ucPendingTrigFrm; |
| 639 | |
| 640 | WLANTL_TRANSFER_STA_TYPE trafficStatistics; |
| 641 | |
| 642 | /*Members needed for packet caching in TL*/ |
| 643 | /*Begining of the cached packets chain*/ |
| 644 | vos_pkt_t* vosBegCachedFrame; |
| 645 | |
| 646 | /*Begining of the cached packets chain*/ |
| 647 | vos_pkt_t* vosEndCachedFrame; |
| 648 | |
Mihir Shete | b733727 | 2014-04-11 15:53:08 +0530 | [diff] [blame] | 649 | WLANTL_CacheInfoType tlCacheInfo; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 650 | /* LWM related fields */ |
| 651 | |
Katya Nigam | 6390293 | 2014-06-26 19:04:23 +0530 | [diff] [blame] | 652 | v_BOOL_t enableCaching; |
| 653 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 654 | //current station is slow. LWM mode is enabled. |
| 655 | v_BOOL_t ucLwmModeEnabled; |
| 656 | //LWM events is reported when LWM mode is on. Able to send more traffic |
| 657 | //under the constraints of uBuffThresholdMax |
| 658 | v_BOOL_t ucLwmEventReported; |
| 659 | |
| 660 | //v_U8_t uLwmEventReported; |
| 661 | |
| 662 | /* Flow control fields */ |
| 663 | //memory used in previous round |
| 664 | v_U8_t bmuMemConsumed; |
| 665 | |
| 666 | //the number packets injected in this round |
| 667 | v_U32_t uIngress_length; |
| 668 | |
| 669 | //number of packets allowed in current round beforing receiving new FW memory updates |
| 670 | v_U32_t uBuffThresholdMax; |
| 671 | |
| 672 | |
| 673 | // v_U32_t uEgress_length; |
| 674 | |
| 675 | // v_U32_t uIngress_length; |
| 676 | |
| 677 | // v_U32_t uBuffThresholdMax; |
| 678 | |
| 679 | // v_U32_t uBuffThresholdUsed; |
| 680 | |
| 681 | /* Value used to set LWM in FW. Initialized to 1/3* WLAN_STA_BMU_THRESHOLD_MAX |
| 682 | In the future, it can be dynamically adjusted if we find the reason to implement |
| 683 | such algorithm. */ |
| 684 | v_U32_t uLwmThreshold; |
| 685 | |
| 686 | //tx disable forced by Riva software |
| 687 | v_U16_t fcStaTxDisabled; |
| 688 | |
| 689 | /** HDD buffer status for packet scheduling. Once HDD |
| 690 | * stores a new packet in a previously empty queue, it |
| 691 | * will call TL interface to set the fields. The fields |
| 692 | * will be cleaned by TL when TL can't fetch more packets |
| 693 | * from the queue. */ |
| 694 | // the fields are ucPktPending and ucACMask; |
| 695 | |
| 696 | /* Queue to keep unicast station management frame */ |
| 697 | vos_list_t pStaManageQ; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 698 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 699 | /* 1 means replay check is needed for the station, |
| 700 | * 0 means replay check is not needed for the station*/ |
| 701 | v_BOOL_t ucIsReplayCheckValid; |
| 702 | |
| 703 | /* It contains 48-bit replay counter per TID*/ |
| 704 | v_U64_t ullReplayCounter[WLANTL_MAX_TID]; |
| 705 | |
Sravan Kumar Kairam | fb0b19d | 2018-02-01 12:25:28 +0530 | [diff] [blame] | 706 | /* Last seq number received on Tid */ |
| 707 | v_U16_t last_seq_no[WLANTL_MAX_TID]; |
| 708 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 709 | /* It contains no of replay packets found per STA. |
| 710 | It is for debugging purpose only.*/ |
| 711 | v_U32_t ulTotalReplayPacketsDetected; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 712 | |
Gopichand Nakkala | 8b54e91 | 2013-03-11 10:44:21 +0530 | [diff] [blame] | 713 | /* Set when pairwise key is installed, if ptkInstalled is |
| 714 | 1 then we have to encrypt the data irrespective of TL |
| 715 | state (CONNECTED/AUTHENTICATED) */ |
| 716 | v_U8_t ptkInstalled; |
Gopichand Nakkala | 8a2b144 | 2013-05-29 15:33:14 +0530 | [diff] [blame] | 717 | |
| 718 | v_U32_t linkCapacity; |
Dino Mycle | 3b9536d | 2014-07-09 22:05:24 +0530 | [diff] [blame] | 719 | |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 720 | #ifdef WLAN_FEATURE_RMC |
| 721 | WLANTL_RMC_SESSION *mcastSession[WLANTL_RMC_HASH_TABLE_SIZE]; |
| 722 | vos_lock_t mcLock; |
| 723 | #endif |
| 724 | |
Dino Mycle | 3b9536d | 2014-07-09 22:05:24 +0530 | [diff] [blame] | 725 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
| 726 | |
| 727 | /* Value of the averaged Data RSSI for this station */ |
| 728 | v_S7_t rssiDataAvg; |
| 729 | |
| 730 | /* Value of the averaged Data RSSI for this station in BMPS */ |
| 731 | v_S7_t rssiDataAvgBmps; |
| 732 | |
| 733 | /* Value of the Alpha to calculate Data RSSI average */ |
| 734 | v_S7_t rssiDataAlpha; |
| 735 | |
| 736 | WLANTL_InterfaceStatsType interfaceStats; |
| 737 | #endif |
Hanumantha Reddy Pothula | ee001fc | 2015-05-26 15:21:53 +0530 | [diff] [blame] | 738 | /* BD Rate for transmitting ARP packets */ |
| 739 | v_U8_t arpRate; |
Hanumantha Reddy Pothula | e5ab23d | 2015-09-14 18:08:24 +0530 | [diff] [blame] | 740 | v_BOOL_t arpOnWQ5; |
Bhargav Shah | fbaeca2 | 2016-07-13 10:27:35 +0530 | [diff] [blame] | 741 | |
| 742 | /* Disassoc in progress */ |
| 743 | v_BOOL_t disassoc_progress; |
Sravan Kumar Kairam | 60b8cf0 | 2016-12-12 16:22:09 +0530 | [diff] [blame] | 744 | |
| 745 | /* sample timer Tx frames */ |
| 746 | uint64_t tx_frames; |
| 747 | uint32_t tx_sample[WLANTL_SAMPLE_COUNT]; |
| 748 | uint64_t tx_samples_sum; |
| 749 | |
Sravan Kumar Kairam | b0edc61 | 2016-10-26 13:55:24 +0530 | [diff] [blame] | 750 | /* flow control */ |
| 751 | uint8_t weight; |
| 752 | uint8_t weight_count; |
| 753 | uint8_t per; |
| 754 | uint8_t set_flag; |
| 755 | uint16_t queue; |
| 756 | uint16_t trate; |
| 757 | |
Sravan Kumar Kairam | e0e7844 | 2017-09-18 18:00:53 +0530 | [diff] [blame] | 758 | /* RSSI sample avg */ |
| 759 | s8 rssi_sample[WLANTL_RSSI_SAMPLE_CNT]; |
| 760 | s16 rssi_sample_sum; |
| 761 | uint8_t rssi_sample_cnt; |
| 762 | uint8_t rssi_stale_idx; |
Hanumanth Reddy Pothula | 5732363 | 2017-12-06 17:55:09 +0530 | [diff] [blame] | 763 | uint16_t rate_idx; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 764 | }WLANTL_STAClientType; |
| 765 | |
| 766 | /*--------------------------------------------------------------------------- |
| 767 | BAP Client type |
| 768 | ---------------------------------------------------------------------------*/ |
| 769 | typedef struct |
| 770 | { |
| 771 | /* flag that keeps track of registration; only one non-data BT-AMP client |
| 772 | allowed */ |
| 773 | v_U8_t ucExists; |
| 774 | |
| 775 | /* pointer to the receive processing routine for non-data BT-AMP frames */ |
| 776 | WLANTL_BAPRxCBType pfnTlBAPRx; |
| 777 | |
| 778 | /* pointer to the flush call back complete function */ |
| 779 | WLANTL_FlushOpCompCBType pfnFlushOpCompleteCb; |
| 780 | |
| 781 | /* pointer to the non-data BT-AMP frame pending transmission */ |
| 782 | vos_pkt_t* vosPendingDataBuff; |
| 783 | |
| 784 | /* BAP station ID */ |
| 785 | v_U8_t ucBAPSTAId; |
| 786 | }WLANTL_BAPClientType; |
| 787 | |
| 788 | |
| 789 | /*--------------------------------------------------------------------------- |
| 790 | Management Frame Client type |
| 791 | ---------------------------------------------------------------------------*/ |
| 792 | typedef struct |
| 793 | { |
| 794 | /* flag that keeps track of registration; only one management frame |
| 795 | client allowed */ |
| 796 | v_U8_t ucExists; |
| 797 | |
| 798 | /* pointer to the receive processing routine for management frames */ |
| 799 | WLANTL_MgmtFrmRxCBType pfnTlMgmtFrmRx; |
| 800 | |
| 801 | /* pointer to the management frame pending transmission */ |
| 802 | vos_pkt_t* vosPendingDataBuff; |
| 803 | }WLANTL_MgmtFrmClientType; |
| 804 | |
| 805 | typedef struct |
| 806 | { |
| 807 | WLANTL_TrafficStatusChangedCBType trafficCB; |
| 808 | WLANTL_HO_TRAFFIC_STATUS_TYPE trafficStatus; |
| 809 | v_U32_t idleThreshold; |
| 810 | v_U32_t measurePeriod; |
| 811 | v_U32_t rtRXFrameCount; |
| 812 | v_U32_t rtTXFrameCount; |
| 813 | v_U32_t nrtRXFrameCount; |
| 814 | v_U32_t nrtTXFrameCount; |
| 815 | vos_timer_t trafficTimer; |
| 816 | v_PVOID_t usrCtxt; |
| 817 | } WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE; |
| 818 | |
| 819 | typedef struct |
| 820 | { |
| 821 | v_S7_t rssiValue; |
| 822 | v_U8_t triggerEvent[WLANTL_HS_NUM_CLIENT]; |
| 823 | v_PVOID_t usrCtxt[WLANTL_HS_NUM_CLIENT]; |
| 824 | v_U8_t whoIsClient[WLANTL_HS_NUM_CLIENT]; |
| 825 | WLANTL_RSSICrossThresholdCBType crossCBFunction[WLANTL_HS_NUM_CLIENT]; |
| 826 | v_U8_t numClient; |
| 827 | } WLANTL_HO_RSSI_INDICATION_TYPE; |
| 828 | |
| 829 | typedef struct |
| 830 | { |
| 831 | v_U8_t numThreshold; |
| 832 | v_U8_t regionNumber; |
| 833 | v_S7_t historyRSSI; |
| 834 | v_U8_t alpha; |
| 835 | v_U32_t sampleTime; |
| 836 | v_U32_t fwNotification; |
| 837 | } WLANTL_CURRENT_HO_STATE_TYPE; |
| 838 | |
| 839 | typedef struct |
| 840 | { |
| 841 | WLANTL_HO_RSSI_INDICATION_TYPE registeredInd[WLANTL_MAX_AVAIL_THRESHOLD]; |
| 842 | WLANTL_CURRENT_HO_STATE_TYPE currentHOState; |
| 843 | WLANTL_HO_TRAFFIC_STATUS_HANDLE_TYPE currentTraffic; |
| 844 | v_PVOID_t macCtxt; |
| 845 | vos_lock_t hosLock; |
| 846 | } WLANTL_HO_SUPPORT_TYPE; |
| 847 | |
Sravan Kumar Kairam | b0edc61 | 2016-10-26 13:55:24 +0530 | [diff] [blame] | 848 | typedef struct { |
| 849 | uint8 sta_id; |
| 850 | uint8 avg_per; |
| 851 | uint16 queue_len; |
| 852 | uint16_t rate; |
| 853 | uint16_t reserved; |
| 854 | } WLANTL_PerStaFlowControlParam; |
| 855 | |
| 856 | typedef struct { |
| 857 | uint8 num_stas; |
| 858 | WLANTL_PerStaFlowControlParam *sta_fc_info; |
| 859 | } WLANTL_FlowControlInfo; |
| 860 | |
Kapil Gupta | d90b386 | 2016-06-25 00:42:49 +0530 | [diff] [blame] | 861 | #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
| 862 | #define ROAM_MAX_INDEX_NUM 50 |
| 863 | #define ROAM_PER_INDEX_TIME 500 /* (msec) */ |
| 864 | #define MIN_PKTS_TO_START_MONTIOR 10 |
| 865 | |
| 866 | typedef struct |
| 867 | { |
| 868 | v_U64_t lowRateRxPacketsRcvd; |
| 869 | v_U64_t totalPktRcvd; |
| 870 | v_U64_t time; |
| 871 | }WLANTL_RoamTrafficStatsType; |
| 872 | |
| 873 | typedef struct { |
| 874 | v_U8_t running; |
| 875 | v_U8_t staId; |
| 876 | v_S7_t index; |
| 877 | v_U8_t intialPktToStart; |
| 878 | v_U8_t minPercentage; |
| 879 | v_U16_t minRate; |
| 880 | v_U16_t maxRate; |
| 881 | v_U32_t minPktRequired; |
| 882 | v_U64_t totalPkt; |
| 883 | v_U64_t timeToWait; |
| 884 | v_U64_t lowRatePkt; |
| 885 | v_U64_t lastTriggerTime; |
| 886 | WLANTL_RoamTrafficStatsType rxRoamStats[ROAM_MAX_INDEX_NUM]; |
| 887 | void (*triggerRoamScanfn) (void *, v_U8_t); |
| 888 | void *hHal; |
| 889 | }WLANTL_RoamMonitorType; |
| 890 | #endif |
| 891 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 892 | /*--------------------------------------------------------------------------- |
| 893 | TL control block type |
| 894 | ---------------------------------------------------------------------------*/ |
| 895 | typedef struct |
| 896 | { |
| 897 | /* TL configuration information */ |
| 898 | WLANTL_ConfigInfoType tlConfigInfo; |
| 899 | |
| 900 | /* list of the active stations */ |
Madan Mohan Koyylamudi | 3b8400c | 2013-01-24 17:47:01 +0530 | [diff] [blame] | 901 | WLANTL_STAClientType* atlSTAClients[WLAN_MAX_STA_COUNT]; |
| 902 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 903 | |
| 904 | /* information on the management frame client */ |
| 905 | WLANTL_MgmtFrmClientType tlMgmtFrmClient; |
| 906 | |
| 907 | /* information on the BT AMP client */ |
| 908 | WLANTL_BAPClientType tlBAPClient; |
| 909 | |
| 910 | /* number of packets sent to BAL waiting for tx complete confirmation */ |
| 911 | v_U16_t usPendingTxCompleteCount; |
| 912 | |
| 913 | /* global suspend flag */ |
| 914 | v_U8_t ucTxSuspended; |
| 915 | |
| 916 | /* resource flag */ |
| 917 | v_U32_t uResCount; |
| 918 | |
| 919 | /* dummy vos buffer - used for chains */ |
| 920 | vos_pkt_t* vosDummyBuf; |
| 921 | |
| 922 | /* temporary buffer for storing the packet that no longer fits */ |
| 923 | vos_pkt_t* vosTempBuf; |
| 924 | |
| 925 | /* The value of the station id and AC for the cached buffer */ |
| 926 | v_U8_t ucCachedSTAId; |
| 927 | v_U8_t ucCachedAC; |
| 928 | |
| 929 | /* Last registered STA - until multiple sta support is added this will |
| 930 | be used always for tx */ |
| 931 | v_U8_t ucRegisteredStaId; |
| 932 | |
| 933 | /*Current TL STA used for TX*/ |
| 934 | v_U8_t ucCurrentSTA; |
| 935 | |
| 936 | WLANTL_REORDER_BUFFER_T *reorderBufferPool; /* Allocate memory for [WLANTL_MAX_BA_SESSION] sessions */ |
| 937 | |
| 938 | WLANTL_HO_SUPPORT_TYPE hoSupport; |
| 939 | |
| 940 | v_BOOL_t bUrgent; |
| 941 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 942 | |
| 943 | /* resource flag */ |
| 944 | v_U32_t bd_pduResCount; |
| 945 | |
| 946 | /* time interval to evaluate LWM mode*/ |
| 947 | //vos_timer_t tThresholdSamplingTimer; |
| 948 | |
| 949 | #if 0 |
| 950 | //information fields for flow control |
| 951 | tFcTxParams_type tlFCInfo; |
| 952 | #endif |
| 953 | |
| 954 | vos_pkt_t* vosTxFCBuf; |
| 955 | |
| 956 | /* LWM mode is enabled or not for each station. Bit-wise operation.32 station maximum. */ |
| 957 | // v_U32_t uStaLwmMask; |
| 958 | |
| 959 | /* LWM event is reported by FW. */ |
| 960 | // v_U32_t uStaLwmEventReported; |
| 961 | |
| 962 | /** Multiple Station Scheduling and TL queue management. |
| 963 | 4 HDD BC/MC data packet queue status is specified as Station 0's status. Weights used |
| 964 | in WFQ algorith are initialized in WLANTL_OPEN and contained in tlConfigInfo field. |
| 965 | Each station has fields of ucPktPending and AC mask to tell whether a AC has traffic |
| 966 | or not. |
| 967 | |
| 968 | Stations are served in a round-robin fashion from highest priority to lowest priority. |
| 969 | The number of round-robin times of each prioirty equals to the WFQ weights and differetiates |
| 970 | the traffic of different prioirty. As such, stations can not provide low priority packets if |
| 971 | high priority packets are all served. |
| 972 | */ |
| 973 | |
| 974 | /* Currently served station id. Reuse ucCurrentSTA field. */ |
| 975 | //v_U8_t uCurStaId; |
| 976 | |
| 977 | /* Current served station ID in round-robin method to traverse all stations.*/ |
| 978 | WLANTL_ACEnumType uCurServedAC; |
| 979 | |
Siddharth Bhal | 4551b10 | 2014-10-09 21:36:36 +0530 | [diff] [blame] | 980 | WLANTL_SpoofMacAddr spoofMacAddr; |
| 981 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 982 | /* How many weights have not been served in current AC. */ |
| 983 | v_U8_t ucCurLeftWeight; |
| 984 | |
| 985 | /* BC/MC management queue. Current implementation uses queue size 1. Will check whether |
| 986 | size N is supported. */ |
| 987 | vos_list_t pMCBCManageQ; |
| 988 | |
| 989 | v_U32_t sendFCFrame; |
| 990 | |
| 991 | v_U8_t done_once; |
| 992 | v_U8_t uFramesProcThres; |
Sunil Ravi | d5406f2 | 2013-01-22 00:18:31 -0800 | [diff] [blame] | 993 | #ifdef FEATURE_WLAN_TDLS |
| 994 | /*number of total TDLS peers registered to TL |
| 995 | Incremented at WLANTL_RegisterSTAClient(staType == WLAN_STA_TDLS) |
| 996 | Decremented at WLANTL_ClearSTAClient(staType == WLAN_STA_TDLS) */ |
| 997 | v_U8_t ucTdlsPeerCount; |
| 998 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 999 | /*whether we are in BMPS/UAPSD/WOWL mode, since the latter 2 need to be BMPS first*/ |
| 1000 | v_BOOL_t isBMPS; |
Gopichand Nakkala | 11acd11 | 2012-12-31 16:04:04 -0800 | [diff] [blame] | 1001 | /* Whether WDA_DS_TX_START_XMIT msg is pending or not */ |
| 1002 | v_BOOL_t isTxTranmitMsgPending; |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 1003 | |
| 1004 | #ifdef WLAN_FEATURE_RMC |
| 1005 | WLANTL_RMC_SESSION *rmcSession[WLANTL_RMC_HASH_TABLE_SIZE]; |
| 1006 | vos_lock_t rmcLock; |
| 1007 | v_U8_t multicastDuplicateDetectionEnabled; |
| 1008 | v_U8_t rmcDataPathEnabled; |
| 1009 | v_U32_t mcastDupCnt; |
| 1010 | #endif |
Katya Nigam | e7b69a8 | 2015-04-28 15:24:06 +0530 | [diff] [blame] | 1011 | WLANTL_MonRxCBType pfnMonRx; |
| 1012 | v_BOOL_t isConversionReq; |
Kapil Gupta | d90b386 | 2016-06-25 00:42:49 +0530 | [diff] [blame] | 1013 | #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD |
| 1014 | WLANTL_RoamMonitorType gDsRxRoamStats; |
| 1015 | #endif |
Katya Nigam | e7b69a8 | 2015-04-28 15:24:06 +0530 | [diff] [blame] | 1016 | |
Sravan Kumar Kairam | 60b8cf0 | 2016-12-12 16:22:09 +0530 | [diff] [blame] | 1017 | /* TX sample data timer */ |
| 1018 | vos_timer_t tx_frames_timer; |
| 1019 | uint8_t sample_count; |
| 1020 | |
Sravan Kumar Kairam | 091e5b6 | 2017-01-23 14:14:20 +0530 | [diff] [blame] | 1021 | bool preassoc_caching; |
| 1022 | vos_pkt_t* vosEapolCachedFrame; |
| 1023 | WLANTL_FwdEapolCBType pfnEapolFwd; |
Sravan Kumar Kairam | d9e8cbb | 2017-01-17 12:17:28 +0530 | [diff] [blame] | 1024 | |
| 1025 | uint8_t track_arp; |
| 1026 | uint32_t txbd_token; |
| 1027 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1028 | }WLANTL_CbType; |
| 1029 | |
Kapil Gupta | d90b386 | 2016-06-25 00:42:49 +0530 | [diff] [blame] | 1030 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1031 | /*========================================================================== |
| 1032 | |
| 1033 | FUNCTION WLANTL_GetFrames |
| 1034 | |
| 1035 | DESCRIPTION |
| 1036 | |
| 1037 | BAL calls this function at the request of the lower bus interface. |
| 1038 | When this request is being received TL will retrieve packets from HDD |
| 1039 | in accordance with the priority rules and the count supplied by BAL. |
| 1040 | |
| 1041 | DEPENDENCIES |
| 1042 | |
| 1043 | HDD must have registered with TL at least one STA before this function |
| 1044 | can be called. |
| 1045 | |
| 1046 | PARAMETERS |
| 1047 | |
| 1048 | IN |
| 1049 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1050 | or BAL's control block can be extracted from its context |
| 1051 | uSize: maximum size accepted by the lower layer |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 1052 | uFlowMask TX flow control mask. Each bit is defined as |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1053 | WDA_TXFlowEnumType |
| 1054 | |
| 1055 | OUT |
| 1056 | vosDataBuff: it will contain a pointer to the first buffer supplied |
| 1057 | by TL, if there is more than one packet supplied, TL |
| 1058 | will chain them through vOSS buffers |
| 1059 | |
| 1060 | RETURN VALUE |
| 1061 | |
| 1062 | The result code associated with performing the operation |
| 1063 | |
| 1064 | 1 or more: number of required resources if there are still frames to fetch |
| 1065 | For Volans, it's BD/PDU numbers. For Prima, it's free DXE descriptors. |
| 1066 | 0 : error or HDD queues are drained |
| 1067 | |
| 1068 | SIDE EFFECTS |
| 1069 | |
| 1070 | ============================================================================*/ |
| 1071 | v_U32_t |
| 1072 | WLANTL_GetFrames |
| 1073 | ( |
| 1074 | v_PVOID_t pAdapter, |
| 1075 | vos_pkt_t **ppFrameDataBuff, |
| 1076 | v_U32_t uSize, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1077 | v_U8_t uFlowMask, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1078 | v_BOOL_t* pbUrgent |
| 1079 | ); |
| 1080 | |
| 1081 | /*========================================================================== |
| 1082 | |
| 1083 | FUNCTION WLANTL_TxComp |
| 1084 | |
| 1085 | DESCRIPTION |
| 1086 | It is being called by BAL upon asynchronous notification of the packet |
| 1087 | or packets being sent over the bus. |
| 1088 | |
| 1089 | DEPENDENCIES |
| 1090 | Tx complete cannot be called without a previous transmit. |
| 1091 | |
| 1092 | PARAMETERS |
| 1093 | |
| 1094 | IN |
| 1095 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1096 | or BAL's control block can be extracted from its context |
| 1097 | vosDataBuff: it will contain a pointer to the first buffer for which |
| 1098 | the BAL report is being made, if there is more then one |
| 1099 | packet they will be chained using vOSS buffers. |
| 1100 | wTxSTAtus: the status of the transmitted packet, see above chapter |
| 1101 | on HDD interaction for a list of possible values |
| 1102 | |
| 1103 | RETURN VALUE |
| 1104 | The result code associated with performing the operation |
| 1105 | |
| 1106 | SIDE EFFECTS |
| 1107 | |
| 1108 | ============================================================================*/ |
| 1109 | VOS_STATUS |
| 1110 | WLANTL_TxComp |
| 1111 | ( |
| 1112 | v_PVOID_t pAdapter, |
| 1113 | vos_pkt_t *pFrameDataBuff, |
| 1114 | VOS_STATUS wTxStatus |
| 1115 | ); |
| 1116 | |
| 1117 | /*========================================================================== |
| 1118 | |
| 1119 | FUNCTION WLANTL_RxFrames |
| 1120 | |
| 1121 | DESCRIPTION |
| 1122 | Callback registered by TL and called by BAL when a packet is received |
| 1123 | over the bus. Upon the call of this function TL will make the necessary |
| 1124 | decision with regards to the forwarding or queuing of this packet and |
| 1125 | the layer it needs to be delivered to. |
| 1126 | |
| 1127 | DEPENDENCIES |
| 1128 | TL must be initiailized before this function gets called. |
| 1129 | If the frame carried is a data frame then the station for which it is |
| 1130 | destined to must have been previously registered with TL. |
| 1131 | |
| 1132 | PARAMETERS |
| 1133 | |
| 1134 | IN |
| 1135 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1136 | or BAL's control block can be extracted from its context |
| 1137 | |
| 1138 | vosDataBuff: it will contain a pointer to the first buffer received, |
| 1139 | if there is more then one packet they will be chained |
| 1140 | using vOSS buffers. |
| 1141 | |
| 1142 | RETURN VALUE |
| 1143 | The result code associated with performing the operation |
| 1144 | |
| 1145 | SIDE EFFECTS |
| 1146 | |
| 1147 | ============================================================================*/ |
| 1148 | VOS_STATUS |
| 1149 | WLANTL_RxFrames |
| 1150 | ( |
| 1151 | v_PVOID_t pAdapter, |
| 1152 | vos_pkt_t *pFrameDataBuff |
| 1153 | ); |
| 1154 | |
| 1155 | /*========================================================================== |
| 1156 | |
| 1157 | FUNCTION WLANTL_RxCachedFrames |
| 1158 | |
| 1159 | DESCRIPTION |
| 1160 | Utility function used by TL to forward the cached frames to a particular |
| 1161 | station; |
| 1162 | |
| 1163 | DEPENDENCIES |
| 1164 | TL must be initiailized before this function gets called. |
| 1165 | If the frame carried is a data frame then the station for which it is |
| 1166 | destined to must have been previously registered with TL. |
| 1167 | |
| 1168 | PARAMETERS |
| 1169 | |
| 1170 | IN |
| 1171 | pTLCb: pointer to TL handle |
| 1172 | |
| 1173 | ucSTAId: station for which we need to forward the packets |
| 1174 | |
| 1175 | vosDataBuff: it will contain a pointer to the first cached buffer |
| 1176 | received, if there is more then one packet they will be |
| 1177 | chained using vOSS buffers. |
| 1178 | |
| 1179 | RETURN VALUE |
| 1180 | The result code associated with performing the operation |
| 1181 | |
| 1182 | VOS_STATUS_E_INVAL: Input parameters are invalid |
| 1183 | VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a |
| 1184 | page fault |
| 1185 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1186 | |
| 1187 | SIDE EFFECTS |
| 1188 | |
| 1189 | ============================================================================*/ |
| 1190 | VOS_STATUS |
| 1191 | WLANTL_RxCachedFrames |
| 1192 | ( |
| 1193 | WLANTL_CbType* pTLCb, |
| 1194 | v_U8_t ucSTAId, |
| 1195 | vos_pkt_t* vosDataBuff |
| 1196 | ); |
| 1197 | |
| 1198 | /*========================================================================== |
| 1199 | FUNCTION WLANTL_ResourceCB |
| 1200 | |
| 1201 | DESCRIPTION |
| 1202 | Called by the TL when it has packets available for transmission. |
| 1203 | |
| 1204 | DEPENDENCIES |
| 1205 | The TL must be registered with BAL before this function can be called. |
| 1206 | |
| 1207 | PARAMETERS |
| 1208 | |
| 1209 | IN |
| 1210 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1211 | or BAL's control block can be extracted from its context |
| 1212 | uCount: avail resource count obtained from hw |
| 1213 | |
| 1214 | RETURN VALUE |
| 1215 | The result code associated with performing the operation |
| 1216 | |
| 1217 | SIDE EFFECTS |
| 1218 | |
| 1219 | ============================================================================*/ |
| 1220 | VOS_STATUS |
| 1221 | WLANTL_ResourceCB |
| 1222 | ( |
| 1223 | v_PVOID_t pAdapter, |
| 1224 | v_U32_t uCount |
| 1225 | ); |
| 1226 | |
| 1227 | |
| 1228 | /*========================================================================== |
| 1229 | FUNCTION WLANTL_ProcessMainMessage |
| 1230 | |
| 1231 | DESCRIPTION |
| 1232 | Called by VOSS when a message was serialized for TL through the |
| 1233 | main thread/task. |
| 1234 | |
| 1235 | DEPENDENCIES |
| 1236 | The TL must be initialized before this function can be called. |
| 1237 | |
| 1238 | PARAMETERS |
| 1239 | |
| 1240 | IN |
| 1241 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1242 | control block can be extracted from its context |
| 1243 | message: type and content of the message |
| 1244 | |
| 1245 | |
| 1246 | RETURN VALUE |
| 1247 | The result code associated with performing the operation |
| 1248 | |
| 1249 | SIDE EFFECTS |
| 1250 | |
| 1251 | ============================================================================*/ |
| 1252 | VOS_STATUS |
| 1253 | WLANTL_ProcessMainMessage |
| 1254 | ( |
| 1255 | v_PVOID_t pAdapter, |
| 1256 | vos_msg_t* message |
| 1257 | ); |
| 1258 | |
| 1259 | /*========================================================================== |
| 1260 | FUNCTION WLANTL_ProcessTxMessage |
| 1261 | |
| 1262 | DESCRIPTION |
| 1263 | Called by VOSS when a message was serialized for TL through the |
| 1264 | tx thread/task. |
| 1265 | |
| 1266 | DEPENDENCIES |
| 1267 | The TL must be initialized before this function can be called. |
| 1268 | |
| 1269 | PARAMETERS |
| 1270 | |
| 1271 | IN |
| 1272 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1273 | control block can be extracted from its context |
| 1274 | message: type and content of the message |
| 1275 | |
| 1276 | |
| 1277 | RETURN VALUE |
| 1278 | |
| 1279 | The result code associated with performing the operation |
| 1280 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1281 | |
| 1282 | |
| 1283 | SIDE EFFECTS |
| 1284 | |
| 1285 | ============================================================================*/ |
| 1286 | VOS_STATUS |
| 1287 | WLANTL_ProcessTxMessage |
| 1288 | ( |
| 1289 | v_PVOID_t pAdapter, |
| 1290 | vos_msg_t* message |
| 1291 | ); |
| 1292 | |
| 1293 | /*========================================================================== |
| 1294 | FUNCTION WLAN_TLGetNextTxIds |
| 1295 | |
| 1296 | DESCRIPTION |
| 1297 | Gets the next station and next AC in the list |
| 1298 | |
| 1299 | DEPENDENCIES |
| 1300 | |
| 1301 | PARAMETERS |
| 1302 | |
| 1303 | OUT |
| 1304 | pucSTAId: STAtion ID |
| 1305 | |
| 1306 | RETURN VALUE |
| 1307 | The result code associated with performing the operation |
| 1308 | |
| 1309 | SIDE EFFECTS |
| 1310 | |
| 1311 | ============================================================================*/ |
| 1312 | VOS_STATUS |
| 1313 | WLAN_TLGetNextTxIds |
| 1314 | ( |
| 1315 | v_PVOID_t pAdapter, |
| 1316 | v_U8_t* pucSTAId |
| 1317 | ); |
| 1318 | |
| 1319 | /*========================================================================== |
| 1320 | |
| 1321 | FUNCTION WLANTL_CleanCb |
| 1322 | |
| 1323 | DESCRIPTION |
| 1324 | Cleans TL control block |
| 1325 | |
| 1326 | DEPENDENCIES |
| 1327 | |
| 1328 | PARAMETERS |
| 1329 | |
| 1330 | IN |
| 1331 | pTLCb: pointer to TL's control block |
| 1332 | ucEmpty: set if TL has to clean up the queues and release pedning pkts |
| 1333 | |
| 1334 | RETURN VALUE |
| 1335 | The result code associated with performing the operation |
| 1336 | |
| 1337 | SIDE EFFECTS |
| 1338 | |
| 1339 | ============================================================================*/ |
| 1340 | VOS_STATUS |
| 1341 | WLANTL_CleanCB |
| 1342 | ( |
| 1343 | WLANTL_CbType* pTLCb, |
| 1344 | v_U8_t ucEmpty |
| 1345 | ); |
| 1346 | |
| 1347 | /*========================================================================== |
| 1348 | |
| 1349 | FUNCTION WLANTL_CleanSTA |
| 1350 | |
| 1351 | DESCRIPTION |
| 1352 | Cleans a station control block. |
| 1353 | |
| 1354 | DEPENDENCIES |
| 1355 | |
| 1356 | PARAMETERS |
| 1357 | |
| 1358 | IN |
| 1359 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1360 | control block can be extracted from its context |
| 1361 | ucEmpty: if set the queues and pending pkts will be emptyed |
| 1362 | |
| 1363 | RETURN VALUE |
| 1364 | The result code associated with performing the operation |
| 1365 | |
| 1366 | SIDE EFFECTS |
| 1367 | |
| 1368 | ============================================================================*/ |
| 1369 | VOS_STATUS |
| 1370 | WLANTL_CleanSTA |
| 1371 | ( |
| 1372 | WLANTL_STAClientType* ptlSTAClient, |
| 1373 | v_U8_t ucEmpty |
| 1374 | ); |
| 1375 | |
| 1376 | /*========================================================================== |
| 1377 | FUNCTION WLANTL_GetTxResourcesCB |
| 1378 | |
| 1379 | DESCRIPTION |
| 1380 | Processing function for Resource needed signal. A request will be issued |
| 1381 | to BAL to get mor tx resources. |
| 1382 | |
| 1383 | DEPENDENCIES |
| 1384 | The TL must be initialized before this function can be called. |
| 1385 | |
| 1386 | PARAMETERS |
| 1387 | |
| 1388 | IN |
| 1389 | pvosGCtx: pointer to the global vos context; a handle to TL's |
| 1390 | control block can be extracted from its context |
| 1391 | |
| 1392 | |
| 1393 | RETURN VALUE |
| 1394 | The result code associated with performing the operation |
| 1395 | |
| 1396 | VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a |
| 1397 | page fault |
| 1398 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1399 | |
| 1400 | Other values can be returned as a result of a function call, please check |
| 1401 | corresponding API for more info. |
| 1402 | SIDE EFFECTS |
| 1403 | |
| 1404 | ============================================================================*/ |
| 1405 | VOS_STATUS |
| 1406 | WLANTL_GetTxResourcesCB |
| 1407 | ( |
| 1408 | v_PVOID_t pvosGCtx |
| 1409 | ); |
| 1410 | |
| 1411 | /*========================================================================== |
| 1412 | FUNCTION WLANTL_PrepareBDHeader |
| 1413 | |
| 1414 | DESCRIPTION |
| 1415 | Callback function for serializing Suspend signal through Tx thread |
| 1416 | |
| 1417 | DEPENDENCIES |
| 1418 | Just notify HAL that suspend in TL is complete. |
| 1419 | |
| 1420 | PARAMETERS |
| 1421 | |
| 1422 | IN |
| 1423 | pAdapter: pointer to the global adapter context; a handle to TL's |
| 1424 | control block can be extracted from its context |
| 1425 | pUserData: user data sent with the callback |
| 1426 | |
| 1427 | RETURN VALUE |
| 1428 | The result code associated with performing the operation |
| 1429 | |
| 1430 | SIDE EFFECTS |
| 1431 | |
| 1432 | ============================================================================*/ |
| 1433 | void |
| 1434 | WLANTL_PrepareBDHeader |
| 1435 | ( |
| 1436 | vos_pkt_t* vosDataBuff, |
| 1437 | v_PVOID_t* ppvBDHeader, |
| 1438 | v_MACADDR_t* pvDestMacAdddr, |
| 1439 | v_U8_t ucDisableFrmXtl, |
| 1440 | VOS_STATUS* pvosSTAtus, |
| 1441 | v_U16_t* usPktLen, |
| 1442 | v_U8_t ucQosEnabled, |
| 1443 | v_U8_t ucWDSEnabled, |
| 1444 | v_U8_t extraHeadSpace |
| 1445 | ); |
| 1446 | |
| 1447 | /*========================================================================== |
| 1448 | FUNCTION WLANTL_Translate8023To80211Header |
| 1449 | |
| 1450 | DESCRIPTION |
| 1451 | Inline function for translating and 802.3 header into an 802.11 header. |
| 1452 | |
| 1453 | DEPENDENCIES |
| 1454 | |
| 1455 | |
| 1456 | PARAMETERS |
| 1457 | |
| 1458 | IN |
| 1459 | pTLCb: TL control block |
Kiran Venkatappa | a044eb9 | 2012-12-17 15:48:49 -0800 | [diff] [blame] | 1460 | |
| 1461 | *pucStaId Station ID. In case of TDLS, this return the actual |
| 1462 | station index used to transmit. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1463 | |
| 1464 | IN/OUT |
| 1465 | vosDataBuff: vos data buffer, will contain the new header on output |
| 1466 | |
| 1467 | OUT |
| 1468 | pvosStatus: status of the operation |
| 1469 | |
| 1470 | RETURN VALUE |
| 1471 | No return. |
| 1472 | |
| 1473 | SIDE EFFECTS |
| 1474 | |
| 1475 | ============================================================================*/ |
Kiran Venkatappa | cab0d35 | 2012-12-17 13:09:22 -0800 | [diff] [blame] | 1476 | VOS_STATUS |
| 1477 | WLANTL_Translate8023To80211Header |
| 1478 | ( |
| 1479 | vos_pkt_t* vosDataBuff, |
| 1480 | VOS_STATUS* pvosStatus, |
| 1481 | WLANTL_CbType* pTLCb, |
| 1482 | v_U8_t *pucStaId, |
Ravi Joshi | d069950 | 2013-07-08 15:48:47 -0700 | [diff] [blame] | 1483 | WLANTL_MetaInfoType* pTlMetaInfo, |
Kiran Venkatappa | cab0d35 | 2012-12-17 13:09:22 -0800 | [diff] [blame] | 1484 | v_U8_t *ucWDSEnabled, |
| 1485 | v_U8_t *extraHeadSpace |
| 1486 | ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1487 | /*========================================================================== |
| 1488 | FUNCTION WLANTL_Translate80211To8023Header |
| 1489 | |
| 1490 | DESCRIPTION |
| 1491 | Inline function for translating and 802.11 header into an 802.3 header. |
| 1492 | |
| 1493 | DEPENDENCIES |
| 1494 | |
| 1495 | |
| 1496 | PARAMETERS |
| 1497 | |
| 1498 | IN |
| 1499 | pTLCb: TL control block |
| 1500 | ucStaId: station ID |
| 1501 | ucHeaderLen: Length of the header from BD |
| 1502 | ucActualHLen: Length of header including padding or any other trailers |
| 1503 | |
| 1504 | IN/OUT |
| 1505 | vosDataBuff: vos data buffer, will contain the new header on output |
| 1506 | |
| 1507 | OUT |
| 1508 | pvosStatus: status of the operation |
| 1509 | |
| 1510 | RETURN VALUE |
| 1511 | Status of the operation |
| 1512 | |
| 1513 | SIDE EFFECTS |
| 1514 | |
| 1515 | ============================================================================*/ |
| 1516 | VOS_STATUS |
| 1517 | WLANTL_Translate80211To8023Header |
| 1518 | ( |
| 1519 | vos_pkt_t* vosDataBuff, |
| 1520 | VOS_STATUS* pvosStatus, |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 1521 | v_U16_t usActualHLen, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1522 | v_U8_t ucHeaderLen, |
| 1523 | WLANTL_CbType* pTLCb, |
Srinivas Girigowda | 5cecb20 | 2013-10-08 09:13:25 -0700 | [diff] [blame] | 1524 | v_U8_t ucSTAId, |
Katya Nigam | e7b69a8 | 2015-04-28 15:24:06 +0530 | [diff] [blame] | 1525 | v_BOOL_t bForwardIAPPwithLLC |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1526 | ); |
| 1527 | |
Katya Nigam | e7b69a8 | 2015-04-28 15:24:06 +0530 | [diff] [blame] | 1528 | VOS_STATUS |
| 1529 | WLANTL_MonTranslate80211To8023Header |
| 1530 | ( |
| 1531 | vos_pkt_t* vosDataBuff, |
| 1532 | WLANTL_CbType* pTLCb |
| 1533 | ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1534 | /*========================================================================== |
Madan Mohan Koyyalamudi | a148e1e | 2012-11-30 14:52:59 -0800 | [diff] [blame] | 1535 | FUNCTION WLANTL_FindFrameTypeBcMcUc |
| 1536 | |
| 1537 | DESCRIPTION |
| 1538 | Utility function to find whether received frame is broadcast, multicast |
| 1539 | or unicast. |
| 1540 | |
| 1541 | DEPENDENCIES |
| 1542 | The STA must be registered with TL before this function can be called. |
| 1543 | |
| 1544 | PARAMETERS |
| 1545 | |
| 1546 | IN |
| 1547 | pTLCb: pointer to the TL's control block |
| 1548 | ucSTAId: identifier of the station being processed |
| 1549 | vosDataBuff: pointer to the vos buffer |
| 1550 | |
| 1551 | IN/OUT |
| 1552 | pucBcMcUc: pointer to buffer, will contain frame type on return |
| 1553 | |
| 1554 | RETURN VALUE |
| 1555 | The result code associated with performing the operation |
| 1556 | |
| 1557 | VOS_STATUS_E_INVAL: invalid input parameters |
| 1558 | VOS_STATUS_E_BADMSG: failed to extract info from data buffer |
| 1559 | VOS_STATUS_SUCCESS: success |
| 1560 | |
| 1561 | SIDE EFFECTS |
| 1562 | None. |
| 1563 | ============================================================================*/ |
| 1564 | VOS_STATUS |
| 1565 | WLANTL_FindFrameTypeBcMcUc |
| 1566 | ( |
| 1567 | WLANTL_CbType *pTLCb, |
| 1568 | v_U8_t ucSTAId, |
| 1569 | vos_pkt_t *vosDataBuff, |
| 1570 | v_U8_t *pucBcMcUc |
| 1571 | ); |
| 1572 | |
| 1573 | /*========================================================================== |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1574 | |
| 1575 | FUNCTION WLANTL_MgmtFrmRxDefaultCb |
| 1576 | |
| 1577 | DESCRIPTION |
| 1578 | Default Mgmt Frm rx callback: asserts all the time. If this function gets |
| 1579 | called it means there is no registered rx cb pointer for Mgmt Frm. |
| 1580 | |
| 1581 | DEPENDENCIES |
| 1582 | |
| 1583 | PARAMETERS |
| 1584 | |
| 1585 | Not used. |
| 1586 | |
| 1587 | RETURN VALUE |
| 1588 | Always FAILURE. |
| 1589 | |
| 1590 | ============================================================================*/ |
| 1591 | VOS_STATUS |
| 1592 | WLANTL_MgmtFrmRxDefaultCb |
| 1593 | ( |
| 1594 | v_PVOID_t pAdapter, |
| 1595 | v_PVOID_t vosBuff |
| 1596 | ); |
| 1597 | |
| 1598 | /*========================================================================== |
| 1599 | |
| 1600 | FUNCTION WLANTL_STARxDefaultCb |
| 1601 | |
| 1602 | DESCRIPTION |
| 1603 | Default BAP rx callback: asserts all the time. If this function gets |
| 1604 | called it means there is no registered rx cb pointer for BAP. |
| 1605 | |
| 1606 | DEPENDENCIES |
| 1607 | |
| 1608 | PARAMETERS |
| 1609 | |
| 1610 | Not used. |
| 1611 | |
| 1612 | RETURN VALUE |
| 1613 | Always FAILURE. |
| 1614 | |
| 1615 | ============================================================================*/ |
| 1616 | VOS_STATUS |
| 1617 | WLANTL_BAPRxDefaultCb |
| 1618 | ( |
| 1619 | v_PVOID_t pAdapter, |
| 1620 | vos_pkt_t* vosDataBuff, |
| 1621 | WLANTL_BAPFrameEnumType frameType |
| 1622 | ); |
| 1623 | |
| 1624 | /*========================================================================== |
| 1625 | |
| 1626 | FUNCTION WLANTL_STARxDefaultCb |
| 1627 | |
| 1628 | DESCRIPTION |
| 1629 | Default STA rx callback: asserts all the time. If this function gets |
| 1630 | called it means there is no registered rx cb pointer for station. |
| 1631 | (Mem corruption most likely, it should never happen) |
| 1632 | |
| 1633 | DEPENDENCIES |
| 1634 | |
| 1635 | PARAMETERS |
| 1636 | |
| 1637 | Not used. |
| 1638 | |
| 1639 | RETURN VALUE |
| 1640 | Always FAILURE. |
| 1641 | |
| 1642 | ============================================================================*/ |
| 1643 | VOS_STATUS |
| 1644 | WLANTL_STARxDefaultCb |
| 1645 | ( |
| 1646 | v_PVOID_t pAdapter, |
| 1647 | vos_pkt_t* vosDataBuff, |
| 1648 | v_U8_t ucSTAId, |
| 1649 | WLANTL_RxMetaInfoType* pRxMetaInfo |
| 1650 | ); |
| 1651 | |
| 1652 | /*========================================================================== |
| 1653 | |
| 1654 | FUNCTION WLANTL_STAFetchPktDefaultCb |
| 1655 | |
| 1656 | DESCRIPTION |
| 1657 | Default fetch callback: asserts all the time. If this function gets |
| 1658 | called it means there is no registered fetch cb pointer for station. |
| 1659 | (Mem corruption most likely, it should never happen) |
| 1660 | |
| 1661 | DEPENDENCIES |
| 1662 | |
| 1663 | PARAMETERS |
| 1664 | |
| 1665 | Not used. |
| 1666 | |
| 1667 | RETURN VALUE |
| 1668 | Always FAILURE. |
| 1669 | |
| 1670 | ============================================================================*/ |
| 1671 | VOS_STATUS |
| 1672 | WLANTL_STAFetchPktDefaultCb |
| 1673 | ( |
| 1674 | v_PVOID_t pAdapter, |
| 1675 | v_U8_t* pucSTAId, |
| 1676 | WLANTL_ACEnumType ucAC, |
| 1677 | vos_pkt_t** vosDataBuff, |
| 1678 | WLANTL_MetaInfoType* tlMetaInfo |
| 1679 | ); |
| 1680 | |
| 1681 | /*========================================================================== |
| 1682 | |
| 1683 | FUNCTION WLANTL_TxCompDefaultCb |
| 1684 | |
| 1685 | DESCRIPTION |
| 1686 | Default tx complete handler. It will release the completed pkt to |
| 1687 | prevent memory leaks. |
| 1688 | |
| 1689 | PARAMETERS |
| 1690 | |
| 1691 | IN |
| 1692 | pAdapter: pointer to the global adapter context; a handle to |
| 1693 | TL/HAL/PE/BAP/HDD control block can be extracted from |
| 1694 | its context |
| 1695 | vosDataBuff: pointer to the VOSS data buffer that was transmitted |
| 1696 | wTxSTAtus: status of the transmission |
| 1697 | |
| 1698 | |
| 1699 | RETURN VALUE |
| 1700 | The result code associated with performing the operation; please |
| 1701 | check vos_pkt_return_pkt for possible error codes. |
| 1702 | |
| 1703 | ============================================================================*/ |
| 1704 | VOS_STATUS |
| 1705 | WLANTL_TxCompDefaultCb |
| 1706 | ( |
| 1707 | v_PVOID_t pAdapter, |
| 1708 | vos_pkt_t* vosDataBuff, |
| 1709 | VOS_STATUS wTxSTAtus |
| 1710 | ); |
| 1711 | |
| 1712 | /*========================================================================== |
| 1713 | |
| 1714 | FUNCTION WLANTL_PackUpTriggerFrame |
| 1715 | |
| 1716 | DESCRIPTION |
| 1717 | Packs up a trigger frame and places it in TL's cache for tx and notifies |
| 1718 | BAL |
| 1719 | |
| 1720 | DEPENDENCIES |
| 1721 | |
| 1722 | PARAMETERS |
| 1723 | |
| 1724 | IN |
| 1725 | pTLCb: pointer to the TL control block |
| 1726 | pfnSTATxComp: Tx Complete Cb to be used when frame is received |
| 1727 | ucSTAId: station id |
| 1728 | ucAC: access category |
| 1729 | |
| 1730 | RETURN VALUE |
| 1731 | None |
| 1732 | |
| 1733 | SIDE EFFECTS |
| 1734 | |
| 1735 | ============================================================================*/ |
| 1736 | VOS_STATUS |
| 1737 | WLANTL_PackUpTriggerFrame |
| 1738 | ( |
| 1739 | WLANTL_CbType* pTLCb, |
| 1740 | WLANTL_TxCompCBType pfnSTATxComp, |
| 1741 | v_U8_t ucSTAId, |
| 1742 | WLANTL_ACEnumType ucAC |
| 1743 | ); |
| 1744 | |
| 1745 | /*========================================================================== |
| 1746 | |
| 1747 | FUNCTION WLANTL_TxCompTriggFrameSI |
| 1748 | |
| 1749 | DESCRIPTION |
| 1750 | Tx complete handler for the service interval trigger frame. |
| 1751 | It will restart the SI timer. |
| 1752 | |
| 1753 | PARAMETERS |
| 1754 | |
| 1755 | IN |
| 1756 | pvosGCtx: pointer to the global vos context; a handle to |
| 1757 | TL/HAL/PE/BAP/HDD control block can be extracted from |
| 1758 | its context |
| 1759 | vosDataBuff: pointer to the VOSS data buffer that was transmitted |
| 1760 | wTxSTAtus: status of the transmission |
| 1761 | |
| 1762 | |
| 1763 | RETURN VALUE |
| 1764 | The result code associated with performing the operation |
| 1765 | |
| 1766 | ============================================================================*/ |
| 1767 | VOS_STATUS |
| 1768 | WLANTL_TxCompTriggFrameSI |
| 1769 | ( |
| 1770 | v_PVOID_t pvosGCtx, |
| 1771 | vos_pkt_t* vosDataBuff, |
| 1772 | VOS_STATUS wTxSTAtus |
| 1773 | ); |
| 1774 | |
| 1775 | /*========================================================================== |
| 1776 | |
| 1777 | FUNCTION WLANTL_TxCompTriggFrameSI |
| 1778 | |
| 1779 | DESCRIPTION |
| 1780 | Tx complete handler for the service interval trigger frame. |
| 1781 | It will restart the SI timer. |
| 1782 | |
| 1783 | PARAMETERS |
| 1784 | |
| 1785 | IN |
| 1786 | pvosGCtx: pointer to the global vos context; a handle to |
| 1787 | TL/HAL/PE/BAP/HDD control block can be extracted from |
| 1788 | its context |
| 1789 | vosDataBuff: pointer to the VOSS data buffer that was transmitted |
| 1790 | wTxSTAtus: status of the transmission |
| 1791 | |
| 1792 | |
| 1793 | RETURN VALUE |
| 1794 | The result code associated with performing the operation |
| 1795 | |
| 1796 | ============================================================================*/ |
| 1797 | VOS_STATUS |
| 1798 | WLANTL_TxCompTriggFrameDI |
| 1799 | ( |
| 1800 | v_PVOID_t pvosGCtx, |
| 1801 | vos_pkt_t* vosDataBuff, |
| 1802 | VOS_STATUS wTxSTAtus |
| 1803 | ); |
| 1804 | |
| 1805 | /*========================================================================== |
| 1806 | |
| 1807 | FUNCTION |
| 1808 | |
| 1809 | DESCRIPTION Read RSSI value out of a RX BD |
| 1810 | |
| 1811 | PARAMETERS: Caller must validate all parameters |
| 1812 | |
| 1813 | RETURN VALUE |
| 1814 | |
| 1815 | ============================================================================*/ |
| 1816 | VOS_STATUS WLANTL_ReadRSSI |
| 1817 | ( |
| 1818 | v_PVOID_t pAdapter, |
| 1819 | v_PVOID_t pBDHeader, |
| 1820 | v_U8_t STAid |
| 1821 | ); |
| 1822 | |
Madan Mohan Koyyalamudi | d9383fd | 2013-08-13 09:27:30 +0530 | [diff] [blame] | 1823 | /*========================================================================== |
| 1824 | |
| 1825 | FUNCTION |
| 1826 | |
| 1827 | DESCRIPTION Read SNR value out of a RX BD |
| 1828 | |
| 1829 | PARAMETERS: Caller must validate all parameters |
| 1830 | |
| 1831 | RETURN VALUE |
| 1832 | |
| 1833 | ============================================================================*/ |
| 1834 | VOS_STATUS WLANTL_ReadSNR |
| 1835 | ( |
| 1836 | v_PVOID_t pAdapter, |
| 1837 | v_PVOID_t pBDHeader, |
| 1838 | v_U8_t STAid |
| 1839 | ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1840 | |
| 1841 | |
| 1842 | void WLANTL_PowerStateChangedCB |
| 1843 | ( |
| 1844 | v_PVOID_t pAdapter, |
| 1845 | tPmcState newState |
| 1846 | ); |
| 1847 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1848 | /*========================================================================== |
Jeff Johnson | 017fdc3 | 2013-02-27 09:22:30 -0800 | [diff] [blame] | 1849 | FUNCTION WLANTL_FwdPktToHDD |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1850 | |
| 1851 | DESCRIPTION |
| 1852 | Determine the Destation Station ID and route the Frame to Upper Layer |
| 1853 | |
| 1854 | DEPENDENCIES |
| 1855 | |
| 1856 | PARAMETERS |
| 1857 | |
| 1858 | IN |
| 1859 | pvosGCtx: pointer to the global vos context; a handle to TL's |
| 1860 | control block can be extracted from its context |
| 1861 | ucSTAId: identifier of the station being processed |
| 1862 | vosDataBuff: pointer to the rx vos buffer |
| 1863 | |
| 1864 | RETURN VALUE |
| 1865 | The result code associated with performing the operation |
| 1866 | |
| 1867 | VOS_STATUS_E_INVAL: invalid input parameters |
| 1868 | VOS_STATUS_E_FAULT: pointer to TL cb is NULL ; access would cause a |
| 1869 | page fault |
| 1870 | VOS_STATUS_SUCCESS: Everything is good :) |
| 1871 | |
| 1872 | SIDE EFFECTS |
| 1873 | |
| 1874 | ============================================================================*/ |
| 1875 | |
| 1876 | VOS_STATUS |
| 1877 | WLANTL_FwdPktToHDD |
| 1878 | ( |
| 1879 | v_PVOID_t pvosGCtx, |
| 1880 | vos_pkt_t* pvosDataBuff, |
| 1881 | v_U8_t ucSTAId |
| 1882 | ); |
| 1883 | |
Abhishek Singh | 00b7197 | 2016-01-07 10:51:04 +0530 | [diff] [blame] | 1884 | #ifdef WLAN_FEATURE_RMC |
| 1885 | VOS_STATUS WLANTL_RmcInit |
| 1886 | ( |
| 1887 | v_PVOID_t pAdapter |
| 1888 | ); |
| 1889 | |
| 1890 | VOS_STATUS WLANTL_RmcDeInit |
| 1891 | ( |
| 1892 | v_PVOID_t pAdapter |
| 1893 | ); |
| 1894 | |
| 1895 | |
| 1896 | tANI_U8 WLANTL_RmcHashRmcSession ( v_MACADDR_t *pMcastAddr ); |
| 1897 | |
| 1898 | |
| 1899 | WLANTL_RMC_SESSION *WLANTL_RmcLookUpRmcSession |
| 1900 | ( |
| 1901 | WLANTL_RMC_SESSION *rmcSession[], |
| 1902 | v_MACADDR_t *pMcastAddr |
| 1903 | ); |
| 1904 | |
| 1905 | WLANTL_RMC_SESSION *WLANTL_RmcAddRmcSession |
| 1906 | ( |
| 1907 | WLANTL_RMC_SESSION *rmcSession[], |
| 1908 | v_MACADDR_t *pMcastAddr |
| 1909 | ); |
| 1910 | |
| 1911 | tANI_U8 |
| 1912 | WLANTL_RmcDeleteRmcSession |
| 1913 | ( |
| 1914 | WLANTL_RMC_SESSION *rmcSession[], |
| 1915 | v_MACADDR_t *pMcastAddr |
| 1916 | ); |
| 1917 | |
| 1918 | VOS_STATUS |
| 1919 | WLANTL_ProcessRmcCommand |
| 1920 | ( |
| 1921 | WLANTL_CbType* pTLCb, |
| 1922 | v_MACADDR_t *pMcastAddr, |
| 1923 | tANI_U32 command |
| 1924 | ); |
| 1925 | |
| 1926 | /*============================================================================= |
| 1927 | FUNCTION WLANTL_IsDuplicateMcastFrm |
| 1928 | |
| 1929 | DESCRIPTION |
| 1930 | This function checks for duplicast multicast frames and drops them. |
| 1931 | |
| 1932 | DEPENDENCIES |
| 1933 | |
| 1934 | PARAMETERS |
| 1935 | |
| 1936 | IN |
| 1937 | |
| 1938 | pClientSTA : Pointer to WLANTL_STAClientType |
| 1939 | aucBDHeader : Pointer to BD header |
| 1940 | |
| 1941 | RETURN VALUE |
| 1942 | |
| 1943 | VOS_FALSE: This frame is not a duplicate |
| 1944 | |
| 1945 | VOS_TRUE: This frame is a duplicate |
| 1946 | |
| 1947 | ==============================================================================*/ |
| 1948 | v_U8_t |
| 1949 | WLANTL_IsDuplicateMcastFrm |
| 1950 | ( |
| 1951 | WLANTL_STAClientType *pClientSTA, |
| 1952 | vos_pkt_t* vosDataBuff |
| 1953 | ); |
| 1954 | |
| 1955 | /*============================================================================= |
| 1956 | FUNCTION WLANTL_McastDeleteAllEntries |
| 1957 | |
| 1958 | DESCRIPTION |
| 1959 | This function removes all multicast entries used for duplicate detection |
| 1960 | |
| 1961 | DEPENDENCIES |
| 1962 | |
| 1963 | PARAMETERS |
| 1964 | |
| 1965 | IN |
| 1966 | |
| 1967 | pClientSTA : Pointer to WLANTL_STAClientType |
| 1968 | |
| 1969 | RETURN VALUE |
| 1970 | |
| 1971 | None |
| 1972 | |
| 1973 | ==============================================================================*/ |
| 1974 | void |
| 1975 | WLANTL_McastDeleteAllEntries(WLANTL_STAClientType * pClientSTA); |
| 1976 | |
| 1977 | #endif /*WLAN_FEATURE_RMC*/ |
| 1978 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1979 | #endif /* #ifndef WLAN_QCT_TLI_H */ |