1 /**************************************************************************** 2 **+-----------------------------------------------------------------------+** 3 **| |** 4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 5 **| All rights reserved. |** 6 **| |** 7 **| Redistribution and use in source and binary forms, with or without |** 8 **| modification, are permitted provided that the following conditions |** 9 **| are met: |** 10 **| |** 11 **| * Redistributions of source code must retain the above copyright |** 12 **| notice, this list of conditions and the following disclaimer. |** 13 **| * Redistributions in binary form must reproduce the above copyright |** 14 **| notice, this list of conditions and the following disclaimer in |** 15 **| the documentation and/or other materials provided with the |** 16 **| distribution. |** 17 **| * Neither the name Texas Instruments nor the names of its |** 18 **| contributors may be used to endorse or promote products derived |** 19 **| from this software without specific prior written permission. |** 20 **| |** 21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 32 **| |** 33 **+-----------------------------------------------------------------------+** 34 ****************************************************************************/ 35 36 #ifndef _WHAL_ENDPNT_H 37 #define _WHAL_ENDPNT_H 38 39 #include "whalCommon.h" 40 #include "whalCtrl_api.h" 41 #include "whalCtrl.h" 42 #include "memMngrEx.h" 43 44 /* CLASS WHAL_ENDPNT*/ 45 typedef enum 46 { 47 MSDU_READY = 0, 48 MSDU_IN_PROGRESS, 49 MPDU_DROP, 50 MPDU_DUP_DROP, 51 MSDU_DROP 52 } collectStatus_e; 53 54 typedef struct 55 { 56 UINT32 seqNum; /* The sequence number of the last MSDU received from the station*/ 57 UINT32 fragNum; /* The fragment number of the last fragment received from the station*/ 58 mem_MSDU_T* msduPtr; /* Pointer to the MSDU structure*/ 59 mem_BD_T* lastBdPtr; /* Pointer to the last fragment in the collection*/ 60 UINT32 timeStamp; /* A timestamp contains the receive time of the first fragment in the collection, 61 if any*/ 62 BOOL collect; /* designates if the station is in a middle of a fragment collection*/ 63 } collectEntry_t; 64 65 typedef struct _WHAL_ENDPNT 66 { 67 collectEntry_t collectEntry; 68 69 WHAL_CTRL *pWhalCtrl; /* Pointer to the HL_HAL control module*/ 70 71 TI_HANDLE hOs; 72 TI_HANDLE hReport; 73 TI_HANDLE hMemMngr; 74 75 } WHAL_ENDPNT; 76 77 typedef struct 78 { 79 TI_HANDLE hReport; /* handle to the reporter module*/ 80 TI_HANDLE hMemMngr; /* handle to the memory manager module*/ 81 } whalEndpnt_config_t; 82 83 84 /* WHAL ENDPOINT Class API*/ 85 TI_HANDLE whalEndpnt_Create (TI_HANDLE hWhalCtrl, TI_HANDLE hOs); 86 87 int whalEndpnt_Config (TI_HANDLE hWhalEndpnt, whalEndpnt_config_t* pWhalEndpntCfg); 88 89 collectStatus_e whalEndpnt_FragCollect (TI_HANDLE hWhalEndpnt, mem_MSDU_T* pMpdu, mem_MSDU_T** pMsdu); 90 91 BOOL whalEndpnt_IsCollect (TI_HANDLE hWhalEndpnt); 92 93 int whalEndpnt_Destroy (TI_HANDLE hWhalEnpnt); 94 #endif /* _WHAL_ENDPNT_H*/ 95