本文整理汇总了C++中RTMPZeroMemory函数的典型用法代码示例。如果您正苦于以下问题:C++ RTMPZeroMemory函数的具体用法?C++ RTMPZeroMemory怎么用?C++ RTMPZeroMemory使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RTMPZeroMemory函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RTMPUpdateHTIE
/*
========================================================================
Routine Description:
Update HT IE from our capability.
Arguments:
Send all HT IE in beacon/probe rsp/assoc rsp/action frame.
========================================================================
*/
VOID RTMPUpdateHTIE(
IN RT_HT_CAPABILITY *pRtHt,
IN UCHAR *pMcsSet,
OUT HT_CAPABILITY_IE *pHtCapability,
OUT ADD_HT_INFO_IE *pAddHtInfo)
{
RTMPZeroMemory(pHtCapability, sizeof(HT_CAPABILITY_IE));
RTMPZeroMemory(pAddHtInfo, sizeof(ADD_HT_INFO_IE));
pHtCapability->HtCapInfo.ChannelWidth = pRtHt->ChannelWidth;
pHtCapability->HtCapInfo.MimoPs = pRtHt->MimoPs;
pHtCapability->HtCapInfo.GF = pRtHt->GF;
pHtCapability->HtCapInfo.ShortGIfor20 = pRtHt->ShortGIfor20;
pHtCapability->HtCapInfo.ShortGIfor40 = pRtHt->ShortGIfor40;
pHtCapability->HtCapInfo.TxSTBC = pRtHt->TxSTBC;
pHtCapability->HtCapInfo.RxSTBC = pRtHt->RxSTBC;
pHtCapability->HtCapInfo.AMsduSize = pRtHt->AmsduSize;
pHtCapability->HtCapParm.MaxRAmpduFactor = pRtHt->MaxRAmpduFactor;
pHtCapability->HtCapParm.MpduDensity = pRtHt->MpduDensity;
pAddHtInfo->AddHtInfo.ExtChanOffset = pRtHt->ExtChanOffset ;
pAddHtInfo->AddHtInfo.RecomWidth = pRtHt->RecomWidth;
pAddHtInfo->AddHtInfo2.OperaionMode = pRtHt->OperaionMode;
pAddHtInfo->AddHtInfo2.NonGfPresent = pRtHt->NonGfPresent;
RTMPMoveMemory(pAddHtInfo->MCSSet, /*pRtHt->MCSSet*/pMcsSet, 4); /* rt2860 only support MCS max=32, no need to copy all 16 uchar.*/
DBGPRINT(RT_DEBUG_TRACE,("RTMPUpdateHTIE <== \n"));
}
示例2: RTMPDisableDesiredHtInfo
/*
========================================================================
Routine Description:
Clear the desire HT info per interface
Arguments:
========================================================================
*/
VOID RTMPDisableDesiredHtInfo(struct rtmp_adapter *pAd)
{
struct rtmp_wifi_dev *wdev;
#ifdef CONFIG_AP_SUPPORT
UINT8 idx = 0;
IF_DEV_CONFIG_OPMODE_ON_AP(pAd)
{
for (idx = 0; idx < pAd->ApCfg.BssidNum; idx++)
{
wdev = &pAd->ApCfg.MBSSID[idx].wdev;
RTMPZeroMemory(&wdev->DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
}
#endif /* CONFIG_AP_SUPPORT */
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
RTMPZeroMemory(&pAd->StaCfg.wdev.DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
#endif /* CONFIG_STA_SUPPORT */
}
示例3: RTMPDisableDesiredHtInfo
/*
========================================================================
Routine Description:
Clear the desire HT info per interface
Arguments:
========================================================================
*/
VOID RTMPDisableDesiredHtInfo(
IN PRTMP_ADAPTER pAd)
{
#ifdef CONFIG_AP_SUPPORT
UINT8 apidx = 0;
#endif /* CONFIG_AP_SUPPORT */
#ifdef CONFIG_AP_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_AP(pAd)
{
for (apidx = 0; apidx < pAd->ApCfg.BssidNum; apidx++)
{
RTMPZeroMemory(&pAd->ApCfg.MBSSID[apidx].DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
#ifdef WDS_SUPPORT
for (apidx = 0; apidx < MAX_WDS_ENTRY; apidx++)
{
RTMPZeroMemory(&pAd->WdsTab.WdsEntry[apidx].DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
#endif /* WDS_SUPPORT */
#ifdef APCLI_SUPPORT
for (apidx = 0; apidx < MAX_APCLI_NUM; apidx++)
{
RTMPZeroMemory(&pAd->ApCfg.ApCliTab[apidx].DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
#endif /* APCLI_SUPPORT */
}
#endif /* CONFIG_AP_SUPPORT */
}
示例4: RTMPDisableDesiredHtInfo
/*
========================================================================
Routine Description:
Clear the desire HT info per interface
Arguments:
========================================================================
*/
VOID RTMPDisableDesiredHtInfo(RTMP_ADAPTER *pAd)
{
struct wifi_dev *wdev = NULL;
#ifdef CONFIG_AP_SUPPORT
UINT8 idx = 0;
IF_DEV_CONFIG_OPMODE_ON_AP(pAd)
{
for (idx = 0; idx < pAd->ApCfg.BssidNum; idx++)
{
wdev = &pAd->ApCfg.MBSSID[idx].wdev;
RTMPZeroMemory(&wdev->DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
#ifdef WDS_SUPPORT
for (idx = 0; idx < MAX_WDS_ENTRY; idx++)
{
RTMPZeroMemory(&pAd->WdsTab.WdsEntry[idx].wdev.DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
#endif /* WDS_SUPPORT */
#ifdef APCLI_SUPPORT
for (idx = 0; idx < MAX_APCLI_NUM; idx++)
{
RTMPZeroMemory(&pAd->ApCfg.ApCliTab[idx].wdev.DesiredHtPhyInfo, sizeof(RT_PHY_INFO));
}
#endif /* APCLI_SUPPORT */
}
#endif /* CONFIG_AP_SUPPORT */
}
示例5: ComposePsPoll
VOID ComposePsPoll(RTMP_ADAPTER *pAd)
{
TXINFO_STRUC *pTxInfo;
TXWI_STRUC *pTxWI;
UINT8 TXWISize = pAd->chipCap.TXWISize;
UCHAR *buf;
USHORT data_len;
DBGPRINT(RT_DEBUG_TRACE, ("ComposePsPoll\n"));
NdisZeroMemory(&pAd->PsPollFrame, sizeof (PSPOLL_FRAME));
pAd->PsPollFrame.FC.PwrMgmt = 0;
pAd->PsPollFrame.FC.Type = BTYPE_CNTL;
pAd->PsPollFrame.FC.SubType = SUBTYPE_PS_POLL;
pAd->PsPollFrame.Aid = pAd->StaActive.Aid | 0xC000;
COPY_MAC_ADDR(pAd->PsPollFrame.Bssid, pAd->CommonCfg.Bssid);
COPY_MAC_ADDR(pAd->PsPollFrame.Ta, pAd->CurrentAddress);
buf = &pAd->PsPollContext.TransferBuffer->field.WirelessPacket[0];
pTxInfo = (TXINFO_STRUC *)buf;
pTxWI = (TXWI_STRUC *)&buf[TXINFO_SIZE];
RTMPZeroMemory(buf, 100);
data_len = sizeof (PSPOLL_FRAME);
rlt_usb_write_txinfo(pAd, pTxInfo, data_len + TXWISize + TSO_SIZE, TRUE,
EpToQueue[MGMTPIPEIDX], FALSE, FALSE);
RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0,
BSSID_WCID, data_len, 0, 0,
(UCHAR) pAd->CommonCfg.MlmeTransmit.field.MCS,
IFS_BACKOFF, FALSE, &pAd->CommonCfg.MlmeTransmit);
RTMPMoveMemory((VOID *)&buf[TXWISize + TXINFO_SIZE + TSO_SIZE], (VOID *)&pAd->PsPollFrame, data_len);
/* Append 4 extra zero bytes. */
pAd->PsPollContext.BulkOutSize = TXINFO_SIZE + TXWISize + TSO_SIZE + data_len + 4;
}
示例6: ComposeNullFrame
/* IRQL = DISPATCH_LEVEL */
VOID ComposeNullFrame(RTMP_ADAPTER *pAd)
{
TXINFO_STRUC *pTxInfo;
TXWI_STRUC *pTxWI;
UCHAR *buf;
UINT8 TXWISize = pAd->chipCap.TXWISize;
USHORT data_len = sizeof(pAd->NullFrame);;
NdisZeroMemory(&pAd->NullFrame, data_len);
pAd->NullFrame.FC.Type = BTYPE_DATA;
pAd->NullFrame.FC.SubType = SUBTYPE_NULL_FUNC;
pAd->NullFrame.FC.ToDs = 1;
COPY_MAC_ADDR(pAd->NullFrame.Addr1, pAd->CommonCfg.Bssid);
COPY_MAC_ADDR(pAd->NullFrame.Addr2, pAd->CurrentAddress);
COPY_MAC_ADDR(pAd->NullFrame.Addr3, pAd->CommonCfg.Bssid);
buf = &pAd->NullContext.TransferBuffer->field.WirelessPacket[0];
RTMPZeroMemory(buf, 100);
pTxInfo = (TXINFO_STRUC *)buf;
pTxWI = (TXWI_STRUC *)&buf[TXINFO_SIZE];
rlt_usb_write_txinfo(pAd, pTxInfo,
(USHORT)(data_len + TXWISize + TSO_SIZE), TRUE,
EpToQueue[MGMTPIPEIDX], FALSE, FALSE);
RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0,
BSSID_WCID, data_len, 0, 0,
(UCHAR)pAd->CommonCfg.MlmeTransmit.field.MCS,
IFS_BACKOFF, FALSE, &pAd->CommonCfg.MlmeTransmit);
RTMPMoveMemory((VOID *)&buf[TXWISize + TXINFO_SIZE], (VOID *)&pAd->NullFrame, data_len);
pAd->NullContext.BulkOutSize = TXINFO_SIZE + TXWISize + TSO_SIZE + data_len + 4;
}
示例7: P2pPerstTabDelete
UCHAR P2pPerstTabDelete(
IN PRTMP_ADAPTER pAd,
IN UCHAR *pMacList)
{
PRT_P2P_TABLE Tab = &pAd->P2pTable;
UCHAR i;
for (i = 0; i < MAX_P2P_TABLE_SIZE; i++)
{
if (Tab->PerstEntry[i].bValid == TRUE)
{
if (NdisEqualMemory(Tab->PerstEntry[i].Addr, pMacList, 6))
{
RTMPZeroMemory(&Tab->PerstEntry[i], sizeof(RT_P2P_PERSISTENT_ENTRY));
Tab->PerstEntry[i].bValid = FALSE;
if (Tab->PerstNumber > 0)
{
Tab->PerstNumber--;
}
else
DBGPRINT(RT_DEBUG_ERROR, (" P2P - Persistent table count error. \n"));
DBGPRINT(RT_DEBUG_ERROR, (" P2P - Delete a Persistent Entry .Table Number = %d. \n", Tab->PerstNumber));
}
return i;
}
}
return 0xff;
}
示例8: P2pGroupTabInit
/*
==========================================================================
Description:
Init P2P Group Table.
Parameters:
Note:
==========================================================================
*/
VOID P2pGroupTabInit(
IN PRTMP_ADAPTER pAd)
{
PRT_P2P_TABLE Tab = &pAd->P2pTable;
UCHAR i;
DBGPRINT(RT_DEBUG_ERROR, ("P2pGroupTabInit . \n"));
for (i = 0; i < MAX_P2P_GROUP_SIZE; i++)
{
Tab->Client[i].P2pClientState = P2PSTATE_NONE;
Tab->Client[i].Rule = P2P_IS_CLIENT;
Tab->Client[i].DevCapability = 0;
Tab->Client[i].GroupCapability = 0;
RTMPZeroMemory(Tab->Client[i].addr, MAC_ADDR_LEN);
RTMPZeroMemory(Tab->Client[i].bssid, MAC_ADDR_LEN);
RTMPZeroMemory(Tab->Client[i].InterfaceAddr, MAC_ADDR_LEN);
RTMPZeroMemory(Tab->Client[i].Ssid, MAX_LEN_OF_SSID);
RTMPZeroMemory(Tab->Client[i].PrimaryDevType, P2P_DEVICE_TYPE_LEN);
RTMPZeroMemory(Tab->Client[i].SecondaryDevType, P2P_DEVICE_TYPE_LEN);
RTMPZeroMemory(Tab->Client[i].DeviceName, P2P_DEVICE_NAME_LEN);
Tab->Client[i].DeviceNameLen = 0;
Tab->Client[i].SsidLen = 0;
Tab->Client[i].GoIntent = 0;
Tab->Client[i].OpChannel = 0;
Tab->Client[i].ListenChannel = 0;
Tab->Client[i].ConfigMethod = 0;
Tab->Client[i].P2pClientState = P2PSTATE_NONE;
Tab->Client[i].StateCount = 0;
Tab->Client[i].bValid = FALSE;
}
Tab->ClientNumber = 0;
return;
}
示例9: ApCliSiteSurvey
VOID ApCliSiteSurvey(
IN RTMP_ADAPTER *pAd,
IN UCHAR ifIndex,
IN NDIS_802_11_SSID *pSsid,
IN UCHAR ScanType,
IN BOOLEAN ChannelSel)
{
MLME_SCAN_REQ_STRUCT ScanReq;
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
{
/*
* Still scanning, ignore this scan.
*/
DBGPRINT(RT_DEBUG_TRACE, ("ApCliSiteSurvey:: scanning now\n"));
return;
}
if(ifIndex >= MAX_APCLI_NUM)
return;
#ifdef WSC_AP_SUPPORT
if ((pAd->ApCfg.ApCliTab[ifIndex].WscControl.WscConfMode != WSC_DISABLE) &&
(pAd->ApCfg.ApCliTab[ifIndex].WscControl.bWscTrigger == TRUE))
{
DBGPRINT(RT_DEBUG_TRACE, ("%s(): Stop scanning due to WPS triggered!\n",__FUNCTION__));
return;
}
#endif /* WSC_AP_SUPPORT */
AsicDisableSync(pAd);
#ifdef AP_PARTIAL_SCAN_SUPPORT
if (((pAd->ApCfg.bPartialScanning == TRUE) && (pAd->ApCfg.LastPartialScanChannel == 0)) ||
(pAd->ApCfg.bPartialScanning == FALSE))
#endif /* AP_PARTIAL_SCAN_SUPPORT */
{
BssTableInit(&pAd->ScanTab);
}
pAd->Mlme.ApSyncMachine.CurrState = AP_SYNC_IDLE;
pAd->ApCfg.ApCliTab[ifIndex].SyncCurrState = APCLI_SYNC_IDLE;
RTMPZeroMemory(ScanReq.Ssid, MAX_LEN_OF_SSID);
ScanReq.SsidLen = 0;
if (pSsid)
{
ScanReq.SsidLen = pSsid->SsidLength;
NdisMoveMemory(ScanReq.Ssid, pSsid->Ssid, pSsid->SsidLength);
}
ScanReq.BssType = BSS_ANY;
ScanReq.ScanType = ScanType;
pAd->ApCfg.bAutoChannelAtBootup = ChannelSel;
MlmeEnqueue(pAd, APCLI_SYNC_STATE_MACHINE, APCLI_MT2_MLME_SCAN_REQ, sizeof(MLME_SCAN_REQ_STRUCT), &ScanReq, 0);
RTMP_MLME_HANDLER(pAd);
}
示例10: P2pCrednTabDelete
VOID P2pCrednTabDelete(
IN PRTMP_ADAPTER pAd,
IN UCHAR *pAddr)
{
PRT_P2P_TABLE Tab = &pAd->P2pTable;
UCHAR i;
/*UCHAR Zero[6] = {0,0,0,0,0,0}; */
DBGPRINT(RT_DEBUG_ERROR, (" P2P - P2pCrednTabDelete \n"));
for (i = 0; i < MAX_P2P_TABLE_SIZE; i++)
{
if (RTMPEqualMemory(pAddr, Tab->TempCredential[i].InterAddr, MAC_ADDR_LEN))
{
Tab->TempCredential[i].bValid = FALSE;
RTMPZeroMemory(Tab->TempCredential[i].InterAddr, MAC_ADDR_LEN);
RTMPZeroMemory(&Tab->TempCredential[i].Profile, sizeof(WSC_CREDENTIAL));
}
}
}
示例11: P2pGroupTabDelete
UCHAR P2pGroupTabDelete(
IN PRTMP_ADAPTER pAd,
IN UCHAR p2pindex,
IN PUCHAR Addr)
{
UCHAR index = 0xff;
PRT_P2P_CLIENT_ENTRY pP2pEntry;
if ((p2pindex >= MAX_P2P_GROUP_SIZE) && (Addr != NULL))
index = P2pGroupTabSearch(pAd, Addr);
else
index = p2pindex;
DBGPRINT(RT_DEBUG_TRACE,("P2pGroupTabDelete . index = %d. \n", index));
if (index < MAX_P2P_GROUP_SIZE)
{
pP2pEntry = &pAd->P2pTable.Client[index];
/* Before connected, there is WPS provisioning process. */
/* So maybe receive disassoc frame. but we can't delete p2p client entry . */
/* So need to check P2pClientState is connected, then we can delete the entry. */
DBGPRINT(RT_DEBUG_ERROR, ("P2pGroupTabDelete index %d. search addr[3~5] is %x %x %x\n", index, Addr[3],Addr[4],Addr[5]));
RTMPZeroMemory(pP2pEntry->addr, MAC_ADDR_LEN);
RTMPZeroMemory(pP2pEntry->bssid, MAC_ADDR_LEN);
RTMPZeroMemory(pP2pEntry->InterfaceAddr, MAC_ADDR_LEN);
/* Assign a strange address first. */
pP2pEntry->addr[3] = 0x55;
pP2pEntry->bssid[3] = 0x55;
pP2pEntry->InterfaceAddr[3] = 0x55;
RTMPZeroMemory(pP2pEntry->PrimaryDevType, P2P_DEVICE_TYPE_LEN);
RTMPZeroMemory(pP2pEntry->SecondaryDevType, P2P_DEVICE_TYPE_LEN);
RTMPZeroMemory(pP2pEntry->DeviceName, P2P_DEVICE_NAME_LEN);
pP2pEntry->NumSecondaryType = 0;
pP2pEntry->DeviceNameLen = 0;
pP2pEntry->ConfigMethod = 0;
pP2pEntry->OpChannel = 0;
pP2pEntry->ListenChannel = 0;
pP2pEntry->Dpid = DEV_PASS_ID_NOSPEC;
pP2pEntry->MyGOIndex = 0xff;
pP2pEntry->Peerip = 0;
pP2pEntry->ConfigTimeOut = 0;
pP2pEntry->Rule = P2P_IS_CLIENT;
RTMPZeroMemory(pP2pEntry->Ssid, MAX_LEN_OF_SSID);
pP2pEntry->SsidLen = 0;
pP2pEntry->GoIntent = 0;
if ((pAd->P2pTable.ClientNumber > 0) && (pP2pEntry->P2pClientState != P2PSTATE_NONE))
pAd->P2pTable.ClientNumber--;
pP2pEntry->P2pClientState = P2PSTATE_NONE;
}
return index;
}
示例12: Set_P2P_Reset_Proc
INT Set_P2P_Reset_Proc(
IN PRTMP_ADAPTER pAd,
IN PSTRING arg)
{
/*UINT32 DiscPerd = 0;*/
POS_COOKIE pObj;
PRT_P2P_CONFIG pP2PCtrl = &pAd->P2pCfg;
pObj = (POS_COOKIE) pAd->OS_Cookie;
if (pObj->ioctl_if_type != INT_P2P)
return 0;
if (P2P_CLI_ON(pAd))
P2P_CliStop(pAd);
else if (P2P_GO_ON(pAd))
{
P2P_GoStop(pAd);
if (INFRA_ON(pAd))
AsicEnableBssSync(pAd);
}
P2PCfgInit(pAd);
P2pGroupTabInit(pAd);
pP2PCtrl->Rule = P2P_IS_DEVICE;
pAd->flg_p2p_OpStatusFlags = P2P_DISABLE;
pP2PCtrl->ConfigMethod = 0x188;
pAd->ApCfg.MBSSID[MAIN_MBSSID].WscControl.WscConfStatus = WSC_SCSTATE_UNCONFIGURED;
pP2PCtrl->GoFormCurrentState = P2P_GO_FORM_IDLE;
pP2PCtrl->DiscCurrentState = P2P_DISC_IDLE;
pP2PCtrl->CtrlCurrentState = P2P_CTRL_IDLE;
NdisZeroMemory(&pP2PCtrl->P2pCounter, sizeof(P2P_COUNTER_STRUCT));
P2pSetListenIntBias(pAd, 3);
RTMPZeroMemory(pAd->P2pCfg.SSID, MAX_LEN_OF_SSID);
RTMPMoveMemory(pAd->P2pCfg.SSID, WILDP2PSSID, WILDP2PSSIDLEN);
pP2PCtrl->SSIDLen = WILDP2PSSIDLEN;
/* Set Dpid to "not specified". it means, GUI doesn't set for connection yet. */
pP2PCtrl->Dpid = DEV_PASS_ID_NOSPEC;
RTMPZeroMemory(pAd->P2pCfg.ConnectingMAC, MAC_ADDR_LEN);
return TRUE;
}
示例13: RtmpUSBNullFrameKickOut
VOID RtmpUSBNullFrameKickOut(
IN RTMP_ADAPTER *pAd,
IN UCHAR QueIdx,
IN UCHAR *pNullFrame,
IN UINT32 frameLen)
{
if (pAd->NullContext.InUse == FALSE)
{
PTX_CONTEXT pNullContext;
TXINFO_STRUC *pTxInfo;
TXWI_STRUC *pTxWI;
UCHAR *pWirelessPkt;
UINT8 TXWISize = pAd->chipCap.TXWISize;
pNullContext = &(pAd->NullContext);
/* Set the in use bit*/
pNullContext->InUse = TRUE;
pWirelessPkt = (PUCHAR)&pNullContext->TransferBuffer->field.WirelessPacket[0];
RTMPZeroMemory(&pWirelessPkt[0], 100);
pTxInfo = (TXINFO_STRUC *)&pWirelessPkt[0];
rlt_usb_write_txinfo(pAd, pTxInfo, (USHORT)(frameLen + TXWISize + TSO_SIZE), TRUE, EpToQueue[MGMTPIPEIDX], FALSE, FALSE);
pTxInfo->TxInfoQSEL = FIFO_EDCA;
pTxWI = (TXWI_STRUC *)&pWirelessPkt[TXINFO_SIZE];
RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0, BSSID_WCID, frameLen,
0, 0, (UCHAR)pAd->CommonCfg.MlmeTransmit.field.MCS, IFS_HTTXOP, FALSE, &pAd->CommonCfg.MlmeTransmit);
#ifdef RT_BIG_ENDIAN
RTMPWIEndianChange(pAd, (PUCHAR)pTxWI, TYPE_TXWI);
#endif /* RT_BIG_ENDIAN */
RTMPMoveMemory(&pWirelessPkt[TXWISize + TXINFO_SIZE + TSO_SIZE], pNullFrame, frameLen);
#ifdef RT_BIG_ENDIAN
RTMPFrameEndianChange(pAd, (PUCHAR)&pWirelessPkt[TXINFO_SIZE + TXWISize + TSO_SIZE], DIR_WRITE, FALSE);
#endif /* RT_BIG_ENDIAN */
pAd->NullContext.BulkOutSize = TXINFO_SIZE + TXWISize + TSO_SIZE + frameLen + 4;
pAd->NullContext.BulkOutSize = ( pAd->NullContext.BulkOutSize + 3) & (~3);
/* Fill out frame length information for global Bulk out arbitor*/
/*pNullContext->BulkOutSize = TransferBufferLength;*/
DBGPRINT(RT_DEBUG_TRACE, ("%s - Send NULL Frame @%d Mbps...\n", __FUNCTION__, RateIdToMbps[pAd->CommonCfg.TxRate]));
RTUSB_SET_BULK_FLAG(pAd, fRTUSB_BULK_OUT_DATA_NULL);
pAd->Sequence = (pAd->Sequence+1) & MAXSEQ;
/* Kick bulk out */
RTUSBKickBulkOut(pAd);
}
}
示例14: RtmpUSBNullFrameKickOut
void RtmpUSBNullFrameKickOut(struct rt_rtmp_adapter *pAd,
u8 QueIdx,
u8 * pNullFrame, u32 frameLen)
{
if (pAd->NullContext.InUse == FALSE) {
struct rt_tx_context *pNullContext;
struct rt_txinfo *pTxInfo;
struct rt_txwi * pTxWI;
u8 *pWirelessPkt;
pNullContext = &(pAd->NullContext);
/* Set the in use bit */
pNullContext->InUse = TRUE;
pWirelessPkt =
(u8 *)& pNullContext->TransferBuffer->field.
WirelessPacket[0];
RTMPZeroMemory(&pWirelessPkt[0], 100);
pTxInfo = (struct rt_txinfo *)& pWirelessPkt[0];
RTMPWriteTxInfo(pAd, pTxInfo,
(u16)(sizeof(struct rt_header_802_11) + TXWI_SIZE),
TRUE, EpToQueue[MGMTPIPEIDX], FALSE, FALSE);
pTxInfo->QSEL = FIFO_EDCA;
pTxWI = (struct rt_txwi *) & pWirelessPkt[TXINFO_SIZE];
RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE,
FALSE, 0, BSSID_WCID, (sizeof(struct rt_header_802_11)), 0,
0, (u8)pAd->CommonCfg.MlmeTransmit.field.MCS,
IFS_HTTXOP, FALSE, &pAd->CommonCfg.MlmeTransmit);
RTMPMoveMemory(&pWirelessPkt[TXWI_SIZE + TXINFO_SIZE],
&pAd->NullFrame, sizeof(struct rt_header_802_11));
pAd->NullContext.BulkOutSize =
TXINFO_SIZE + TXWI_SIZE + sizeof(pAd->NullFrame) + 4;
/* Fill out frame length information for global Bulk out arbitor */
/*pNullContext->BulkOutSize = TransferBufferLength; */
DBGPRINT(RT_DEBUG_TRACE,
("SYNC - send NULL Frame @%d Mbps...\n",
RateIdToMbps[pAd->CommonCfg.TxRate]));
RTUSB_SET_BULK_FLAG(pAd, fRTUSB_BULK_OUT_DATA_NULL);
/* Kick bulk out */
RTUSBKickBulkOut(pAd);
}
}
示例15: RtmpUSBNullFrameKickOut
VOID RtmpUSBNullFrameKickOut(
IN RTMP_ADAPTER *pAd,
IN UCHAR QueIdx,
IN UCHAR *pNullFrame,
IN UINT32 frameLen)
{
if (pAd->NullContext.InUse == FALSE)
{
PTX_CONTEXT pNullContext;
PTXINFO_STRUC pTxInfo;
PTXWI_STRUC pTxWI;
PUCHAR pWirelessPkt;
pNullContext = &(pAd->NullContext);
// Set the in use bit
pNullContext->InUse = TRUE;
pWirelessPkt = (PUCHAR)&pNullContext->TransferBuffer->field.WirelessPacket[0];
RTMPZeroMemory(&pWirelessPkt[0], 100);
pTxInfo = (PTXINFO_STRUC)&pWirelessPkt[0];
RTMPWriteTxInfo(pAd, pTxInfo, (USHORT)(sizeof(HEADER_802_11)+TXWI_SIZE), TRUE, EpToQueue[MGMTPIPEIDX], FALSE, FALSE);
pTxInfo->QSEL = FIFO_EDCA;
pTxWI = (PTXWI_STRUC)&pWirelessPkt[TXINFO_SIZE];
RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0, BSSID_WCID, (sizeof(HEADER_802_11)),
0, 0, (UCHAR)pAd->CommonCfg.MlmeTransmit.field.MCS, IFS_HTTXOP, FALSE, &pAd->CommonCfg.MlmeTransmit);
#ifdef RT_BIG_ENDIAN
RTMPWIEndianChange((PUCHAR)pTxWI, TYPE_TXWI);
#endif // RT_BIG_ENDIAN //
RTMPMoveMemory(&pWirelessPkt[TXWI_SIZE+TXINFO_SIZE], &pAd->NullFrame, sizeof(HEADER_802_11));
#ifdef RT_BIG_ENDIAN
RTMPFrameEndianChange(pAd, (PUCHAR)&pWirelessPkt[TXINFO_SIZE + TXWI_SIZE], DIR_WRITE, FALSE);
#endif // RT_BIG_ENDIAN //
pAd->NullContext.BulkOutSize = TXINFO_SIZE + TXWI_SIZE + sizeof(pAd->NullFrame) + 4;
// Fill out frame length information for global Bulk out arbitor
//pNullContext->BulkOutSize = TransferBufferLength;
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - send NULL Frame @%d Mbps...\n", RateIdToMbps[pAd->CommonCfg.TxRate]));
RTUSB_SET_BULK_FLAG(pAd, fRTUSB_BULK_OUT_DATA_NULL);
// Kick bulk out
RTUSBKickBulkOut(pAd);
}
}