1 /* 2 * Ctrl.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: tx.h */ 38 /* PURPOSE: Tx module Header file */ 39 /* */ 40 /***************************************************************************/ 41 #ifndef _CTRL_H_ 42 #define _CTRL_H_ 43 44 #include "tidef.h" 45 #include "paramOut.h" 46 #include "rxXfer_api.h" 47 #include "DataCtrl_Api.h" 48 49 50 #define DEF_CURRENT_PREAMBLE PREAMBLE_LONG 51 #define ALL_RATES_AVAILABLE 0xFFFFFFFF 52 53 typedef enum 54 { 55 CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_ABOVE, 56 CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_BELOW, 57 CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_ABOVE, 58 CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_BELOW, 59 CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS 60 } ctrlData_trafficIntensityEvents_e; 61 62 63 #define TS_EXCEEDS(currTime,expTime) (currTime > expTime) 64 #define TS_ADVANCE(currTime,expTime,delta) (expTime = currTime + (delta)) 65 66 typedef struct 67 { 68 TI_UINT32 supportedRatesMask; 69 TI_UINT32 policyClassRateMask; 70 TI_UINT32 fwPolicyID; 71 }tsrsParameters_t; 72 73 typedef struct 74 { 75 TI_HANDLE hSiteMgr; 76 TI_HANDLE hTxCtrl; 77 TI_HANDLE hRxData; 78 TI_HANDLE hTWD; 79 TI_HANDLE hOs; 80 TI_HANDLE hReport; 81 TI_HANDLE hAPConn; 82 TI_HANDLE hEvHandler; 83 TI_HANDLE hTrafficMonitor; 84 TI_HANDLE hTxDataQ; 85 TI_HANDLE hStaCap; 86 87 TMacAddr ctrlDataCurrentBSSID; 88 ScanBssType_e ctrlDataCurrentBssType; 89 TI_UINT32 ctrlDataCurrentRateMask; 90 EPreamble ctrlDataCurrentPreambleType; 91 TMacAddr ctrlDataDeviceMacAddress; 92 TI_BOOL ctrlDataProtectionEnabled; 93 RtsCtsStatus_e ctrlDataRtsCtsStatus; 94 erpProtectionType_e ctrlDataIbssProtectionType; 95 erpProtectionType_e ctrlDataDesiredIbssProtection; /* 0 = CTS protaction disable ; 1 = Standard CTS protaction */ 96 97 /* 98 * txRatePolicy section 99 */ 100 101 /* txRatePolicies - here we store the policy and set it to the FW */ 102 TTxRatePolicy ctrlDataTxRatePolicy; 103 104 /* number of retries for each rate in each class in the policy that we set to the FW */ 105 TI_UINT32 policyEnabledRatesMaskCck; 106 TI_UINT32 policyEnabledRatesMaskOfdm; 107 TI_UINT32 policyEnabledRatesMaskOfdmA; 108 TI_UINT32 policyEnabledRatesMaskOfdmN; 109 110 TI_UINT32 uCurrPolicyEnabledRatesMask; /* holds the current used En/Dis Rates Mask */ 111 TI_UINT32 uMgmtPolicyId; /* the management packets policy ID */ 112 113 #ifdef XCC_MODULE_INCLUDED 114 /* Callback for update retries in Link Test */ 115 retriesCB_t retriesUpdateCBFunc; 116 TI_HANDLE retriesUpdateCBObj; 117 #endif 118 119 /* Flag to indicate whether traffic intensity events should be sent or not */ 120 TI_BOOL ctrlDataTrafficIntensityEventsEnabled; 121 OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS ctrlDataTrafficIntensityThresholds; 122 TI_HANDLE ctrlDataTrafficThresholdEvents[CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS]; 123 124 tsrsParameters_t tsrsParameters[MAX_NUM_OF_AC]; 125 126 /* holds last fragmentation threshold */ 127 TI_UINT16 lastFragmentThreshold; 128 129 } ctrlData_t; 130 131 132 #endif 133