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

/drivers/net/wireless/tiwlan1251/common/src/TNETW_Driver/Data_Srv/Tx_HW_Queue/txHwQueue.c

http://github.com/CyanogenMod/cm-kernel
C | 560 lines | 213 code | 107 blank | 240 comment | 18 complexity | f12df6a25c40fad31105235781963aa5 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: txHwQueue.c
  38. *
  39. * PURPOSE: manage the wlan hardware Tx memory blocks allocation per queue.
  40. *
  41. * DESCRIPTION:
  42. * ============
  43. * This module is responsible for the HW Tx resources allocation (except
  44. * the HW double buffer).
  45. * The HW Tx resources are allocated and freed in the driver by pure
  46. * calculations without accessing the FW. This is done by tracking the
  47. * resources allocation and freeing, and checking against thresholds before
  48. * each allocation.
  49. ****************************************************************************/
  50. #ifdef _WINDOWS
  51. #endif
  52. #include "whalCommon.h"
  53. #include "whalHwDefs.h"
  54. #include "whalCtrl_api.h"
  55. #include "whalParams.h"
  56. #include "txCtrlBlk_api.h"
  57. #include "txHwQueue_api.h"
  58. #include "txHwQueue.h" /* Local definitions */
  59. /****************************************************************************
  60. * txHwQueue_Create()
  61. ****************************************************************************
  62. * DESCRIPTION: Create the Tx buffers pool object
  63. *
  64. * INPUTS: None
  65. *
  66. * OUTPUT: None
  67. *
  68. * RETURNS: The Created object
  69. ****************************************************************************/
  70. TI_HANDLE txHwQueue_Create(TI_HANDLE hOs)
  71. {
  72. TxHwQueueObj_t *pTxHwQueue;
  73. pTxHwQueue = os_memoryAlloc(hOs, sizeof(TxHwQueueObj_t));
  74. if (pTxHwQueue == NULL)
  75. return NULL;
  76. os_memoryZero(hOs, pTxHwQueue, sizeof(TxHwQueueObj_t));
  77. pTxHwQueue->hOs = hOs;
  78. return( (TI_HANDLE)pTxHwQueue );
  79. }
  80. /****************************************************************************
  81. * txHwQueue_Destroy()
  82. ****************************************************************************
  83. * DESCRIPTION: Destroy the Tx buffers pool object
  84. *
  85. * INPUTS: hTxHwQueue - The object to free
  86. *
  87. * OUTPUT: None
  88. *
  89. * RETURNS: OK or NOK
  90. ****************************************************************************/
  91. TI_STATUS txHwQueue_Destroy(TI_HANDLE hTxHwQueue)
  92. {
  93. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  94. if (pTxHwQueue)
  95. os_memoryFree(pTxHwQueue->hOs, pTxHwQueue, sizeof(TxHwQueueObj_t));
  96. return OK;
  97. }
  98. /****************************************************************************
  99. * txHwQueue_init()
  100. ****************************************************************************
  101. DESCRIPTION: Initialize module handles.
  102. ****************************************************************************/
  103. TI_STATUS txHwQueue_init(TI_HANDLE hTxHwQueue, TI_HANDLE hReport, TI_HANDLE hWhalParams)
  104. {
  105. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  106. pTxHwQueue->hReport = hReport;
  107. pTxHwQueue->pWhalParams = (WhalParams_T *)hWhalParams;
  108. return OK;
  109. }
  110. /****************************************************************************
  111. * txHwQueue_Config()
  112. ****************************************************************************
  113. * DESCRIPTION: Configure the Tx buffers pool object
  114. *
  115. * INPUTS: None
  116. *
  117. * OUTPUT: None
  118. *
  119. * RETURNS:
  120. ****************************************************************************/
  121. TI_STATUS txHwQueue_Config(TI_HANDLE hTxHwQueue, TnetwDrv_InitParams_t *pInitParams)
  122. {
  123. UINT8 acID;
  124. /* Configure queue parameters to Tx-HW queue module */
  125. for(acID = 0 ; acID < MAX_NUM_OF_AC ; acID++)
  126. {
  127. txHwQueue_configQueue( hTxHwQueue,
  128. acID,
  129. pInitParams->whalCtrl_init.TxBlocksLowPercentPerAc[acID],
  130. pInitParams->whalCtrl_init.TxBlocksHighPercentPerAc[acID]);
  131. }
  132. return OK;
  133. }
  134. /****************************************************************************
  135. * txHwQueue_setHwInfo()
  136. ****************************************************************************
  137. DESCRIPTION:
  138. Called after the HW configuration in the driver init or recovery process.
  139. Configure Tx HW information, including Tx-HW-blocks number, and per queue
  140. Tx-descriptors number. Than, restart the module variables.
  141. ****************************************************************************/
  142. TI_STATUS txHwQueue_setHwInfo(TI_HANDLE hTxHwQueue, DmaParams_T *pDmaParams)
  143. {
  144. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  145. int TxQid;
  146. pTxHwQueue->NumBlocks = pDmaParams->NumTxBlocks - 1; /* One block must be always free for FW use. */
  147. /* Get the Tx descriptors number per queue. */
  148. for(TxQid = 0; TxQid < MAX_NUM_OF_TX_QUEUES ; TxQid++)
  149. pTxHwQueue->TxHwQueueInfo[TxQid].numDescriptors = pDmaParams->TxNumDesc[TxQid];
  150. /* Restart the module variables. */
  151. txHwQueue_restart(hTxHwQueue);
  152. return OK;
  153. }
  154. /****************************************************************************
  155. * txHwQueue_configQueue()
  156. ****************************************************************************
  157. DESCRIPTION:
  158. Configure Tx HW queue blocks accounting parameters used in the allocate and free
  159. procedures in this module.
  160. Two thresholds are defined per queue:
  161. a) TxBlocksLowPercentPerQueue[queue] - The lower threshold is the minimal number of
  162. Tx blocks guaranteed for each queue.
  163. The sum of all low thresholds should be less than 100%.
  164. b) TxBlocksHighPercentPerQueue[queue] - The higher threshold is the maximal number of
  165. Tx blocks that may be allocated to the queue.
  166. The extra blocks above the low threshold can be allocated when needed only
  167. if they are currently available and are not needed in order to guarantee
  168. the other queues low threshold.
  169. The sum of all high thresholds should be more than 100%.
  170. ****************************************************************************/
  171. TI_STATUS txHwQueue_configQueue(TI_HANDLE hTxHwQueue, UINT8 TxQid,
  172. UINT16 percentOfBlockLowThreshold, UINT16 percentOfBlockHighThreshold)
  173. {
  174. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  175. txHwQueueInfo_t *pQueueInfo = &(pTxHwQueue->TxHwQueueInfo[TxQid]);
  176. /* Calculate queue's blocks high threshold: maximum number that may be allocated to it. */
  177. pQueueInfo->numBlocksHighThreshold = percentOfBlockHighThreshold * pTxHwQueue->NumBlocks / 100;
  178. /* Calculate queue's blocks low threshold: minimum number that must be reserved for it. */
  179. pQueueInfo->numBlocksLowThreshold = percentOfBlockLowThreshold * pTxHwQueue->NumBlocks / 100;
  180. /* Set the threshold for low block resources: when the next packet may not have enough blocks. */
  181. if (pQueueInfo->numBlocksLowThreshold > MAX_BLKS_PER_PKT)
  182. pQueueInfo->lowResourceThresh = pQueueInfo->numBlocksLowThreshold - MAX_BLKS_PER_PKT;
  183. else
  184. pQueueInfo->lowResourceThresh = 0;
  185. pQueueInfo->numBlocksUsed = 0;
  186. pQueueInfo->numPackets = 0;
  187. /* Since no blocks are used yet, reserved blocks number equals to the low threshold. */
  188. pQueueInfo->numBlocksReserved = pQueueInfo->numBlocksLowThreshold;
  189. /* Accumulate total reserved blocks. */
  190. pTxHwQueue->TotalBlocksReserved += pQueueInfo->numBlocksReserved;
  191. WLAN_REPORT_INIT(pTxHwQueue->hReport, TX_HW_QUEUE_MODULE_LOG,
  192. ("txHwQueue_configQueue(): HighThresh=%d, LowThresh=%d, LowRsrcThresh=%d, TotalReserved=%d\n",
  193. pQueueInfo->numBlocksHighThreshold, pQueueInfo->numBlocksLowThreshold,
  194. pQueueInfo->lowResourceThresh, pTxHwQueue->TotalBlocksReserved));
  195. return OK;
  196. }
  197. /****************************************************************************
  198. * txHwQueue_restart()
  199. ****************************************************************************
  200. DESCRIPTION:
  201. ============
  202. Restarts the Tx-HW-Queue module.
  203. Should be called upon disconnect and recovery!!
  204. ****************************************************************************/
  205. TI_STATUS txHwQueue_restart(TI_HANDLE hTxHwQueue)
  206. {
  207. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  208. txHwQueueInfo_t *pQueueInfo;
  209. int TxQid;
  210. /* All blocks are free at restart.
  211. Note that free means all blocks that are currently not in use,
  212. while reserved are a part of the free blocks that are the summary of all queues reserved blocks.
  213. Each queue may take from the reserved part only up to its own reservation (according to
  214. its low threshold). */
  215. pTxHwQueue->NumFree = pTxHwQueue->NumBlocks;
  216. pTxHwQueue->TotalBlocksReserved = 0;
  217. for(TxQid = 0; TxQid < MAX_NUM_OF_TX_QUEUES ; TxQid++)
  218. {
  219. pQueueInfo = &(pTxHwQueue->TxHwQueueInfo[TxQid]);
  220. pQueueInfo->numBlocksUsed = 0;
  221. pQueueInfo->numPackets = 0;
  222. /* Since no blocks are used yet, reserved blocks number equals to the low threshold. */
  223. pQueueInfo->numBlocksReserved = pQueueInfo->numBlocksLowThreshold;
  224. /* Accumulate total reserved blocks. */
  225. pTxHwQueue->TotalBlocksReserved += pQueueInfo->numBlocksReserved;
  226. }
  227. return OK;
  228. }
  229. /****************************************************************************
  230. * txHwQueue_alloc()
  231. ****************************************************************************
  232. * DESCRIPTION:
  233. ============
  234. If the required blocks are available for the queue and there is an available
  235. descriptor, update the blocks and descriptor allocation and return OK.
  236. Else, return NOK.
  237. If the queue's reaources (blocks) are low, indicate in the descriptor to get
  238. Tx-complete from FW immediately.
  239. ****************************************************************************/
  240. TI_STATUS txHwQueue_alloc(TI_HANDLE hTxHwQueue, txCtrlBlkEntry_t *pPktCtrlBlk)
  241. {
  242. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  243. UINT8 numBlksToAlloc; /* The number of blocks required for the current packet. */
  244. UINT8 maxAllowed; /* Max blocks that may be currently allocated to this Queue to obey the high threshold.*/
  245. UINT8 maxAvailable; /* Max blocks that are currently free and not reserved for other Queues. */
  246. UINT8 reserved; /* How many blocks are reserved to this Queue before this allocation. */
  247. txHwQueueInfo_t *pQueueInfo = &(pTxHwQueue->TxHwQueueInfo[pPktCtrlBlk->txDescriptor.xmitQueue]);
  248. /***********************************************************************/
  249. /* Calculate packet fragmentation threshold and required HW blocks. */
  250. /***********************************************************************/
  251. txHwQueueCalc_BlocksNum(hTxHwQueue, pPktCtrlBlk);
  252. /***********************************************************************/
  253. /* Check if the required resources are available */
  254. /***********************************************************************/
  255. /* If all queue's descriptors are occupied, return BUSY. */
  256. if (pQueueInfo->numPackets == pQueueInfo->numDescriptors)
  257. {
  258. WLAN_REPORT_INFORMATION(pTxHwQueue->hReport, TX_HW_QUEUE_MODULE_LOG,
  259. ("txHwQueue_alloc(): No Descriptors, Queue=%d, Descriptors=%d, Packets=%d\n",
  260. pPktCtrlBlk->txDescriptor.xmitQueue, pQueueInfo->numDescriptors, pQueueInfo->numPackets));
  261. return NOK;
  262. }
  263. reserved = pQueueInfo->numBlocksReserved;
  264. numBlksToAlloc = pPktCtrlBlk->txDescriptor.numMemBlks;
  265. /* Calculate how far we are from this Queue's high threshold limit (allowed = highThresh - used). */
  266. maxAllowed = pQueueInfo->numBlocksHighThreshold - pQueueInfo->numBlocksUsed;
  267. /* Calculate how many buffers are available for this Queue: the total free buffers minus the buffers
  268. that are reserved for other Queues (all reserved minus this Queue's reserved). */
  269. maxAvailable = pTxHwQueue->NumFree - (pTxHwQueue->TotalBlocksReserved - reserved);
  270. /* If we need more blocks than are allowed or available, return BUSY. */
  271. if (numBlksToAlloc > min(maxAllowed, maxAvailable))
  272. {
  273. WLAN_REPORT_INFORMATION(pTxHwQueue->hReport, TX_HW_QUEUE_MODULE_LOG,
  274. ("txHwQueue_alloc(): No Hw-Blocks, Queue=%d, Req-blks=%d , Free=%d, Used=%d, available=%d\n",
  275. pPktCtrlBlk->txDescriptor.xmitQueue, numBlksToAlloc, pTxHwQueue->NumFree, pQueueInfo->numBlocksUsed, maxAvailable));
  276. return NOK;
  277. }
  278. /***********************************************************************/
  279. /* Allocate required resources */
  280. /***********************************************************************/
  281. /* Update number of packets in FW (for descriptors allocation check). */
  282. pQueueInfo->numPackets++;
  283. /* If we are currently using less than the low threshold (i.e. we have some reserved blocks),
  284. blocks allocation should reduce the reserved blocks number as follows:
  285. */
  286. if (reserved)
  287. {
  288. /* If adding the allocated blocks to the used blocks will pass the low-threshold,
  289. only the part up to the low-threshold is subtracted from the reserved blocks.
  290. This is because blocks are reserved for the Queue only up to its low-threshold.
  291. 0 old used low new used high
  292. |######| | | |
  293. |######| | | |
  294. <------------ allocated ----------->
  295. <----- old reserved ---->
  296. new reserved = 0 (we passed the low threshold)
  297. */
  298. if (numBlksToAlloc > reserved)
  299. {
  300. pQueueInfo->numBlocksReserved = 0;
  301. pTxHwQueue->TotalBlocksReserved -= reserved; /* reduce change from total reserved.*/
  302. }
  303. /* Else, if allocating less than reserved,
  304. the allocated blocks are subtracted from the reserved blocks:
  305. 0 old used new used low high
  306. |######| | | |
  307. |######| | | |
  308. <- allocated ->
  309. <--------- old reserved ---------->
  310. <-- new reserved -->
  311. */
  312. else
  313. {
  314. pQueueInfo->numBlocksReserved -= numBlksToAlloc;
  315. pTxHwQueue->TotalBlocksReserved -= numBlksToAlloc; /* reduce change from total reserved.*/
  316. }
  317. }
  318. /* Update total free blocks and Queue used blocks with the allocated blocks number. */
  319. pTxHwQueue->NumFree -= numBlksToAlloc;
  320. pQueueInfo->numBlocksUsed += numBlksToAlloc;
  321. /* If this queue has low resources (blocks or descriptors), set descriptor flag to get Tx-Complete from FW. */
  322. if ( (pQueueInfo->numBlocksUsed > pQueueInfo->lowResourceThresh) ||
  323. (pQueueInfo->numPackets == pQueueInfo->numDescriptors - 1) )
  324. {
  325. #ifdef _WINDOWS
  326. #else
  327. pPktCtrlBlk->txDescriptor.txAttr |= TX_COMPLETE_REQUIRED_BIT;
  328. #endif
  329. }
  330. WLAN_REPORT_INFORMATION(pTxHwQueue->hReport, TX_HW_QUEUE_MODULE_LOG,
  331. ("txHwQueue_alloc(): SUCCESS, Queue=%d, Req-blks=%d , Free=%d, Used=%d, LowResources=%d\n",
  332. pPktCtrlBlk->txDescriptor.xmitQueue, numBlksToAlloc, pTxHwQueue->NumFree,
  333. pQueueInfo->numBlocksUsed, (pQueueInfo->numBlocksUsed > pQueueInfo->lowResourceThresh)));
  334. return OK;
  335. }
  336. /****************************************************************************
  337. * txHwQueue_free()
  338. ****************************************************************************
  339. * DESCRIPTION: Decrement the number of used descriptors and used data blks
  340. for the specific queue.
  341. ****************************************************************************/
  342. TI_STATUS txHwQueue_free(TI_HANDLE hTxHwQueue, txCtrlBlkEntry_t *pPktCtrlBlk)
  343. {
  344. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  345. UINT8 numBlksToFree; /* The number of blocks freed by the current packet. */
  346. UINT8 lowThreshold; /* Minimum blocks that are guaranteed for this Queue. */
  347. UINT8 newUsed; /* Blocks that are used by this Queue after freeing these blocks. */
  348. UINT8 newReserved; /* How many blocks are reserved to this Queue after freeing. */
  349. txHwQueueInfo_t *pQueueInfo = &(pTxHwQueue->TxHwQueueInfo[pPktCtrlBlk->txDescriptor.xmitQueue]);
  350. numBlksToFree = pPktCtrlBlk->txDescriptor.numMemBlks;
  351. /* Update number of packets in FW (for descriptors allocation check). */
  352. pQueueInfo->numPackets--;
  353. #ifdef TI_DBG /* Debug Counters */
  354. /* Sanity check: make sure we don't free more blocks than are in use. */
  355. if (numBlksToFree > pQueueInfo->numBlocksUsed)
  356. {
  357. WLAN_REPORT_ERROR(pTxHwQueue->hReport, TX_HW_QUEUE_MODULE_LOG,
  358. ("txHwQueue_free(): Try to free more blks than used: Queue %d, free %d, used %d\n",
  359. pPktCtrlBlk->txDescriptor.xmitQueue, numBlksToFree, pQueueInfo->numBlocksUsed));
  360. return NOK;
  361. }
  362. #endif
  363. /* Update total free blocks and Queue used blocks with the freed blocks number. */
  364. pTxHwQueue->NumFree += numBlksToFree;
  365. pQueueInfo->numBlocksUsed -= numBlksToFree;
  366. lowThreshold = pQueueInfo->numBlocksLowThreshold;
  367. newUsed = pQueueInfo->numBlocksUsed;
  368. /* If after freeing the blocks we are using less than the low threshold,
  369. update total reserved blocks number as follows:
  370. (note: if we are above the low threshold after freeing the blocks we still have no reservation.)
  371. */
  372. if (newUsed < lowThreshold)
  373. {
  374. newReserved = lowThreshold - newUsed;
  375. pQueueInfo->numBlocksReserved = newReserved;
  376. /* If freeing the blocks reduces the used blocks from above to below the low-threshold,
  377. only the part from the low-threshold to the new used number is added to the
  378. reserved blocks (because blocks are reserved for the Queue only up to its low-threshold):
  379. 0 new used low old used high
  380. |###########|####################|################| |
  381. |###########|####################|################| |
  382. <-------------- freed -------------->
  383. <-- new reserved -->
  384. old reserved = 0
  385. */
  386. if (numBlksToFree > newReserved)
  387. pTxHwQueue->TotalBlocksReserved += newReserved; /* Add change to total reserved.*/
  388. /* Else, if we were under the low-threshold before freeing these blocks,
  389. all freed blocks are added to the reserved blocks:
  390. 0 new used old used low high
  391. |################|#################| | |
  392. |################|#################| | |
  393. <---- freed ---->
  394. <- old reserved ->
  395. <---------- new reserved ---------->
  396. */
  397. else
  398. pTxHwQueue->TotalBlocksReserved += numBlksToFree; /* Add change to total reserved.*/
  399. }
  400. return OK;
  401. }
  402. /****************************************************************************
  403. * txHwQueue_GetUsedHwBlks()
  404. ****************************************************************************
  405. * DESCRIPTION: Provide the number of used HW Tx blocks of the given Queue.
  406. ****************************************************************************/
  407. UINT8 txHwQueue_GetUsedHwBlks(TI_HANDLE hTxHwQueue, int TxQid)
  408. {
  409. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  410. return (pTxHwQueue->TxHwQueueInfo[TxQid].numBlocksUsed);
  411. }
  412. /****************************************************************************
  413. * txHwQueue_printInfo()
  414. ****************************************************************************
  415. * DESCRIPTION: Print the Hw Queue current information
  416. ****************************************************************************/
  417. void txHwQueue_printInfo(TI_HANDLE hTxHwQueue)
  418. {
  419. #ifdef TI_DBG
  420. TxHwQueueObj_t *pTxHwQueue = (TxHwQueueObj_t *)hTxHwQueue;
  421. int TxQid;
  422. /* Print the Tx-HW-Queue information: */
  423. WLAN_OS_REPORT(("Hw-Queues Information:\n"));
  424. WLAN_OS_REPORT(("======================\n"));
  425. WLAN_OS_REPORT(("Total Blocks: %d\n", pTxHwQueue->NumBlocks));
  426. WLAN_OS_REPORT(("Total Free Blocks: %d\n", pTxHwQueue->NumFree));
  427. WLAN_OS_REPORT(("Total Reserved Blocks: %d\n\n", pTxHwQueue->TotalBlocksReserved));
  428. for(TxQid = 0; TxQid < MAX_NUM_OF_TX_QUEUES; TxQid++)
  429. {
  430. WLAN_OS_REPORT(("Queue %d: Used=%d, Reserved=%d, LowThresh=%d, HighThresh=%d, LowRsrcThresh=%d, NumDesc=%d, UsedDesc=%d\n",
  431. TxQid,
  432. pTxHwQueue->TxHwQueueInfo[TxQid].numBlocksUsed,
  433. pTxHwQueue->TxHwQueueInfo[TxQid].numBlocksReserved,
  434. pTxHwQueue->TxHwQueueInfo[TxQid].numBlocksLowThreshold,
  435. pTxHwQueue->TxHwQueueInfo[TxQid].numBlocksHighThreshold,
  436. pTxHwQueue->TxHwQueueInfo[TxQid].lowResourceThresh,
  437. pTxHwQueue->TxHwQueueInfo[TxQid].numDescriptors,
  438. pTxHwQueue->TxHwQueueInfo[TxQid].numPackets));
  439. }
  440. #endif /* TI_DBG */
  441. }