eHalStatus sme_remainOnChnRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg) { eHalStatus status = eHAL_STATUS_SUCCESS; tListElem *pEntry = NULL; tSmeCmd *pCommand = NULL; tANI_BOOLEAN fFound; tSirSmeRsp *pRsp = (tSirSmeRsp *)pMsg; if (pMac->fP2pListenOffload) pEntry = csrLLPeekHead(&pMac->sme.smeScanCmdActiveList, LL_ACCESS_LOCK); else pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK); if( pEntry ) { pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); if( eSmeCommandRemainOnChannel == pCommand->command ) { remainOnChanCallback callback = pCommand->u.remainChlCmd.callback; /* process the msg */ if( callback ) callback(pMac, pCommand->u.remainChlCmd.callbackCtx, pRsp->statusCode); if (pMac->fP2pListenOffload) { fFound = csrLLRemoveEntry( &pMac->sme.smeScanCmdActiveList, pEntry, LL_ACCESS_LOCK); } else { fFound = csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK); } if (fFound) { /* Now put this command back on the available command list */ smeReleaseCommand(pMac, pCommand); } smeProcessPendingQueue( pMac ); } } return status; }
/* * Delete TDLD peer info, called from TDLS teardown request. */ static eHalStatus tdlsDeleteTdlsPeerInfo(tpAniSirGlobal pMac, tSirMacAddr peerMac) { tCsrTdlsCtxStruct *disInfo = &pMac->tdlsCtx ; tCsrTdlsPeerLinkinfo *peerInfo = findTdlsPeer(pMac, &disInfo->tdlsPotentialPeerList, peerMac) ; eHalStatus status = eHAL_STATUS_FAILURE ; if((csrLLRemoveEntry(&disInfo->tdlsPotentialPeerList, &peerInfo->tdlsPeerStaLink, LL_ACCESS_NOLOCK))) { status = palFreeMemory(pMac->hHdd, (void *)peerInfo) ; } return status ; }
/* --------------------------------------------------------------------------- \fn oemData_ReleaseOemDataReqCommand \brief This function removes the oemDataCommand from the active list and and frees up any memory occupied by this \return eHalStatus -------------------------------------------------------------------------------*/ void oemData_ReleaseOemDataReqCommand(tpAniSirGlobal pMac, tSmeCmd *pOemDataCmd, eOemDataReqStatus oemDataReqStatus) { //Do the callback pOemDataCmd->u.oemDataCmd.callback(pMac, pOemDataCmd->u.oemDataCmd.pContext, pOemDataCmd->u.oemDataCmd.oemDataReqID, oemDataReqStatus); //First take this command out of the active list if(csrLLRemoveEntry(&pMac->sme.smeCmdActiveList, &pOemDataCmd->Link, LL_ACCESS_LOCK)) { vos_mem_set(&(pOemDataCmd->u.oemDataCmd), sizeof(tOemDataCmd), 0); //Now put this command back on the avilable command list smeReleaseCommand(pMac, pOemDataCmd); } else { smsLog(pMac, LOGE, "OEM_DATA: **************** oemData_ReleaseOemDataReqCommand cannot release the command"); } }
/* * common routine to remove TDLS cmd from SME command list.. * commands are removed after getting reponse from PE. */ eHalStatus csrTdlsRemoveSmeCmd(tpAniSirGlobal pMac, eSmeCommandType cmdType) { eHalStatus status = eHAL_STATUS_FAILURE; tListElem *pEntry; tSmeCmd *pCommand; pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK); if( pEntry ) { pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); if( cmdType == pCommand->command ) { if( csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK ) ) { vos_mem_zero( &pCommand->u.tdlsCmd, sizeof( tTdlsCmd ) ); csrReleaseCommand( pMac, pCommand ); smeProcessPendingQueue( pMac ); status = eHAL_STATUS_SUCCESS ; } } } return status ; }
/** * csr_release_roc_req_cmd() - Release the command * @mac_ctx: Global MAC Context * * Release the remain on channel request command from the queue * * Return: None */ void csr_release_roc_req_cmd(tpAniSirGlobal mac_ctx) { tListElem *entry = NULL; tSmeCmd *cmd = NULL; entry = csrLLPeekHead(&mac_ctx->sme.smeCmdActiveList, LL_ACCESS_LOCK); if (entry) { cmd = GET_BASE_ADDR(entry, tSmeCmd, Link); if (eSmeCommandRemainOnChannel == cmd->command) { remainOnChanCallback callback = cmd->u.remainChlCmd.callback; /* process the msg */ if (callback) callback(mac_ctx, cmd->u.remainChlCmd.callbackCtx, 0); smsLog(mac_ctx, LOGE, FL("Remove RoC Request from Active Cmd List")); /* Now put this cmd back on the avilable command list */ if (csrLLRemoveEntry(&mac_ctx->sme.smeCmdActiveList, entry, LL_ACCESS_LOCK)) smeReleaseCommand(mac_ctx, cmd); } } }