Lines Matching refs:pCmdQueue
106 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
109 os_memoryFree(pCmdQueue->hOs, pCmdQueue, sizeof(CmdQueue_T));
127 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
129 pCmdQueue->Head = 0;
130 pCmdQueue->Tail = 0;
131 pCmdQueue->NumberOfCommandInQueue = 0;
132 pCmdQueue->MaxNumberOfCommandInQueue = 0;
133 pCmdQueue->State = CMDQUEUE_STATE_IDLE;
134 pCmdQueue->CmdCompleteGenericCB_Func = NULL;
135 pCmdQueue->CmdCompleteGenericCB_Arg = NULL;
136 pCmdQueue->FailureCB = NULL;
137 pCmdQueue->FailureCbHandle = NULL;
138 pCmdQueue->SM_RC = 0;
139 pCmdQueue->hReport = hReport;
140 pCmdQueue->hCmdMBox = hCmdMBox;
141 pCmdQueue->ErrorFlag = FALSE;
164 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
166 int first = pCmdQueue->Head;
173 pCmdQueue->State = CMDQUEUE_STATE_IDLE;
175 WLAN_REPORT_INFORMATION(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
184 pCmdQueue->NumberOfRecoveryNodes = 0;
185 pRecoveryNode = &pCmdQueue->RecoveryQueue[pCmdQueue->NumberOfRecoveryNodes];
186 for(CurrentCmdindex = 0 ; CurrentCmdindex < pCmdQueue->NumberOfCommandInQueue ; CurrentCmdindex++)
188 pHead = &pCmdQueue->CmdQueue[first];
195 pCmdQueue->NumberOfRecoveryNodes++;
196 pRecoveryNode = &pCmdQueue->RecoveryQueue[pCmdQueue->NumberOfRecoveryNodes];
206 pCmdQueue->Head = 0;
207 pCmdQueue->Tail = 0;
208 pCmdQueue->NumberOfCommandInQueue = 0;
226 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
231 for(Cbindex = 0; Cbindex < pCmdQueue->NumberOfRecoveryNodes; Cbindex++)
233 pHead = &pCmdQueue->RecoveryQueue[Cbindex];
245 pCmdQueue->NumberOfRecoveryNodes = 0;
260 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
264 WLAN_REPORT_ERROR(pCmdQueue->hReport, HAL_CTRL_MODULE_LOG, ("CmdQueue_RegisterCmdCompleteGenericCB: NULL parameter\n"));
268 pCmdQueue->CmdCompleteGenericCB_Func = (CmdQueue_GenericCB_t)CB_Func;
269 pCmdQueue->CmdCompleteGenericCB_Arg = CB_handle;
284 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
288 WLAN_REPORT_ERROR(pCmdQueue->hReport, HAL_CTRL_MODULE_LOG, ("CmdQueue_RegisterForErrorCB: NULL parameters\n"));
292 pCmdQueue->FailureCbHandle = CB_handle;
293 pCmdQueue->FailureCB = (CmdQueue_CB_t)CB_Func;
312 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
314 CHECK_ERROR_FLAG(pCmdQueue->ErrorFlag);
316 status = CmdQueue_Push(pCmdQueue, CMD_CONFIGURE,
339 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
341 CHECK_ERROR_FLAG(pCmdQueue->ErrorFlag);
343 status = CmdQueue_Push(pCmdQueue, CMD_CONFIGURE,
371 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
374 CHECK_ERROR_FLAG(pCmdQueue->ErrorFlag);
376 status = CmdQueue_Push(pCmdQueue, CMD_INTERROGATE,
386 WLAN_REPORT_ERROR(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
410 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
413 CHECK_ERROR_FLAG(pCmdQueue->ErrorFlag);
417 WLAN_REPORT_ERROR(pCmdQueue->hReport, HAL_CTRL_MODULE_LOG,
422 status = CmdQueue_Push(pCmdQueue, CMD_INTERROGATE,
442 CmdQueue_T* pCmdQueue = (CmdQueue_T*) hCmdQueue;
445 CHECK_ERROR_FLAG(pCmdQueue->ErrorFlag);
447 status = CmdQueue_Push(pCmdQueue, MboxCmdType,
468 CmdQueue_T* pCmdQueue = (CmdQueue_T*)hCmdQueue;
471 CHECK_ERROR_FLAG(pCmdQueue->ErrorFlag);
475 WLAN_REPORT_ERROR(pCmdQueue->hReport, HAL_CTRL_MODULE_LOG,
480 pCmdQueue, MboxCmdType,
499 int CmdQueue_Push(CmdQueue_T *pCmdQueue, Command_e cmdType,
509 if(pCmdQueue->NumberOfCommandInQueue == CMDQUEUE_QUEUE_DEPTH)
511 WLAN_REPORT_ERROR(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
521 pCmdQueue->CmdQueue[pCmdQueue->Tail].cmdType = cmdType;
522 pCmdQueue->CmdQueue[pCmdQueue->Tail].paramsLen = paramsLen;
523 pCmdQueue->CmdQueue[pCmdQueue->Tail].CB_Func = CB_Func;
524 pCmdQueue->CmdQueue[pCmdQueue->Tail].CB_Arg = CB_Arg;
527 os_memoryCopy(pCmdQueue->hOs, pCmdQueue->CmdQueue[pCmdQueue->Tail].paramsBuf, pParamsBuf, CMDQUEUE_INFO_ELEM_HEADER_LEN);
530 os_memoryCopy(pCmdQueue->hOs, pCmdQueue->CmdQueue[pCmdQueue->Tail].paramsBuf, pParamsBuf, paramsLen);
531 pCmdQueue->CmdQueue[pCmdQueue->Tail].interrogateParamsBuf = pCB_Buf;
534 pCmdQueue->Tail++;
535 if(pCmdQueue->Tail == CMDQUEUE_QUEUE_DEPTH)
536 pCmdQueue->Tail = 0;
539 pCmdQueue->NumberOfCommandInQueue++;
541 if(pCmdQueue->MaxNumberOfCommandInQueue < pCmdQueue->NumberOfCommandInQueue)
542 pCmdQueue->MaxNumberOfCommandInQueue = pCmdQueue->NumberOfCommandInQueue;
545 WLAN_REPORT_INFORMATION(pCmdQueue->hReport, CMDQUEUE_MODULE_LOG,
551 paramsLen, pCmdQueue->NumberOfCommandInQueue));
554 if (pCmdQueue->NumberOfCommandInQueue == 1)
556 return (CmdQueue_SM(pCmdQueue,CMDQUEUE_EVENT_RUN));
573 int CmdQueue_SM(CmdQueue_T* pCmdQueue,CmdQueue_SMEvents_e event)
582 WLAN_REPORT_INFORMATION(pCmdQueue->hReport, CMDQUEUE_MODULE_LOG,
584 StateString[pCmdQueue->State],
585 pCmdQueue->State,
589 switch(pCmdQueue->State)
598 pCmdQueue->State = CMDQUEUE_STATE_SEND_CMD_v;
601 WLAN_REPORT_ERROR(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
611 pHead = &pCmdQueue->CmdQueue[pCmdQueue->Head];
613 WLAN_REPORT_INFORMATION(pCmdQueue->hReport, CMDQUEUE_MODULE_LOG,
618 pHead->paramsLen, pCmdQueue->NumberOfCommandInQueue));
621 pCmdQueue->CmdSendCounter++;
623 pCmdQueue->State = CMDQUEUE_STATE_INTERROGATE_v;
627 rc = CmdMBox_SendCmd(pCmdQueue->hCmdMBox,
632 rc = CmdMBox_SendCmd(pCmdQueue->hCmdMBox,
639 if(pCmdQueue->SM_RC)
641 rc = pCmdQueue->SM_RC;
643 pCmdQueue->State = CMDQUEUE_STATE_WAIT_SEND_CMPLT;
660 pCmdQueue->CmdCompltCounter++;
662 pCmdQueue->State = CMDQUEUE_STATE_INTERROGATE_v;
665 WLAN_REPORT_ERROR(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
675 pHead = &pCmdQueue->CmdQueue[pCmdQueue->Head];
676 rc = CmdMBox_GetResult(pCmdQueue->hCmdMBox,
680 pCmdQueue->State = CMDQUEUE_STATE_WAIT_RESULT;
687 pCmdQueue->ErrorFlag = TRUE;
690 pCmdQueue->State = CMDQUEUE_STATE_FINISH_v;
702 pCmdQueue->State = CMDQUEUE_STATE_FINISH_v;
705 WLAN_REPORT_ERROR(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
720 pHead = &pCmdQueue->CmdQueue[pCmdQueue->Head];
733 pCmdQueue->Head ++;
734 if (pCmdQueue->Head >= CMDQUEUE_QUEUE_DEPTH)
735 pCmdQueue->Head = 0;
736 pCmdQueue->NumberOfCommandInQueue --;
739 if (pCmdQueue->NumberOfCommandInQueue > 0)
741 pCmdQueue->SM_RC = rc;
742 pCmdQueue->State = CMDQUEUE_STATE_SEND_CMD_v;
746 pCmdQueue->SM_RC = 0;
747 pCmdQueue->State = CMDQUEUE_STATE_IDLE;
755 status = CmdMBox_GetStatus(pCmdQueue->hCmdMBox);
770 if (pCmdQueue->CmdCompleteGenericCB_Func)
772 pCmdQueue->CmdCompleteGenericCB_Func (pCmdQueue->CmdCompleteGenericCB_Arg,
782 WLAN_REPORT_ERROR(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
783 ("CmdQueue_SM: ** ERROR ** No such state (%d)\n",pCmdQueue->State));
787 WLAN_REPORT_INFORMATION(pCmdQueue->hReport, CMDQUEUE_MODULE_LOG,
803 CmdQueue_T* pCmdQueue = (CmdQueue_T*)hCmdQueue;
806 return CmdQueue_SM(pCmdQueue,CMDQUEUE_EVENT_SEND_CMPLT);
820 CmdQueue_T* pCmdQueue = (CmdQueue_T*)hCmdQueue;
823 return CmdQueue_SM(pCmdQueue,CMDQUEUE_EVENT_RESULT_RECEIVED);
838 CmdQueue_T* pCmdQueue = (CmdQueue_T*)hCmdQueue;
841 CmdQueue_CmdNode_T* pHead = &pCmdQueue->CmdQueue[pCmdQueue->Head];
842 UINT32 TimeStamp = os_timeStampMs(pCmdQueue->hOs);
844 WLAN_REPORT_ERROR(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
852 pCmdQueue->NumberOfCommandInQueue,
857 CmdQueue_PrintHistory(pCmdQueue, CMDQUEUE_HISTORY_DEPTH);
861 if(pCmdQueue->FailureCB)
863 pCmdQueue->FailureCB(pCmdQueue->FailureCbHandle,NOK);
882 CmdQueue_T* pCmdQueue = (CmdQueue_T*)hCmdQueue;
884 WLAN_REPORT_REPLY(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
887 WLAN_REPORT_REPLY(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
889 pCmdQueue->MaxNumberOfCommandInQueue));
890 WLAN_REPORT_REPLY(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
892 pCmdQueue->NumberOfCommandInQueue));
894 WLAN_REPORT_REPLY(pCmdQueue->hReport, CMD_MBOX_MODULE_LOG,
896 pCmdQueue->CmdSendCounter));
897 WLAN_REPORT_REPLY(pCmdQueue
899 pCmdQueue->CmdCompltCounter));
902 CmdQueue_PrintQueue(pCmdQueue);
916 void CmdQueue_PrintQueue(CmdQueue_T *pCmdQueue)
919 int first = pCmdQueue->Head;
921 int NumberOfCommand = pCmdQueue->NumberOfCommandInQueue;
927 pHead = &pCmdQueue->CmdQueue[first];
961 CmdQueue_T* pCmdQueue = (CmdQueue_T*)hCmdQueue;
963 int first = pCmdQueue->Head;
970 pHead = &pCmdQueue->CmdQueue[first];
1012 CmdQueue_T* pCmdQueue = (CmdQueue_T*)hCmdQueue;
1014 return (pCmdQueue->MaxNumberOfCommandInQueue);