Home | History | Annotate | Download | only in Data_link
      1 /*
      2  * rx.h
      3  *
      4  * Copyright(c) 1998 - 2009 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 /*																		   */
     37 /*		MODULE:	rx.h													   */
     38 /*    	PURPOSE:	Rx module functions header file						   */
     39 /*																		   */
     40 /***************************************************************************/
     41 #ifndef _RX_DATA_H_
     42 #define _RX_DATA_H_
     43 
     44 #include "paramOut.h"
     45 #include "TWDriver.h"
     46 
     47 #define DEF_EXCLUDE_UNENCYPTED				TI_FALSE
     48 #define DEF_EAPOL_DESTINATION				OS_ABS_LAYER
     49 #define DEF_RX_PORT_STATUS					CLOSE
     50 
     51 typedef struct
     52 {
     53 	TI_UINT32		excludedFrameCounter;
     54 	TI_UINT32		rxDroppedDueToVLANIncludedCnt;
     55     TI_UINT32		rxWrongBssTypeCounter;
     56 	TI_UINT32		rxWrongBssIdCounter;
     57     TI_UINT32      rcvUnicastFrameInOpenNotify;
     58 }rxDataDbgCounters_t;
     59 
     60 
     61 /*                         |                           |                         |
     62  31 30 29 28 | 27 26 25 24 | 23 22 21 20 | 19 18 17 16 | 15 14 13 12 | 11 10 9 8 | 7 6 5 4 | 3 2 1 0
     63                            |                           |                         |
     64 */
     65 
     66 
     67 typedef enum
     68 {
     69 	DATA_IAPP_PACKET  = 0,
     70 	DATA_EAPOL_PACKET = 1,
     71 	DATA_DATA_PACKET  = 2,
     72     DATA_VLAN_PACKET  = 3,
     73 	MAX_NUM_OF_RX_DATA_TYPES
     74 }rxDataPacketType_e;
     75 
     76 
     77 
     78 typedef void (*rxData_pBufferDispatchert) (TI_HANDLE hRxData , void *pBuffer, TRxAttr *pRxAttr);
     79 
     80 
     81 typedef struct
     82 {
     83 	/* Handles */
     84 	TI_HANDLE	 		hCtrlData;
     85 	TI_HANDLE	 		hTWD;
     86 	TI_HANDLE			hMlme;
     87 	TI_HANDLE			hOs;
     88 	TI_HANDLE			hRsn;
     89 	TI_HANDLE			hReport;
     90 	TI_HANDLE			hSiteMgr;
     91 	TI_HANDLE			hXCCMgr;
     92     TI_HANDLE           hEvHandler;
     93     TI_HANDLE           hTimer;
     94     TI_HANDLE           RxEventDistributor;
     95 	TI_HANDLE           hThroughputTimer;
     96 	TI_HANDLE			hPowerMgr;
     97     TI_BOOL             rxThroughputTimerEnable;
     98 	TI_BOOL             rxDataExcludeUnencrypted;
     99     TI_BOOL             rxDataExludeBroadcastUnencrypted;
    100 	eapolDestination_e 	rxDataEapolDestination;
    101 
    102 	portStatus_e  		rxDataPortStatus;
    103 
    104     /* Rx Data Filters */
    105     filter_e            filteringDefaultAction;
    106     TI_BOOL             filteringEnabled;
    107     TI_BOOL             isFilterSet[MAX_DATA_FILTERS];
    108     TRxDataFilterRequest filterRequests[MAX_DATA_FILTERS];
    109 
    110 	/* Counters */
    111 	rxDataCounters_t	rxDataCounters;
    112 	rxDataDbgCounters_t	rxDataDbgCounters;
    113 
    114 	rxData_pBufferDispatchert rxData_dispatchBuffer[MAX_NUM_OF_RX_PORT_STATUS][MAX_NUM_OF_RX_DATA_TYPES];
    115 
    116 	TI_INT32				prevSeqNum;
    117 
    118  	TI_UINT32           uLastDataPktRate;  /* save Rx packet rate for statistics */
    119 
    120 	TI_BOOL			    reAuthInProgress;
    121 	TI_HANDLE			reAuthActiveTimer;
    122 	TI_UINT32			reAuthActiveTimeout;
    123 
    124 
    125     /* Generic Ethertype support */
    126     TI_UINT16           genericEthertype;
    127 }rxData_t;
    128 
    129 #endif
    130