blob: b51b3b66e34f8db27e81d24964b4214c839cd65d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
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/*===========================================================================
23
24 b a p A p i LinkSupervision . C
25
26 OVERVIEW:
27
28 This software unit holds the implementation of the WLAN BAP modules
29 "platform independent" Data path functions.
30
31 The functions externalized by this module are to be called ONLY by other
32 WLAN modules (HDD) that properly register with the BAP Layer initially.
33
34 DEPENDENCIES:
35
36 Are listed for each API below.
37
38
39 Copyright (c) 2008 QUALCOMM Incorporated.
40 All Rights Reserved.
41 Qualcomm Confidential and Proprietary
42===========================================================================*/
43
44/*===========================================================================
45
46 EDIT HISTORY FOR FILE
47
48
49 This section contains comments describing changes made to the module.
50 Notice that changes are listed in reverse chronological order.
51
52
53
54 when who what, where, why
55---------- --- --------------------------------------------------------
562008-03-25 arulv Created module
57
58===========================================================================*/
59
60/*----------------------------------------------------------------------------
61 * Include Files
62 * -------------------------------------------------------------------------*/
63//#include "wlan_qct_tl.h"
64#include "vos_trace.h"
65//I need the TL types and API
66#include "wlan_qct_tl.h"
67
68/* BT-AMP PAL API header file */
69#include "bapApi.h"
70#include "bapInternal.h"
71#include "bapApiTimer.h"
72
73/*----------------------------------------------------------------------------
74 * Preprocessor Definitions and Constants
75 * -------------------------------------------------------------------------*/
76
77#if 1
78//*BT-AMP packet LLC OUI value*/
79static const v_U8_t WLANBAP_BT_AMP_OUI[] = {0x00, 0x19, 0x58 };
80
81/*LLC header value*/
82static v_U8_t WLANBAP_LLC_HEADER[] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00 };
83#endif
84
85/*----------------------------------------------------------------------------
86 * Global Data Definitions
87 * -------------------------------------------------------------------------*/
88
89/*----------------------------------------------------------------------------
90 * Static Variable Definitions
91 * -------------------------------------------------------------------------*/
92
93/*----------------------------------------------------------------------------
94 * Static Function Declarations and Definitions
95 * -------------------------------------------------------------------------*/
96
97/*----------------------------------------------------------------------------
98 * Externalized Function Definitions
99* -------------------------------------------------------------------------*/
100
101/*----------------------------------------------------------------------------
102 * Function Declarations and Documentation
103 * -------------------------------------------------------------------------*/
104VOS_STATUS
105WLANBAP_AcquireLSPacket( ptBtampContext pBtampCtx, vos_pkt_t **ppPacket, v_U16_t size, tANI_BOOLEAN isLsReq )
106{
107 VOS_STATUS vosStatus;
108 vos_pkt_t *pPacket;
109 WLANBAP_8023HeaderType w8023Header;
110 v_U8_t aucLLCHeader[WLANBAP_LLC_HEADER_LEN];
111 v_U16_t headerLength; /* The 802.3 frame length*/
112 v_U16_t protoType;
113 v_U8_t *pData = NULL;
114
115
116 if(isLsReq)
117 {
118 protoType = WLANTL_BT_AMP_TYPE_LS_REQ;
119 }
120 else
121 {
122 protoType = WLANTL_BT_AMP_TYPE_LS_REP;
123 }
124
125 //If success, vosTxLsPacket is the packet and pData points to the head.
126 vosStatus = vos_pkt_get_packet( &pPacket, VOS_PKT_TYPE_TX_802_11_MGMT,size, 1,
127 VOS_TRUE, NULL, NULL );
128 if( VOS_IS_STATUS_SUCCESS( vosStatus ) )
129 {
130 vosStatus = vos_pkt_reserve_head( pPacket, (v_VOID_t *)&pData, size );
131 if( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
132 {
133 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
134 "%s: failed to reserve size = %d\n",__FUNCTION__, size );
135 vos_pkt_return_packet( pPacket );
136 }
137 }
138
139 if( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
140 {
141 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
142 "WLANBAP_LinkSupervisionTimerHandler failed to get vos_pkt\n" );
143 return vosStatus;
144 }
145
146 // Form the 802.3 header
147 vos_mem_copy( w8023Header.vDA, pBtampCtx->peer_mac_addr, VOS_MAC_ADDR_SIZE);
148 vos_mem_copy( w8023Header.vSA, pBtampCtx->self_mac_addr, VOS_MAC_ADDR_SIZE);
149
150 headerLength = WLANBAP_LLC_HEADER_LEN;
151 /* Now the 802.3 length field is big-endian?! */
152 w8023Header.usLenType = vos_cpu_to_be16(headerLength);
153
154 /* Now adjust the protocol type bytes*/
155 protoType = vos_cpu_to_be16( protoType);
156 /* Now form the LLC header */
157 vos_mem_copy(aucLLCHeader,
158 WLANBAP_LLC_HEADER,
159 sizeof(WLANBAP_LLC_HEADER));
160 vos_mem_copy(&aucLLCHeader[WLANBAP_LLC_OUI_OFFSET],
161 WLANBAP_BT_AMP_OUI,
162 WLANBAP_LLC_OUI_SIZE);
163 vos_mem_copy(&aucLLCHeader[WLANBAP_LLC_PROTO_TYPE_OFFSET],
164 &protoType, //WLANBAP_BT_AMP_TYPE_LS_REQ
165 WLANBAP_LLC_PROTO_TYPE_SIZE);
166
167 /* Push on the LLC header */
168 vos_pkt_push_head(pPacket,
169 aucLLCHeader,
170 WLANBAP_LLC_HEADER_LEN);
171
172 /* Push on the 802.3 header */
173 vos_pkt_push_head(pPacket, &w8023Header, sizeof(w8023Header));
174 *ppPacket = pPacket;
175 return vosStatus;
176}
177
178
179
180/*===========================================================================
181
182 FUNCTION WLANBAP_InitLinkSupervision
183
184 DESCRIPTION
185
186 This API will be called when Link Supervision module is to be initialized when connected at BAP
187
188 PARAMETERS
189
190 btampHandle: The BT-AMP PAL handle returned in WLANBAP_GetNewHndl.
191
192 RETURN VALUE
193
194 The result code associated with performing the operation
195
196 VOS_STATUS_E_INVAL: Input parameters are invalid
197 VOS_STATUS_E_FAULT: BAP handle is NULL
198 VOS_STATUS_SUCCESS: Everything is good :)
199
200 SIDE EFFECTS
201
202============================================================================*/
203#define TX_LS_DATALEN 32
204
205VOS_STATUS
206WLANBAP_InitLinkSupervision
207(
208 ptBtampHandle btampHandle
209)
210{
211 VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
212 ptBtampContext pBtampCtx = (ptBtampContext) btampHandle;
213 vos_pkt_t *pLSReqPacket;
214 vos_pkt_t *pLSRepPacket;
215 v_U16_t lsPktln;
216
217 if ( NULL == pBtampCtx)
218 {
219 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
220 "Invalid BAP handle value in %s", __FUNCTION__);
221 return VOS_STATUS_E_FAULT;
222 }
223
224#if 0
225 /* Initialize Link supervision data structure */
226 vos_mem_set(pLsInfo, sizeof(tBtampLS),0);
227
228 /* Allocate memory for Static Tx Data */
229 pLsInfo->pTxPktData = vos_mem_malloc(sizeof(tBtampLsPktData)+TX_LS_DATALEN);
230
231 /* Initialize Static data for LS pkt Tx */
232 pLsInfo->pTxPktData->BufLen = TX_LS_DATALEN;
233 vos_mem_copy (&pLsInfo->pTxPktData->pBuf, LsTxData, pLsInfo->pTxPktData->BufLen);
234#endif
235 pBtampCtx->lsReqPktPending = VOS_FALSE;
236 pBtampCtx->retries = 0;
237
238 vosStatus = WLANBAP_AcquireLSPacket( pBtampCtx, &pLSReqPacket,32, TRUE );
239 if( VOS_IS_STATUS_SUCCESS( vosStatus ) )
240 {
241 pBtampCtx->lsReqPacket = pLSReqPacket;
242 }
243 else
244 {
245 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
246 "%s:AcquireLSPacket failed\n",__FUNCTION__);
247 pBtampCtx->lsReqPacket = NULL;
248 return vosStatus;
249 }
250
251 vosStatus = WLANBAP_AcquireLSPacket( pBtampCtx, &pLSRepPacket,32,FALSE );
252 if( VOS_IS_STATUS_SUCCESS( vosStatus ) )
253 {
254 pBtampCtx->lsRepPacket = pLSRepPacket;
255 }
256 else
257 {
258 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
259 "%s:AcquireLSPacket failed\n",__FUNCTION__);
260 pBtampCtx->lsRepPacket = NULL;
261 return vosStatus;
262 }
263
264 vosStatus = vos_pkt_get_packet_length(pBtampCtx->lsRepPacket,&lsPktln);
265
266 if ( VOS_STATUS_SUCCESS != vosStatus )
267 {
268 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
269 "%s:vos_pkt_get_length error",__FUNCTION__);
270 return VOS_STATUS_E_FAULT;
271 }
272 pBtampCtx->lsPktln = lsPktln;
273
274 /* Start Link Supervision Timer if not configured for infinite */
275 if (pBtampCtx->bapLinkSupervisionTimerInterval)
276 {
277 vosStatus = WLANBAP_StartLinkSupervisionTimer (pBtampCtx,
278 pBtampCtx->bapLinkSupervisionTimerInterval * WLANBAP_BREDR_BASEBAND_SLOT_TIME);
279 }
280 else
281 {
282 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
283 "%s:No LS configured for infinite",__FUNCTION__);
284 }
285
286 return vosStatus;
287}
288
289/*===========================================================================
290
291 FUNCTION WLANBAP_DeInitLinkSupervision
292
293 DESCRIPTION
294
295 This API will be called when Link Supervision module is to be stopped after disconnected at BAP
296
297 PARAMETERS
298
299 btampHandle: The BT-AMP PAL handle returned in WLANBAP_GetNewHndl.
300
301 RETURN VALUE
302
303 The result code associated with performing the operation
304
305 VOS_STATUS_E_INVAL: Input parameters are invalid
306 VOS_STATUS_E_FAULT: BAP handle is NULL
307 VOS_STATUS_SUCCESS: Everything is good :)
308
309 SIDE EFFECTS
310
311============================================================================*/
312VOS_STATUS
313WLANBAP_DeInitLinkSupervision
314(
315 ptBtampHandle btampHandle
316)
317{
318 VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
319 ptBtampContext pBtampCtx = (ptBtampContext) btampHandle;
320
321 if ( NULL == pBtampCtx)
322 {
323 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
324 "Invalid BAP handle value in %s", __FUNCTION__);
325 return VOS_STATUS_E_FAULT;
326 }
327 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
328 "In: %s", __FUNCTION__);
329
330 vosStatus = WLANBAP_StopLinkSupervisionTimer(pBtampCtx);
331
332
333 /*Free the vos packet*/
334 if ( pBtampCtx->lsRepPacket )
335 {
336 vosStatus = vos_pkt_return_packet(pBtampCtx->lsRepPacket);
337 pBtampCtx->lsRepPacket = NULL;
338 }
339
340 if ( pBtampCtx->lsReqPacket )
341 {
342 vosStatus = vos_pkt_return_packet(pBtampCtx->lsReqPacket);
343 pBtampCtx->lsReqPacket = NULL;
344 }
345
346
347 return vosStatus;
348}
349
350/*===========================================================================
351
352 FUNCTION WLANBAP_RxProcLsPkt
353
354 DESCRIPTION
355
356 This API will be called when Link Supervision frames are received at BAP
357
358 PARAMETERS
359
360 btampHandle: The BT-AMP PAL handle returned in WLANBAP_GetNewHndl.
361 pucAC: Pointer to return the access category
362 vosDataBuff: The data buffer containing the 802.3 frame to be
363 translated to BT HCI Data Packet
364
365 RETURN VALUE
366
367 The result code associated with performing the operation
368
369 VOS_STATUS_E_INVAL: Input parameters are invalid
370 VOS_STATUS_E_FAULT: BAP handle is NULL
371 VOS_STATUS_SUCCESS: Everything is good :)
372
373 SIDE EFFECTS
374
375============================================================================*/
376VOS_STATUS
377WLANBAP_RxProcLsPkt
378(
379 ptBtampHandle btampHandle,
380 v_U8_t phy_link_handle, /* Used by BAP to indentify the WLAN assoc. (StaId) */
381 v_U16_t RxProtoType, /* Protocol Type from the frame received */
382 vos_pkt_t *vosRxLsBuff
383)
384{
385 VOS_STATUS vosStatus;
386 ptBtampContext pBtampCtx = (ptBtampContext) btampHandle;
387 WLANBAP_8023HeaderType w8023Header;
388 v_SIZE_t HeaderLen = sizeof(w8023Header);
389
390
391 /*------------------------------------------------------------------------
392 Sanity check params
393 ------------------------------------------------------------------------*/
394 if ( NULL == pBtampCtx)
395 {
396 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
397 "Invalid BAP handle value in %s", __FUNCTION__);
398 return VOS_STATUS_E_FAULT;
399 }
400
401 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
402 "In %s Received RxProtoType=%x", __FUNCTION__,RxProtoType);
403
404 vos_pkt_extract_data(vosRxLsBuff,0,(v_VOID_t*)&w8023Header,&HeaderLen);
405 if ( !(vos_mem_compare( w8023Header.vDA, pBtampCtx->self_mac_addr, VOS_MAC_ADDR_SIZE)
406 && vos_mem_compare( w8023Header.vSA, pBtampCtx->peer_mac_addr, VOS_MAC_ADDR_SIZE)))
407 {
408
409 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
410 "MAC address mismatch in %s", __FUNCTION__);
411 return VOS_STATUS_E_FAULT;
412 }
413
414 /*Free the vos packet*/
415 vosStatus = vos_pkt_return_packet( vosRxLsBuff );
416 if ( VOS_STATUS_SUCCESS != vosStatus)
417 {
418 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
419 "Failed to free VOS packet in %s", __FUNCTION__);
420 return VOS_STATUS_E_FAULT;
421 }
422
423
424 /* Reset Link Supervision timer */
425 if (RxProtoType == WLANTL_BT_AMP_TYPE_LS_REP)
426 {
427 pBtampCtx->lsReqPktPending = FALSE;
428 pBtampCtx->retries = 0;
429 if (pBtampCtx->bapLinkSupervisionTimerInterval)
430 {
431 /* Restart the LS timer */
432 WLANBAP_StopLinkSupervisionTimer(pBtampCtx);
433 vosStatus = WLANBAP_StartLinkSupervisionTimer (pBtampCtx,
434 pBtampCtx->bapLinkSupervisionTimerInterval * WLANBAP_BREDR_BASEBAND_SLOT_TIME);
435 }
436 }
437 else if(RxProtoType == WLANTL_BT_AMP_TYPE_LS_REQ)
438 {
439 if (pBtampCtx->bapLinkSupervisionTimerInterval)
440 {
441 /* Restart the LS timer */
442 WLANBAP_StopLinkSupervisionTimer(pBtampCtx);
443 vosStatus = WLANBAP_StartLinkSupervisionTimer (pBtampCtx,
444 pBtampCtx->bapLinkSupervisionTimerInterval * WLANBAP_BREDR_BASEBAND_SLOT_TIME);
445 }
446 pBtampCtx->pPacket = pBtampCtx->lsRepPacket;
447 // Handle LS rep frame
448 vosStatus = WLANBAP_TxLinkSupervision( btampHandle, phy_link_handle, pBtampCtx->pPacket, WLANTL_BT_AMP_TYPE_LS_REP);
449 }
450
451 return vosStatus;
452
453}
454
455/* Tx callback function for LS packet */
456static VOS_STATUS WLANBAP_TxLinkSupervisionCB
457(
458 v_PVOID_t pvosGCtx,
459 vos_pkt_t *pPacket,
460 VOS_STATUS retStatus
461)
462{
463 VOS_STATUS vosStatus;
464 ptBtampContext bapContext; /* Holds the btampContext value returned */
465 vos_pkt_t *pLSPacket;
466
467 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
468 "TxCompCB reached for LS Pkt");
469
470 /* Get the BT AMP context from the global */
471 bapContext = gpBtampCtx;
472
473 if (!VOS_IS_STATUS_SUCCESS (retStatus))
474 {
475 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
476 "TxCompCB:Transmit status Failure");
477 }
478
479 if ( pPacket == NULL )
480 {
481 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
482 "WLANBAP_TxCompCB bad input\n" );
483 return VOS_STATUS_E_FAILURE;
484 }
485
486
487 /* Return the packet & reallocate */
488
489 if( pPacket == bapContext->lsReqPacket )
490 {
491 vosStatus = WLANBAP_AcquireLSPacket( bapContext, &pLSPacket,32, TRUE );
492 if( VOS_IS_STATUS_SUCCESS( vosStatus ) )
493 {
494 bapContext->lsReqPacket = pLSPacket;
495 }
496 else
497 {
498 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
499 "%s:AcquireLSPacket failed\n",__FUNCTION__);
500 bapContext->lsReqPacket = NULL;
501 return vosStatus;
502 }
503 }
504 else
505 {
506 vosStatus = WLANBAP_AcquireLSPacket( bapContext, &pLSPacket,32, FALSE );
507 if( VOS_IS_STATUS_SUCCESS( vosStatus ) )
508 {
509 bapContext->lsRepPacket = pLSPacket;
510 }
511 else
512 {
513 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
514 "%s:AcquireLSPacket failed\n",__FUNCTION__);
515 bapContext->lsRepPacket = NULL;
516 return vosStatus;
517 }
518 }
519 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO,
520 "%s:Returned Vos Packet:%x\n",__FUNCTION__, pPacket );
521
522 vos_pkt_return_packet( pPacket );
523
524 return (VOS_STATUS_SUCCESS );
525}
526
527/*===========================================================================
528
529 FUNCTION WLANBAP_TxLinkSupervision
530
531 DESCRIPTION
532
533 This API will be called to process Link Supervision Request received
534
535 PARAMETERS
536
537 btampHandle: The BT-AMP PAL handle returned in WLANBAP_GetNewHndl.
538 pucAC: Pointer to return the access category
539 vosDataBuff: The data buffer containing the 802.3 frame to be
540 translated to BT HCI Data Packet
541
542 RETURN VALUE
543
544 The result code associated with performing the operation
545
546 VOS_STATUS_E_INVAL: Input parameters are invalid
547 VOS_STATUS_E_FAULT: BAP handle is NULL
548 VOS_STATUS_SUCCESS: Everything is good :)
549
550 SIDE EFFECTS
551
552============================================================================*/
553VOS_STATUS
554WLANBAP_TxLinkSupervision
555(
556 ptBtampHandle btampHandle,
557 v_U8_t phy_link_handle, /* Used by BAP to indentify the WLAN assoc. (StaId) */
558 vos_pkt_t *pPacket,
559 v_U16_t protoType
560)
561{
562 ptBtampContext pBtampCtx = (ptBtampContext)btampHandle;
563 VOS_STATUS vosStatus = VOS_STATUS_E_FAILURE;
564 v_PVOID_t pvosGCtx;
565 v_U8_t ucSTAId; /* The StaId (used by TL, PE, and HAL) */
566 v_PVOID_t pHddHdl; /* Handle to return BSL context in */
567 WLANTL_MetaInfoType metaInfo;
568
569
570 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
571 "In : %s protoType=%x", __FUNCTION__,protoType);
572
573 // Retrieve the VOSS context
574 pvosGCtx = pBtampCtx->pvosGCtx;
575
576 /* Lookup the StaId using the phy_link_handle and the BAP context */
577
578 vosStatus = WLANBAP_GetStaIdFromLinkCtx (
579 btampHandle, /* btampHandle value in */
580 phy_link_handle, /* phy_link_handle value in */
581 &ucSTAId, /* The StaId (used by TL, PE, and HAL) */
582 &pHddHdl); /* Handle to return BSL context */
583
584 if ( VOS_STATUS_SUCCESS != vosStatus )
585 {
586 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
587 "Unable to retrieve STA Id from BAP context and phy_link_handle in WLANBAP_TxLinKSupervisionReq");
588 return VOS_STATUS_E_FAULT;
589 }
590
591 vos_mem_zero( &metaInfo, sizeof( WLANTL_MetaInfoType ) );
592
593 metaInfo.ucTID = 0x00 ;
594 metaInfo.ucUP = 0x00;
595 metaInfo.ucIsEapol = VOS_FALSE;//Notify TL that this is NOT an EAPOL frame
596 metaInfo.ucDisableFrmXtl = VOS_FALSE;
597 metaInfo.ucType = 0x00;
598 pBtampCtx->metaInfo = metaInfo;
599
600 vosStatus = WLANTL_TxBAPFrm( pvosGCtx, pPacket, &metaInfo, WLANBAP_TxLinkSupervisionCB );
601 if( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
602 {
603 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
604 "Tx: Packet rejected by TL in WLANBAP_TxLinkSupervisionReq");
605 return vosStatus;
606 }
607
608 if(protoType == WLANTL_BT_AMP_TYPE_LS_REQ)
609 {
610 pBtampCtx->lsReqPktPending = TRUE;
611 pBtampCtx->retries++;
612 }
613
614 if (pBtampCtx->bapLinkSupervisionTimerInterval)
615 {
616 /* Restart the LS timer */
617 WLANBAP_StopLinkSupervisionTimer(pBtampCtx);
618 vosStatus = WLANBAP_StartLinkSupervisionTimer (pBtampCtx,
619 pBtampCtx->bapLinkSupervisionTimerInterval * WLANBAP_BREDR_BASEBAND_SLOT_TIME);
620 }
621
622 if( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
623 {
624 VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
625 "WLANBAP_TxLinkSupervisionReq failed to Start LinkSupervision Timer\n" );
626 return vosStatus;
627 }
628
629 return vosStatus;
630} /* WLANBAP_RxLinkSupervisionReq */
631
632
633