PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/core/data_ctrl/Ctrl/TrafficMonitor/Ctrl.h

http://github.com/CyanogenMod/cm-kernel
C Header | 182 lines | 93 code | 31 blank | 58 comment | 0 complexity | 2390d686f83291a5061e0da5f87ca2f5 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  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. /* */
  37. /* MODULE: tx.h */
  38. /* PURPOSE: Tx module Header file */
  39. /* */
  40. /***************************************************************************/
  41. #ifndef _CTRL_H_
  42. #define _CTRL_H_
  43. #include "osTIType.h"
  44. #include "paramIn.h"
  45. #include "paramOut.h"
  46. #include "rxXfer_api.h"
  47. #include "RateAdaptation.h"
  48. #include "Clsfr.h"
  49. #include "fourX.h"
  50. #define DEF_CURRENT_PREAMBLE PREAMBLE_LONG
  51. #define DEF_CURRENT_MUDULATION_TYPE DRV_MODULATION_CCK
  52. #define DEF_BASIC_RATE DRV_RATE_2M
  53. #define DEF_BASIC_RATE_MASK 0x0003
  54. #define ALL_RATES_AVAILABLE 0xFFFFFFFF
  55. #define DEF_RATE_CONTROL_ENABLE FALSE
  56. #define DEF_START_STOP_LINK_CTRL_ALG FALSE
  57. typedef enum
  58. {
  59. CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_ABOVE,
  60. CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_BELOW,
  61. CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_ABOVE,
  62. CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_BELOW,
  63. CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS,
  64. } ctrlData_trafficIntensityEvents_e;
  65. #define TS_EXCEEDS(currTime,expTime) (currTime > expTime)
  66. #define TS_ADVANCE(currTime,expTime,delta) (expTime = currTime + (delta))
  67. typedef struct
  68. {
  69. UINT32 dbgNumOfMsduFreeInTxComplete[MAX_NUM_OF_TX_QUEUES];
  70. }ctrlDataDbgCounters_t;
  71. typedef struct
  72. {
  73. UINT32 supportedRatesMask[NUM_OF_RATE_CLASS_CLIENTS];
  74. UINT32 policyClassRateMask[NUM_OF_RATE_CLASS_CLIENTS];
  75. UINT32 fwPolicyID[NUM_OF_RATE_CLASS_CLIENTS];
  76. }tsrsParameters_t;
  77. typedef struct
  78. {
  79. TI_HANDLE hSiteMgr;
  80. TI_HANDLE hTxData;
  81. TI_HANDLE hRxData;
  82. TI_HANDLE hWhalCtrl;
  83. TI_HANDLE hOs;
  84. TI_HANDLE hReport;
  85. TI_HANDLE hAPConn;
  86. TI_HANDLE hEvHandler;
  87. TI_HANDLE hTrafficMonitor;
  88. TI_HANDLE hMemMngr;
  89. rateAdaptation_t* pRateAdaptation;
  90. #ifdef SUPPORT_4X
  91. fourX_t* pFourX;
  92. #endif
  93. classifier_t* pClsfr;
  94. BOOL ctrlDataRateControlEnable;
  95. BOOL ctrlDataFourXEnable;
  96. BOOL ctrlDataCerruentFourXstate;
  97. BOOL ctrlDataStartStoplinkControlAlg;
  98. macAddress_t ctrlDataCurrentBSSID;
  99. bssType_e ctrlDataCurrentBssType;
  100. UINT32 ctrlDataBasicRateBitMask;
  101. UINT32 ctrlDataCurrentRateMask;
  102. modulationType_e ctrlDataCurrentModulationType;
  103. rate_e ctrlDataCurrentBasicRate;
  104. modulationType_e ctrlDataCurrentBasicModulationType;
  105. preamble_e ctrlDataCurrentPreambleType;
  106. macAddress_t ctrlDataDeviceMacAddress;
  107. BOOL ctrlDataProtectionEnabled;
  108. RtsCtsStatus_e ctrlDataRtsCtsStatus;
  109. erpProtectionType_e ctrlDataIbssProtectionType;
  110. /* rate adaptation tables */
  111. rateTables_t ctrlDataRateTables;
  112. ctrlData_rateAdapt_t* ctrlDataCurrentRateTable;
  113. /* Control module counters */
  114. ctrlDataCounters_t ctrlDataCounters;
  115. /*
  116. * txRatePolicy section
  117. */
  118. /* txRatePolicies - here we store the policy and set it to the FW */
  119. txRatePolicy_t ctrlDataTxRatePolicy;
  120. /* Client supported rates - currently User (all supported) or SG (configured) */
  121. UINT32 currClientRateMask[NUM_OF_RATE_CLASS_CLIENTS];
  122. /* changing supported rates is done in the next array. We use the change only
  123. on connection - we copy currClientRateMask = nextClientRateMask */
  124. UINT32 nextClientRateMask[NUM_OF_RATE_CLASS_CLIENTS];
  125. BOOL bIsClassAvailable[NUM_OF_RATE_CLASS_CLIENTS];
  126. /* the class ID to use for Tx Data Packets */
  127. rateClassClients_e currClientRateID;
  128. /* Saves the last wanted configuration of the Client ID, used when in a connection we get
  129. 0 supported rates , but in the next connection we get supported rates, thus we use the last one configured */
  130. rateClassClients_e configuredClientRateID;
  131. /* number of retries for each rate in each class in the policy that we set to the FW */
  132. policyClassRatesArray_t policyClassRatesArrayCck [NUM_OF_RATE_CLASS_CLIENTS];
  133. policyClassRatesArray_t policyClassRatesArrayPbcc [NUM_OF_RATE_CLASS_CLIENTS];
  134. policyClassRatesArray_t policyClassRatesArrayOfdm [NUM_OF_RATE_CLASS_CLIENTS];
  135. policyClassRatesArray_t policyClassRatesArrayOfdmA[NUM_OF_RATE_CLASS_CLIENTS];
  136. /* holds the current used array */
  137. policyClassRatesArray_t *pCurrPolicyClassRatesArray;
  138. /* debug counter */
  139. ctrlDataDbgCounters_t ctrlDataDbgCounters;
  140. /* Callback for disassociation notification */
  141. disassocSentCB_t disassocSentCBFunc;
  142. TI_HANDLE disassocSentCBObj;
  143. /* Flag to indicate whether traffic intensity events should be sent or not */
  144. BOOL ctrlDataTrafficIntensityEventsEnabled;
  145. OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS ctrlDataTrafficIntensityThresholds;
  146. TI_HANDLE ctrlDataTrafficThresholdEvents[CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS];
  147. tsrsParameters_t tsrsParameters[MAX_NUM_OF_AC];
  148. /* holds last fragmentation threshold */
  149. UINT16 lastFragmentThreshold;
  150. } ctrlData_t;
  151. #endif