本文整理汇总了C++中RTMPCancelTimer函数的典型用法代码示例。如果您正苦于以下问题:C++ RTMPCancelTimer函数的具体用法?C++ RTMPCancelTimer怎么用?C++ RTMPCancelTimer使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RTMPCancelTimer函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ApCliMlmeProbeReqAction
/*
==========================================================================
Description:
MLME PROBE req state machine procedure
==========================================================================
*/
static VOID ApCliMlmeProbeReqAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
BOOLEAN Cancelled;
APCLI_MLME_JOIN_REQ_STRUCT *Info = (APCLI_MLME_JOIN_REQ_STRUCT *)(Elem->Msg);
USHORT ifIndex = (USHORT)(Elem->Priv);
PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].SyncCurrState;
DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - ApCliMlmeProbeReqAction(Ssid %s)\n", Info->Ssid));
/* reset all the timers */
RTMPCancelTimer(&pAd->ApCliMlmeAux.ProbeTimer, &Cancelled);
pAd->ApCliMlmeAux.Rssi = -9999;
pAd->ApCliMlmeAux.Channel = pAd->CommonCfg.Channel;
pAd->ApCliMlmeAux.SupRateLen = pAd->CommonCfg.SupRateLen;
NdisMoveMemory(pAd->ApCliMlmeAux.SupRate, pAd->CommonCfg.SupRate, pAd->CommonCfg.SupRateLen);
/* Prepare the default value for extended rate */
pAd->ApCliMlmeAux.ExtRateLen = pAd->CommonCfg.ExtRateLen;
NdisMoveMemory(pAd->ApCliMlmeAux.ExtRate, pAd->CommonCfg.ExtRate, pAd->CommonCfg.ExtRateLen);
RTMPSetTimer(&pAd->ApCliMlmeAux.ProbeTimer, PROBE_TIMEOUT);
ApCliEnqueueProbeRequest(pAd, Info->SsidLen, (PCHAR) Info->Ssid, ifIndex);
DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - Start Probe the SSID %s on channel =%d\n", pAd->ApCliMlmeAux.Ssid, pAd->ApCliMlmeAux.Channel));
*pCurrState = APCLI_JOIN_WAIT_PROBE_RSP;
return;
}
示例2: RT28xxUsbStaAsicForceWakeup
VOID RT28xxUsbStaAsicForceWakeup(
IN PRTMP_ADAPTER pAd,
IN BOOLEAN bFromTx)
{
BOOLEAN Canceled;
if (pAd->Mlme.AutoWakeupTimerRunning)
{
if ( !OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE) )
{
return;
}
RTMPCancelTimer(&pAd->Mlme.AutoWakeupTimer, &Canceled);
pAd->Mlme.AutoWakeupTimerRunning = FALSE;
}
#ifdef MT7601
if ( IS_MT7601(pAd) )
{
ASIC_RADIO_ON(pAd, DOT11_RADIO_ON);
}
else
#endif /* MT7601 */
{
AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02, FALSE);
}
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_DOZE);
}
示例3: P2pPeerGoNegoReqAction
VOID P2pPeerGoNegoReqAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
if (pAd->P2pCfg.GoFormCurrentState != P2P_GO_FORM_IDLE && pAd->P2pCfg.GoFormCurrentState != P2P_WAIT_GO_FORM_CONF )
return;
P2P_GO_FORM_STATE *pCurrState = &(pAd->P2pCfg.GoFormCurrentState);
PRT_P2P_CONFIG pP2PCtrl = &pAd->P2pCfg;
if ( pP2PCtrl->bProvAutoRsp == FALSE )
{
BOOLEAN Cancelled;
if (pP2PCtrl->bP2pReSendTimerRunning)
{
pP2PCtrl->bP2pReSendTimerRunning = FALSE;
pAd->P2pTable.Client[pP2PCtrl->P2pProvIndex].ReTransmitCnt = 0;
RTMPCancelTimer(&pP2PCtrl->P2pReSendTimer, &Cancelled);
}
pP2PCtrl->P2pProvIndex = P2P_NOT_FOUND;
pP2PCtrl->P2pProvUserNotify = FALSE;
pAd->P2pCfg.P2pCounter.UserAccept = 0;
}
/*
Skip auto scan conn in STAMlmePeriodicExec
*/
pAd->StaCfg.bSkipAutoScanConn = TRUE;
P2pReceGoNegoReqAction(pAd, Elem);
*pCurrState = P2P_WAIT_GO_FORM_CONF;
}
示例4: P2PDiscScanAction
/* Device Discovery Action */
static VOID P2PDiscScanAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
P2P_DISC_STATE *pCurrState = &(pAd->P2pCfg.DiscCurrentState);
PRT_P2P_CONFIG pP2PCtrl = &pAd->P2pCfg;
MLME_SCAN_REQ_STRUCT ScanReq;
BOOLEAN Cancelled;
DBGPRINT(RT_DEBUG_TRACE, ("%s::\n", __FUNCTION__));
/* If I just finish group formation as GO. don't do scan . If I am auto GO, I should support P2P scan too. So check GoIntentIdx != 16. */
if ((pP2PCtrl->P2PConnectState == P2P_ANY_IN_FORMATION_AS_GO) && (pP2PCtrl->GoIntentIdx <= 15))
{
pP2PCtrl->P2pCounter.Counter100ms = 0;
}
/* Stop Scan and resume */
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
{
/*pAd->StaCfg.bSkipAutoScanConn = TRUE;*/
RTMPCancelTimer(&pAd->MlmeAux.ScanTimer, &Cancelled);
pAd->MlmeAux.Channel = 0;
ScanNextChannel(pAd, OPMODE_STA);
}
/* Scan Type is SCAN_P2P for SYNC State Machine */
ScanParmFill(pAd, &ScanReq, "", 0, BSS_ANY, SCAN_P2P);
MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_SCAN_REQ,
sizeof(MLME_SCAN_REQ_STRUCT), &ScanReq, 0);
pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_LIST_SCAN;
*pCurrState = P2P_DISC_SCAN;
/* pAd->StaCfg.bSkipAutoScanConn = FALSE;*/
}
示例5: MeshPeerUcgWhenActivated
static VOID
MeshPeerUcgWhenActivated(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
MESH_CTRL_STATE *pCurrState = &(pAd->MeshTab.CtrlCurrentState);
BOOLEAN Cancelled;
PMESH_CH_SW_ANN_MSG_STRUCT pInfo = (PMESH_CH_SW_ANN_MSG_STRUCT)(Elem->Msg);
UINT32 NewCPI = pInfo->NewCPI;
PUCHAR pMeshSA = pInfo->MeshSA;
DBGPRINT(RT_DEBUG_TRACE, ("%s: Get UCG evt when Activated.\n", __FUNCTION__));
if ((NewCPI < pAd->MeshTab.CPI)
|| ((NewCPI == pAd->MeshTab.CPI) && (memcmp(pAd->MeshTab.CurrentAddress, pMeshSA, MAC_ADDR_LEN) >= 0))
)
{
return;
}
RTMPCancelTimer(&pAd->MeshTab.PldTimer, &Cancelled);
MeshPeerUcgWhenUcg(pAd, Elem);
*pCurrState = MESH_CTRL_UCG;
return;
}
示例6: PeerAuthRspAtSeq4Action
void PeerAuthRspAtSeq4Action(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem)
{
u8 Addr2[MAC_ADDR_LEN];
u16 Alg, Seq, Status;
char ChlgText[CIPHER_TEXT_LEN];
BOOLEAN TimerCancelled;
if (PeerAuthSanity
(pAd, Elem->Msg, Elem->MsgLen, Addr2, &Alg, &Seq, &Status,
ChlgText)) {
if (MAC_ADDR_EQUAL(pAd->MlmeAux.Bssid, Addr2) && Seq == 4) {
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Receive AUTH_RSP seq#4 to me\n"));
RTMPCancelTimer(&pAd->MlmeAux.AuthTimer,
&TimerCancelled);
if (Status != MLME_SUCCESS) {
pAd->StaCfg.AuthFailReason = Status;
COPY_MAC_ADDR(pAd->StaCfg.AuthFailSta, Addr2);
}
pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_AUTH_CONF,
2, &Status);
}
} else {
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - PeerAuthRspAtSeq4Action() sanity check fail\n"));
}
}
示例7: PeerReassocRspAction
/*
==========================================================================
Description:
peer sends reassoc rsp
Parametrs:
Elem - MLME message cntaining the received frame
==========================================================================
*/
VOID PeerReassocRspAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
USHORT CapabilityInfo;
USHORT Status;
USHORT Aid;
UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES], SupRateLen;
UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES], ExtRateLen;
UCHAR Addr2[MAC_ADDR_LEN];
EDCA_PARM EdcaParm;
BOOLEAN TimerCancelled;
#ifdef RALINK_WPA_SUPPLICANT_SUPPORT
union iwreq_data wrqu;
#endif
if(PeerAssocRspSanity(pAd, Elem->Msg, Elem->MsgLen, Addr2, &CapabilityInfo, &Status, &Aid, SupRate, &SupRateLen, ExtRate, &ExtRateLen, &EdcaParm))
{
if(MAC_ADDR_EQUAL(Addr2, pAd->MlmeAux.Bssid)) // The frame is for me ?
{
DBGPRINT(RT_DEBUG_TRACE, "ASSOC - receive REASSOC_RSP to me (status=%d)\n", Status);
RTMPCancelTimer(&pAd->MlmeAux.ReassocTimer,&TimerCancelled);
if(Status == MLME_SUCCESS)
{
// go to procedure listed on page 376
AssocPostProc(pAd, Addr2, CapabilityInfo, Aid, SupRate, SupRateLen, ExtRate, ExtRateLen, &EdcaParm);
#ifdef RALINK_WPA_SUPPLICANT_SUPPORT
if (pAd->PortCfg.WPA_Supplicant == TRUE)
{
//collect associate info
link_status_handler(pAd);
//send associnfo event to wpa_supplicant
memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.flags = RT_ASSOC_EVENT_FLAG;
wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
}
DBGPRINT(RT_DEBUG_OFF, "ASSOC - receive REASSOC_RSP to me (status=%d)\n", Status);
#endif
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
if (pAd->PortCfg.bNativeWpa == TRUE) // add by johnli
wext_notify_event_assoc(pAd, SIOCGIWAP, TRUE);
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT
}
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_REASSOC_CONF, 2, &Status);
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE, "ASSOC - PeerReassocRspAction() sanity check fail\n");
}
}
示例8: PMF_PeerSAQueryRspAction
VOID PMF_PeerSAQueryRspAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
UCHAR Action = Elem->Msg[LENGTH_802_11+1];
if (Action == ACTION_SAQ_RESPONSE)
{
PMAC_TABLE_ENTRY pEntry;
PFRAME_802_11 pHeader;
USHORT TransactionID;
BOOLEAN Cancelled;
DBGPRINT(RT_DEBUG_ERROR, ("[PMF]%s : Receive SA Query Response\n", __FUNCTION__));
pHeader = (PFRAME_802_11) Elem->Msg;
#ifdef CONFIG_AP_SUPPORT
pEntry = MacTableLookup(pAd, pHeader->Hdr.Addr2);
#endif /* CONFIG_AP_SUPPORT */
if (!pEntry)
{
DBGPRINT(RT_DEBUG_ERROR, ("[PMF]%s : Entry is not found, STA(%02x:%02x:%02x:%02x:%02x:%02x)\n", __FUNCTION__, PRINT_MAC(pHeader->Hdr.Addr2)));
return;
}
if (!(CLIENT_STATUS_TEST_FLAG(pEntry, fCLIENT_STATUS_PMF_CAPABLE)))
{
DBGPRINT(RT_DEBUG_ERROR, ("[PMF]%s : Entry is not PMF capable, STA(%02x:%02x:%02x:%02x:%02x:%02x)\n", __FUNCTION__, PRINT_MAC(pHeader->Hdr.Addr2)));
return;
}
NdisMoveMemory(&TransactionID, &Elem->Msg[LENGTH_802_11+2], sizeof(USHORT));
if (pEntry->TransactionID == TransactionID)
{
pEntry->SAQueryStatus = SAQ_IDLE;
RTMPCancelTimer(&pEntry->SAQueryTimer, &Cancelled);
RTMPCancelTimer(&pEntry->SAQueryConfirmTimer, &Cancelled);
DBGPRINT(RT_DEBUG_ERROR, ("[PMF]%s - Compare TransactionID correctly, STA(%02x:%02x:%02x:%02x:%02x:%02x)\n", __FUNCTION__, PRINT_MAC(pHeader->Hdr.Addr2)));
}
else
{
DBGPRINT(RT_DEBUG_ERROR, ("[PMF]%s - Compare TransactionID wrong, STA(%02x:%02x:%02x:%02x:%02x:%02x)\n", __FUNCTION__, PRINT_MAC(pHeader->Hdr.Addr2)));
}
}
}
示例9: ApCliPeerAssocRspAction
/*
==========================================================================
Description:
peer sends assoc rsp back
Parameters:
Elme - MLME message containing the received frame
==========================================================================
*/
static VOID ApCliPeerAssocRspAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
BOOLEAN Cancelled;
USHORT CapabilityInfo, Status, Aid;
UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES], SupRateLen;
UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES], ExtRateLen;
UCHAR Addr2[MAC_ADDR_LEN];
EDCA_PARM EdcaParm;
UCHAR CkipFlag;
APCLI_CTRL_MSG_STRUCT ApCliCtrlMsg;
HT_CAPABILITY_IE HtCapability;
ADD_HT_INFO_IE AddHtInfo; /* AP might use this additional ht info IE */
UCHAR HtCapabilityLen;
UCHAR AddHtInfoLen;
UCHAR NewExtChannelOffset = 0xff;
USHORT ifIndex = (USHORT)(Elem->Priv);
PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].AssocCurrState;
if (ApCliPeerAssocRspSanity(pAd, Elem->Msg, Elem->MsgLen, Addr2, &CapabilityInfo, &Status, &Aid, SupRate, &SupRateLen, ExtRate, &ExtRateLen,
&HtCapability, &AddHtInfo, &HtCapabilityLen,&AddHtInfoLen,&NewExtChannelOffset, &EdcaParm, &CkipFlag))
{
/* The frame is for me ? */
if(MAC_ADDR_EQUAL(Addr2, pAd->ApCliMlmeAux.Bssid))
{
DBGPRINT(RT_DEBUG_TRACE, ("APCLI_ASSOC - receive ASSOC_RSP to me (status=%d)\n", Status));
RTMPCancelTimer(&pAd->ApCliMlmeAux.ApCliAssocTimer, &Cancelled);
if(Status == MLME_SUCCESS)
{
/* go to procedure listed on page 376 */
ApCliAssocPostProc(pAd, Addr2, CapabilityInfo, ifIndex, SupRate, SupRateLen,
ExtRate, ExtRateLen, &EdcaParm, &HtCapability, HtCapabilityLen, &AddHtInfo);
ApCliCtrlMsg.Status = MLME_SUCCESS;
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_ASSOC_RSP,
sizeof(APCLI_CTRL_MSG_STRUCT), &ApCliCtrlMsg, ifIndex);
}
else
{
ApCliCtrlMsg.Status = Status;
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_ASSOC_RSP,
sizeof(APCLI_CTRL_MSG_STRUCT), &ApCliCtrlMsg, ifIndex);
}
*pCurrState = APCLI_ASSOC_IDLE;
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE, ("APCLI_ASSOC - ApCliPeerAssocRspAction() sanity check fail\n"));
}
return;
}
示例10: mac_entry_reset
static INT mac_entry_reset(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry, BOOLEAN clean)
{
BOOLEAN Cancelled;
RTMPCancelTimer(&pEntry->RetryTimer, &Cancelled);
RTMPCancelTimer(&pEntry->EnqueueStartForPSKTimer, &Cancelled);
NdisZeroMemory(pEntry, sizeof(MAC_TABLE_ENTRY));
if (clean == TRUE)
{
pEntry->MaxSupportedRate = RATE_11;
pEntry->CurrTxRate = RATE_11;
NdisZeroMemory(pEntry, sizeof(MAC_TABLE_ENTRY));
pEntry->PairwiseKey.KeyLen = 0;
pEntry->PairwiseKey.CipherAlg = CIPHER_NONE;
}
return 0;
}
示例11: RT28xxUsbStaAsicForceWakeup
void RT28xxUsbStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx)
{
BOOLEAN Canceled;
if (pAd->Mlme.AutoWakeupTimerRunning)
RTMPCancelTimer(&pAd->Mlme.AutoWakeupTimer, &Canceled);
AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02);
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_DOZE);
}
示例12: RTMPIdsStop
VOID RTMPIdsStop(
IN PRTMP_ADAPTER pAd)
{
BOOLEAN Cancelled;
if (pAd->ApCfg.IDSTimerRunning == TRUE)
{
RTMPCancelTimer(&pAd->ApCfg.IDSTimer, &Cancelled);
pAd->ApCfg.IDSTimerRunning = FALSE;
}
}
示例13: ApCliMlmeProbeReqAction
/*
==========================================================================
Description:
MLME PROBE req state machine procedure
==========================================================================
*/
static VOID ApCliMlmeProbeReqAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
BOOLEAN Cancelled;
APCLI_MLME_JOIN_REQ_STRUCT *Info = (APCLI_MLME_JOIN_REQ_STRUCT *)(Elem->Msg);
USHORT ifIndex = (USHORT)(Elem->Priv);
PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].SyncCurrState;
PAPCLI_STRUCT pApCliEntry = NULL;
DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - ApCliMlmeProbeReqAction(Ssid %s), ifIndex = %d\n", Info->Ssid, ifIndex));
if (ifIndex >= MAX_APCLI_NUM)
return;
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex];
/* reset all the timers */
RTMPCancelTimer(&(pApCliEntry->ApCliMlmeAux.ProbeTimer), &Cancelled);
pApCliEntry->ApCliMlmeAux.Rssi = -9999;
#ifdef APCLI_CONNECTION_TRIAL
if (pApCliEntry->TrialCh ==0)
#endif
pApCliEntry->ApCliMlmeAux.Channel = pAd->CommonCfg.Channel;
#ifdef APCLI_CONNECTION_TRIAL
else
pApCliEntry->ApCliMlmeAux.Channel = pApCliEntry->TrialCh;
#endif
pApCliEntry->ApCliMlmeAux.SupRateLen = pAd->CommonCfg.SupRateLen;
NdisMoveMemory(pApCliEntry->ApCliMlmeAux.SupRate, pAd->CommonCfg.SupRate, pAd->CommonCfg.SupRateLen);
/* Prepare the default value for extended rate */
pApCliEntry->ApCliMlmeAux.ExtRateLen = pAd->CommonCfg.ExtRateLen;
NdisMoveMemory(pApCliEntry->ApCliMlmeAux.ExtRate, pAd->CommonCfg.ExtRate, pAd->CommonCfg.ExtRateLen);
RTMPSetTimer(&(pApCliEntry->ApCliMlmeAux.ProbeTimer), PROBE_TIMEOUT);
#ifdef APCLI_CONNECTION_TRIAL
NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Bssid, MAC_ADDR_LEN);
NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Ssid, MAX_LEN_OF_SSID);
NdisCopyMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Bssid, pAd->ApCfg.ApCliTab[ifIndex].CfgApCliBssid, MAC_ADDR_LEN);
NdisCopyMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Ssid, pAd->ApCfg.ApCliTab[ifIndex].CfgSsid, pAd->ApCfg.ApCliTab[ifIndex].CfgSsidLen);
#endif
ApCliEnqueueProbeRequest(pAd, Info->SsidLen, (PCHAR) Info->Ssid, ifIndex);
DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - Start Probe the SSID %s on channel =%d\n", pApCliEntry->ApCliMlmeAux.Ssid, pApCliEntry->ApCliMlmeAux.Channel));
*pCurrState = APCLI_JOIN_WAIT_PROBE_RSP;
return;
}
示例14: RT28xxUsbStaAsicForceWakeup
VOID RT28xxUsbStaAsicForceWakeup(
IN PRTMP_ADAPTER pAd,
IN BOOLEAN bFromTx)
{
BOOLEAN Canceled;
if (pAd->Mlme.AutoWakeupTimerRunning)
RTMPCancelTimer(&pAd->Mlme.AutoWakeupTimer, &Canceled);
AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02);
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_DOZE);
}
示例15: RTUSBHalt
VOID RTUSBHalt(
IN PRTMP_ADAPTER pAd,
IN BOOLEAN IsFree)
{
BOOLEAN TimerCancelled;
DBGPRINT(RT_DEBUG_TRACE, "====> RTUSBHalt\n");
//
// before set flag fRTMP_ADAPTER_HALT_IN_PROGRESS,
// we should send a disassoc frame to our AP.
//
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS);
RTUSBCleanUpMLMEWaitQueue(pAd);
RTUSBCleanUpMLMEBulkOutQueue(pAd);
RTMPCancelTimer(&pAd->PortCfg.QuickResponeForRateUpTimer,&TimerCancelled);
RTMPCancelTimer(&pAd->RxAnt.RxAntDiversityTimer,&TimerCancelled);
// Free MLME stuff
MlmeHalt(pAd);
// Sleep 50 milliseconds so pending io might finish normally
RTMPusecDelay(50000);
// We want to wait until all pending receives and sends to the
// device object. We cancel any
// irps. Wait until sends and receives have stopped.
//
RTUSBCancelPendingIRPs(pAd);
// Free the entire adapter object
ReleaseAdapter(pAd, IsFree, FALSE);
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS);
}