diff options
Diffstat (limited to 'wl1271/Txn/TxnQueue.c')
-rw-r--r-- | wl1271/Txn/TxnQueue.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/wl1271/Txn/TxnQueue.c b/wl1271/Txn/TxnQueue.c index 95387608..edfd4378 100644 --- a/wl1271/Txn/TxnQueue.c +++ b/wl1271/Txn/TxnQueue.c @@ -804,6 +804,18 @@ static TTxnStruct *txnQ_SelectTxn (TTxnQObj *pTxnQ) } +/** + * \fn txnQ_ClearQueues + * \brief Clear the function queues + * + * Clear the specified function queues and call its CB for each Txn with status=RECOVERY. + * + * \note Called in critical section. + * \param hTxnQ - The module's object + * \param uFuncId - The calling functional driver + * \return void + * \sa + */ void txnQ_ClearQueues (TI_HANDLE hTxnQ, TI_UINT32 uFuncId) { TTxnQObj *pTxnQ = (TTxnQObj*)hTxnQ; @@ -817,22 +829,16 @@ void txnQ_ClearQueues (TI_HANDLE hTxnQ, TI_UINT32 uFuncId) /* For all function priorities */ for (uPrio = 0; uPrio < pTxnQ->aFuncInfo[uFuncId].uNumPrios; uPrio++) { - while (1) + do { /* Dequeue Txn from current priority queue */ pTxn = (TTxnStruct *) que_Dequeue (pTxnQ->aTxnQueues[uFuncId][uPrio]); - /* If NULL Txn (queue empty), exit while loop */ - if (pTxn == NULL) - { - break; - } - /* * Drop on Restart * do not call fTxnQueueDoneCb (hCbHandle, pTxn) callback */ - } + } while (pTxn != NULL); } /* Clear state - for restart (doesn't call txnQ_Open) */ @@ -852,5 +858,3 @@ void txnQ_PrintQueues (TI_HANDLE hTxnQ) que_Print(pTxnQ->aTxnQueues[TXN_FUNC_ID_WLAN][TXN_HIGH_PRIORITY]); } #endif /* TI_DBG */ - - |