本文整理汇总了C++中COPY_MAC_ADDR函数的典型用法代码示例。如果您正苦于以下问题:C++ COPY_MAC_ADDR函数的具体用法?C++ COPY_MAC_ADDR怎么用?C++ COPY_MAC_ADDR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了COPY_MAC_ADDR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PeerAuthRspAtSeq4Action
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
VOID PeerAuthRspAtSeq4Action(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
UCHAR Addr2[MAC_ADDR_LEN];
USHORT Alg, Seq, Status;
// CHAR ChlgText[CIPHER_TEXT_LEN];
CHAR *ChlgText = NULL;
BOOLEAN TimerCancelled;
/* allocate memory */
os_alloc_mem(NULL, (UCHAR **)&ChlgText, CIPHER_TEXT_LEN);
if (ChlgText == NULL)
{
DBGPRINT(RT_DEBUG_ERROR, ("%s: ChlgText Allocate memory fail!!!\n", __FUNCTION__));
return;
}
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);
RTMPSendWirelessEvent(pAd, IW_SHARED_WEP_FAIL, NULL, BSS0, 0);
}
pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_AUTH_CONF, 2, &Status, 0);
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE, ("AUTH - PeerAuthRspAtSeq4Action() sanity check fail\n"));
}
if (ChlgText != NULL)
os_free_mem(NULL, ChlgText);
}
示例2: MlmeDeauthReqAction
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
VOID MlmeDeauthReqAction(RTMP_ADAPTER *pAd, MLME_QUEUE_ELEM *Elem)
{
MLME_DEAUTH_REQ_STRUCT *pInfo;
HEADER_802_11 DeauthHdr;
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen = 0;
USHORT Status;
pInfo = (MLME_DEAUTH_REQ_STRUCT *) Elem->Msg;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS) {
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - MlmeDeauthReqAction() allocate memory fail\n"));
pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE;
Status = MLME_FAIL_NO_RESOURCE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_DEAUTH_CONF, 2,
&Status, 0);
return;
}
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Send DE-AUTH request (Reason=%d)...\n",
pInfo->Reason));
MgtMacHeaderInit(pAd, &DeauthHdr, SUBTYPE_DEAUTH, 0, pInfo->Addr,
pAd->CurrentAddress,
pAd->MlmeAux.Bssid);
MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof (HEADER_802_11),
&DeauthHdr, 2, &pInfo->Reason, END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
pAd->StaCfg.DeauthReason = pInfo->Reason;
COPY_MAC_ADDR(pAd->StaCfg.DeauthSta, pInfo->Addr);
pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE;
Status = MLME_SUCCESS;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_DEAUTH_CONF, 2, &Status,
0);
/* send wireless event - for deauthentication */
RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, NULL, BSS0, 0);
}
示例3: MlmeAssocReqSanity
/*
==========================================================================
Description:
MLME message sanity check
Return:
TRUE if all parameters are OK, FALSE otherwise
==========================================================================
*/
BOOLEAN MlmeAssocReqSanity(
IN PRTMP_ADAPTER pAd,
IN VOID *Msg,
IN ULONG MsgLen,
OUT PUCHAR pApAddr,
OUT USHORT *pCapabilityInfo,
OUT ULONG *pTimeout,
OUT USHORT *pListenIntv)
{
MLME_ASSOC_REQ_STRUCT *pInfo;
pInfo = (MLME_ASSOC_REQ_STRUCT *)Msg;
*pTimeout = pInfo->Timeout; // timeout
COPY_MAC_ADDR(pApAddr, pInfo->Addr); // AP address
*pCapabilityInfo = pInfo->CapabilityInfo; // capability info
*pListenIntv = pInfo->ListenIntv;
return TRUE;
}
示例4: P2pSendPassedAction
static VOID P2pSendPassedAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
P2P_GO_FORM_STATE *pCurrState = &(pAd->P2pCfg.GoFormCurrentState);
PP2P_CMD_STRUCT pP2pCmd = (PP2P_CMD_STRUCT)Elem->Msg;
UCHAR index = pP2pCmd->Idx;
DBGPRINT(RT_DEBUG_ERROR, ("%s::\n", __FUNCTION__));
DBGPRINT(RT_DEBUG_ERROR, ("Addr = %02x:%02x:%02x:%02x:%02x:%02x\n", PRINT_MAC(pP2pCmd->Addr)));
pAd->P2pTable.Client[index].P2pClientState = P2PSTATE_CONNECT_COMMAND;
COPY_MAC_ADDR(pAd->P2pCfg.ConnectingMAC, pAd->P2pTable.Client[index].addr);
pAd->P2pTable.Client[index].StateCount = 20;
pAd->P2pTable.Client[index].bValid = TRUE;
P2pConnect(pAd);
*pCurrState = P2P_GO_FORM_IDLE;
}
示例5: RRM_BcnReortQuery
static VOID RRM_BcnReortQuery(
IN PRTMP_ADAPTER pAd,
IN INT ApIdx,
IN PRRM_CONFIG pRrmCfg)
{
INT idx;
for (idx = pRrmCfg->QuietCB.CurAid; idx < (pAd->MacTab.Size+1); idx++)
{
PMAC_TABLE_ENTRY pEntry = &pAd->MacTab.Content[idx];
if (IS_RRM_CAPABLE(pEntry)
&& IS_RRM_BEACON_MEASURE(pEntry))
{
RRM_MLME_BCN_REQ_INFO BcnReq;
NdisZeroMemory(&BcnReq, sizeof(RRM_MLME_BCN_REQ_INFO));
COPY_MAC_ADDR(BcnReq.Bssid, BROADCAST_ADDR);
BcnReq.pSsid = (PUCHAR)pAd->ApCfg.MBSSID[ApIdx].Ssid;
BcnReq.SsidLen = pAd->ApCfg.MBSSID[ApIdx].SsidLen;
BcnReq.RegulatoryClass = pAd->CommonCfg.RegulatoryClass[0];
BcnReq.MeasureCh = pRrmCfg->QuietCB.MeasureCh;
BcnReq.MeasureMode = RRM_BCN_REQ_MODE_BCNTAB;
BcnReq.BcnReqCapFlag.field.ReportCondition = TRUE;
BcnReq.MeasureDuration = cpu2le16(pRrmCfg->QuietCB.QuietDuration);
if (BcnReq.MeasureCh == 255)
BcnReq.BcnReqCapFlag.field.ChannelRep = TRUE;
else
BcnReq.BcnReqCapFlag.field.ChannelRep = FALSE;
RRM_EnqueueBcnReq(pAd, pEntry->Aid, pEntry->apidx, &BcnReq);
pRrmCfg->QuietCB.CurAid = idx + 1;
break;
}
}
if (idx == (pAd->MacTab.Size + 1))
{
pRrmCfg->QuietCB.CurAid = 1;
pRrmCfg->QuietCB.MeasureCh =
(pRrmCfg->QuietCB.MeasureCh == 255) ? pAd->CommonCfg.Channel : 255;
}
}
示例6: FT_OTA_AuthParmFill
VOID FT_OTA_AuthParmFill(
IN PRTMP_ADAPTER pAd,
IN OUT MLME_FT_OTA_AUTH_REQ_STRUCT *pFtOtaAuthReq,
IN PUCHAR pAddr,
IN USHORT Alg,
IN PDOT11R_CMN_STRUC pCmmDot11rCfg)
{
COPY_MAC_ADDR(pFtOtaAuthReq->Addr, pAddr);
pFtOtaAuthReq->Alg = Alg;
pFtOtaAuthReq->Timeout = (AUTH_TIMEOUT * 2);
/* MDIE */
pFtOtaAuthReq->MdIe.FtCapPlc.field.RsrReqCap = 0;
pFtOtaAuthReq->MdIe.FtCapPlc.field.FtOverDs = 0;
if (pCmmDot11rCfg->bSupportResource && pAd->MlmeAux.MdIeInfo.FtCapPlc.field.RsrReqCap)
pFtOtaAuthReq->MdIe.FtCapPlc.field.RsrReqCap = 1;
pFtOtaAuthReq->MdIe.FtCapPlc.field.FtOverDs = pAd->MlmeAux.MdIeInfo.FtCapPlc.field.FtOverDs;
FT_SET_MDID(pFtOtaAuthReq->MdIe.MdId, pCmmDot11rCfg->MdIeInfo.MdId);
}
示例7: D_CheckConnectionReq
static INT D_CheckConnectionReq(
PRTMP_ADAPTER pAd,
PUCHAR pSrcAddr,
UINT8 FrameType,
PCHAR Rssi,
BOOLEAN *bAuthCheck)
{
PBND_STRG_CLI_TABLE table = P_BND_STRG_TABLE;
BNDSTRG_MSG msg;
/* Send to daemon */
NdisCopyMemory(msg.Rssi, Rssi, 3);
msg.Action= CONNECTION_REQ;
msg.Band = table->Band;
msg.FrameType = FrameType;
msg.bAuthCheck = bAuthCheck ? 1:0;
COPY_MAC_ADDR(msg.Addr, pSrcAddr);
D_BndStrgSendMsg(pAd, &msg);
if (bAuthCheck)
{
PBND_STRG_CLI_TABLE table = P_BND_STRG_TABLE;
PBND_STRG_CLI_ENTRY entry = NULL;
if (table->Ops)
entry = table->Ops->TableLookup(table, pSrcAddr);
if (entry || table->Band == BAND_5G)
*bAuthCheck = TRUE;
#ifdef BND_STRG_QA
else
{
*bAuthCheck = FALSE;
BND_STRG_PRINTQAMSG(table, pSrcAddr,
(RED("check 2.4G connection failed. client (%02x:%02x:%02x:%02x:%02x:%02x)"
" is not allowed to connect 2.4G.\n"), PRINT_MAC(pSrcAddr)));
}
#endif
}
return TRUE;
}
示例8: GenRandom
/*
========================================================================
Routine Description:
Generate random number by software.
Arguments:
pAd - pointer to our pAdapter context
macAddr - pointer to local MAC address
Return Value:
Note:
802.1ii-2004 Annex H.5
========================================================================
*/
VOID GenRandom(
IN PRTMP_ADAPTER pAd,
IN UCHAR *macAddr,
OUT UCHAR *random)
{
INT i, curr;
UCHAR local[80], KeyCounter[32];
UCHAR result[80];
ULONG CurrentTime;
UCHAR prefix[] = {'I', 'n', 'i', 't', ' ', 'C', 'o', 'u', 'n', 't', 'e', 'r'};
// Zero the related information
NdisZeroMemory(result, 80);
NdisZeroMemory(local, 80);
NdisZeroMemory(KeyCounter, 32);
for (i = 0; i < 32; i++)
{
// copy the local MAC address
COPY_MAC_ADDR(local, macAddr);
curr = MAC_ADDR_LEN;
// concatenate the current time
NdisGetSystemUpTime(&CurrentTime);
NdisMoveMemory(&local[curr], &CurrentTime, sizeof(CurrentTime));
curr += sizeof(CurrentTime);
// concatenate the last result
NdisMoveMemory(&local[curr], result, 32);
curr += 32;
// concatenate a variable
NdisMoveMemory(&local[curr], &i, 2);
curr += 2;
// calculate the result
PRF(KeyCounter, 32, prefix,12, local, curr, result, 32);
}
NdisMoveMemory(random, result, 32);
}
示例9: ApCliCtrlAuthReqTimeoutAction
/*
==========================================================================
Description:
APCLI MLME Auth Req timeout state machine procedure
==========================================================================
*/
static VOID ApCliCtrlAuthReqTimeoutAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
MLME_AUTH_REQ_STRUCT AuthReq;
PAPCLI_STRUCT pApCliEntry;
USHORT ifIndex = (USHORT)(Elem->Priv);
PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].CtrlCurrState;
DBGPRINT(RT_DEBUG_TRACE, ("(%s) Auth Req Timeout.\n", __FUNCTION__));
if (ifIndex >= MAX_APCLI_NUM)
return;
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex];
pApCliEntry->AuthReqCnt++;
if (pApCliEntry->AuthReqCnt > 5)
{
*pCurrState = APCLI_CTRL_DISCONNECTED;
NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Bssid, MAC_ADDR_LEN);
NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Ssid, MAX_LEN_OF_SSID);
pApCliEntry->AuthReqCnt = 0;
return;
}
/* stay in same state. */
*pCurrState = APCLI_CTRL_AUTH;
/* retry Authentication. */
DBGPRINT(RT_DEBUG_TRACE, ("(%s) Retry Auth Req.\n", __FUNCTION__));
COPY_MAC_ADDR(AuthReq.Addr, pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Bssid);
AuthReq.Alg = pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Alg; /* Ndis802_11AuthModeOpen; */
AuthReq.Timeout = AUTH_TIMEOUT;
MlmeEnqueue(pAd, APCLI_AUTH_STATE_MACHINE, APCLI_MT2_MLME_AUTH_REQ,
sizeof(MLME_AUTH_REQ_STRUCT), &AuthReq, ifIndex);
return;
}
示例10: PeerAddBAReqActionSanity
BOOLEAN PeerAddBAReqActionSanity(
IN PRTMP_ADAPTER pAd,
IN VOID *pMsg,
IN ULONG MsgLen,
OUT PUCHAR pAddr2)
{
PFRAME_802_11 pFrame = (PFRAME_802_11)pMsg;
PFRAME_ADDBA_REQ pAddFrame;
pAddFrame = (PFRAME_ADDBA_REQ)(pMsg);
if (MsgLen < (sizeof(FRAME_ADDBA_REQ)))
{
DBGPRINT(RT_DEBUG_ERROR,("PeerAddBAReqActionSanity: ADDBA Request frame length size = %ld incorrect\n", MsgLen));
return FALSE;
}
/* we support immediate BA.*/
#ifdef UNALIGNMENT_SUPPORT
{
BA_PARM tmpBaParm;
NdisMoveMemory((PUCHAR)(&tmpBaParm), (PUCHAR)(&pAddFrame->BaParm), sizeof(BA_PARM));
*(USHORT *)(&tmpBaParm) = cpu2le16(*(USHORT *)(&tmpBaParm));
NdisMoveMemory((PUCHAR)(&pAddFrame->BaParm), (PUCHAR)(&tmpBaParm), sizeof(BA_PARM));
}
#else
*(USHORT *)(&pAddFrame->BaParm) = cpu2le16(*(USHORT *)(&pAddFrame->BaParm));
#endif
pAddFrame->TimeOutValue = cpu2le16(pAddFrame->TimeOutValue);
pAddFrame->BaStartSeq.word = cpu2le16(pAddFrame->BaStartSeq.word);
COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2);
if (pAddFrame->BaParm.BAPolicy != IMMED_BA)
{
DBGPRINT(RT_DEBUG_ERROR,("PeerAddBAReqActionSanity: ADDBA Request Ba Policy[%d] not support\n", pAddFrame->BaParm.BAPolicy));
DBGPRINT(RT_DEBUG_ERROR,("ADDBA Request. tid=%x, Bufsize=%x, AMSDUSupported=%x \n", pAddFrame->BaParm.TID, pAddFrame->BaParm.BufSize, pAddFrame->BaParm.AMSDUSupported));
return FALSE;
}
return TRUE;
}
示例11: kalP2PIndicateConnReq
/*----------------------------------------------------------------------------*/
VOID
kalP2PIndicateConnReq(
IN P_GLUE_INFO_T prGlueInfo,
IN PUINT_8 pucDevName,
IN INT_32 u4NameLength,
IN PARAM_MAC_ADDRESS rPeerAddr,
IN UINT_8 ucDevType, /* 0: P2P Device / 1: GC / 2: GO */
IN INT_32 i4ConfigMethod,
IN INT_32 i4ActiveConfigMethod
)
{
union iwreq_data evt;
UINT_8 aucBuffer[IW_CUSTOM_MAX];
ASSERT(prGlueInfo);
/* buffer peer information for later IOC_P2P_GET_REQ_DEVICE_INFO access */
prGlueInfo->prP2PInfo->u4ConnReqNameLength = u4NameLength > 32 ? 32 : u4NameLength;
kalMemCopy(prGlueInfo->prP2PInfo->aucConnReqDevName,
pucDevName,
prGlueInfo->prP2PInfo->u4ConnReqNameLength);
COPY_MAC_ADDR(prGlueInfo->prP2PInfo->rConnReqPeerAddr, rPeerAddr);
prGlueInfo->prP2PInfo->ucConnReqDevType = ucDevType;
prGlueInfo->prP2PInfo->i4ConnReqConfigMethod = i4ConfigMethod;
prGlueInfo->prP2PInfo->i4ConnReqActiveConfigMethod = i4ActiveConfigMethod;
// prepare event structure
memset(&evt, 0, sizeof(evt));
snprintf(aucBuffer, IW_CUSTOM_MAX-1, "P2P_DVC_REQ");
evt.data.length = strlen(aucBuffer);
/* indicate in IWEVCUSTOM event */
wireless_send_event(prGlueInfo->prP2PInfo->prDevHandler,
IWEVCUSTOM,
&evt,
aucBuffer);
return;
} /* end of kalP2PIndicateConnReq() */
示例12: PeerP2pPresReqAction
VOID PeerP2pPresReqAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
MLME_P2P_ACTION_STRUCT P2PActReq;
MAC_TABLE_ENTRY *pEntry;
PFRAME_P2P_ACTION pFrame;
PP2P_NOA_DESC pNoADesc;
pFrame = (PFRAME_P2P_ACTION)Elem->Msg;
if (Elem->Wcid >= MAX_LEN_OF_MAC_TABLE)
{
DBGPRINT(RT_DEBUG_ERROR, ("PeerP2pPresReqAction. unknown Elem->Wcid = %d \n", Elem->Wcid ));
}
DBGPRINT(RT_DEBUG_ERROR, ("PeerP2pPresReqAction. Send back to Elem->Wcid = %d \n", Elem->Wcid ));
pEntry = &pAd->MacTab.Content[Elem->Wcid];
pNoADesc = (PP2P_NOA_DESC)(&Elem->Msg[11 + sizeof(FRAME_P2P_ACTION)]);
pEntry->P2pInfo.NoADesc[0].Count = pNoADesc->Count;
pEntry->P2pInfo.NoADesc[0].Duration = *(PULONG)&pNoADesc->Duration[0];
pEntry->P2pInfo.NoADesc[0].Interval = *(PULONG)&pNoADesc->Interval[0];
pEntry->P2pInfo.NoADesc[0].StartTime = *(PULONG)&pNoADesc->StartTime[0];
DBGPRINT(RT_DEBUG_ERROR,(" pP2pEntry->NoADesc[0].Count = %d, \n", pEntry->P2pInfo.NoADesc[0].Count));
DBGPRINT(RT_DEBUG_ERROR,(" pP2pEntry->NoADesc[0].Duration = %d, \n", pEntry->P2pInfo.NoADesc[0].Duration));
DBGPRINT(RT_DEBUG_ERROR,(" pP2pEntry->NoADesc[0].Interval = %d, \n", pEntry->P2pInfo.NoADesc[0].Interval));
DBGPRINT(RT_DEBUG_ERROR,(" pP2pEntry->NoADesc[0].StartTime = %d, \n", pEntry->P2pInfo.NoADesc[0].StartTime));
DBGPRINT(RT_DEBUG_ERROR,("pFrame->Token = %d \n", pFrame->Token));
pEntry->P2pInfo.NoAToken = pFrame->Token;
/* pP2pEntry->NoADesc[0].Duration = Elem->Msg; */
NdisZeroMemory(&P2PActReq, sizeof(P2PActReq));
COPY_MAC_ADDR(P2PActReq.Addr, pEntry->Addr);
P2PActReq.TabIndex = Elem->Wcid;
MlmeEnqueue(pAd, P2P_ACTION_STATE_MACHINE, MT2_MLME_P2P_PRESENCE_RSP, sizeof(MLME_P2P_ACTION_STRUCT), (PVOID)&P2PActReq, 0);
MlmeHandler(pAd);
}
示例13: BndStrg_IsClientStay
BOOLEAN BndStrg_IsClientStay(
PRTMP_ADAPTER pAd,
PMAC_TABLE_ENTRY pEntry)
{
PBND_STRG_CLI_TABLE table = P_BND_STRG_TABLE;
CHAR Rssi = RTMPAvgRssi(pAd, &pEntry->RssiSample);
if (table->AlgCtrl.ConditionCheck & fBND_STRG_CND_5G_RSSI &&
table->Band == BAND_5G &&
(Rssi < (table->RssiLow - 10/*Test*/)))
{
BNDSTRG_MSG msg;
msg.Action = CLI_DEL;
COPY_MAC_ADDR(msg.Addr, pEntry->Addr);
/* we don't know the index, daemon should look it up */
msg.TalbeIndex = BND_STRG_MAX_TABLE_SIZE;
BND_STRG_DBGPRINT(RT_DEBUG_TRACE,
(YLW("%s(): Kick client (%02x:%02x:%02x:%02x:%02x:%02x)")
YLW(" due to low Rssi(%d).\n")
, __FUNCTION__, PRINT_MAC(pEntry->Addr), Rssi));
RtmpOSWrielessEventSend(
pAd->net_dev,
RT_WLAN_EVENT_CUSTOM,
OID_BNDSTRG_MSG,
NULL,
(UCHAR *) &msg,
sizeof(BNDSTRG_MSG));
table->Ops->TableEntryDel(table, pEntry->Addr, BND_STRG_MAX_TABLE_SIZE);
return FALSE;
}
return TRUE;
}
示例14: FT_OTA_PeerAuthAckAction
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
VOID FT_OTA_PeerAuthAckAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
UCHAR Addr2[MAC_ADDR_LEN];
USHORT Alg, Seq, Status;
BOOLEAN TimerCancelled;
if (PeerAuthSanity(pAd, Elem->Msg, Elem->MsgLen, Addr2, &Alg, &Seq, &Status, NULL))
{
if (MAC_ADDR_EQUAL(pAd->MlmeAux.Bssid, Addr2) &&
(Alg == AUTH_MODE_FT) &&
(Seq == 4))
{
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("FT_OTA_AUTH - Receive FT_OTA_AUTH_ACK to me\n"));
RTMPCancelTimer(&pAd->MlmeAux.FtOtaAuthTimer, &TimerCancelled);
pAd->StaCfg.Dot11RCommInfo.FtRspSuccess = FT_OTA_RESPONSE;
if (Status == MLME_SUCCESS)
{
/* Retrieve Reassociation Deadline */
/* Check RIC-Response */
}
else
{
pAd->StaCfg.AuthFailReason = Status;
COPY_MAC_ADDR(pAd->StaCfg.AuthFailSta, Addr2);
}
pAd->Mlme.FtOtaAuthMachine.CurrState = FT_OTA_AUTH_REQ_IDLE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_AUTH_CONF, 2, &Status, 0);
}
}
else
{
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("FT_OTA_AUTH - FT_OTA_PeerAuthAckAction() sanity check fail\n"));
}
}
示例15: FT_OTD_ActParmFill
VOID FT_OTD_ActParmFill(
IN PRTMP_ADAPTER pAd,
IN OUT MLME_FT_REQ_STRUCT *FtReq,
IN PUCHAR pAddr,
IN NDIS_802_11_AUTHENTICATION_MODE AuthMode,
IN PFT_MDIE_INFO FtMdieInfo,
IN PFT_FTIE_INFO FtFtieInfo,
IN UCHAR VarIeLen,
IN PUCHAR pVarIe)
{
RTMPZeroMemory(FtReq, sizeof (MLME_FT_REQ_STRUCT));
COPY_MAC_ADDR(FtReq->TargetAddr, pAddr);
if (AuthMode >= Ndis802_11AuthModeWPA)
FtReq->HaveRSN = 1;
FtReq->Timeout = FT_ACT_TIMEOUT;
FT_SET_MDID(FtReq->MdIe.MdId, FtMdieInfo->MdId);
FtReq->MdIe.FtCapPlc.word = FtMdieInfo->FtCapPlc.word;
RTMPMoveMemory(&FtReq->SNonce[0], FtFtieInfo->SNonce, 32);
RTMPMoveMemory(&FtReq->R0khId[0], FtFtieInfo->R0khId,
FtFtieInfo->R0khIdLen);
FtReq->R0khIdLen = FtFtieInfo->R0khIdLen;
RTMPMoveMemory(&FtReq->VIe[0], pVarIe, VarIeLen);
}