本文整理汇总了C++中MiniportMMRequest函数的典型用法代码示例。如果您正苦于以下问题:C++ MiniportMMRequest函数的具体用法?C++ MiniportMMRequest怎么用?C++ MiniportMMRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MiniportMMRequest函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SendRefreshBAR
VOID SendRefreshBAR(RTMP_ADAPTER *pAd, MAC_TABLE_ENTRY *pEntry)
{
FRAME_BAR FrameBar;
ULONG FrameLen;
NDIS_STATUS NStatus;
UCHAR *pOutBuffer = NULL, i, TID;
USHORT Sequence, idx;
BA_ORI_ENTRY *pBAEntry;
for (i = 0; i <NUM_OF_TID; i++)
{
idx = pEntry->BAOriWcidArray[i];
if (idx == 0)
continue;
pBAEntry = &pAd->BATable.BAOriEntry[idx];
if (pBAEntry->ORI_BA_Status == Originator_Done)
{
TID = pBAEntry->TID;
ASSERT(pBAEntry->Wcid < MAX_LEN_OF_MAC_TABLE);
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory*/
if(NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_ERROR,("BA - MlmeADDBAAction() allocate memory failed \n"));
return;
}
Sequence = pAd->MacTab.tr_entry[pEntry->wcid].TxSeq[TID];
#ifdef APCLI_SUPPORT
#ifdef MAC_REPEATER_SUPPORT
if (IS_ENTRY_APCLI(pEntry) && pEntry->bReptCli)
BarHeaderInit(pAd, &FrameBar, pEntry->Addr,
pAd->ApCfg.ApCliTab[pEntry->func_tb_idx].RepeaterCli[pEntry->MatchReptCliIdx].CurrentAddress);
else
#endif /* MAC_REPEATER_SUPPORT */
#endif /* APCLI_SUPPORT */
BarHeaderInit(pAd, &FrameBar, pEntry->Addr, pEntry->wdev->if_addr);
FrameBar.StartingSeq.field.FragNum = 0; /* make sure sequence not clear in DEL function.*/
FrameBar.StartingSeq.field.StartSeq = Sequence; /* make sure sequence not clear in DEL funciton.*/
FrameBar.BarControl.TID = TID; /* make sure sequence not clear in DEL funciton.*/
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(FRAME_BAR), &FrameBar,
END_OF_ARGS);
#ifdef RTMP_PCI_SUPPORT
MiniportMMRequest(pAd, (MGMT_USE_QUEUE_FLAG | WMM_UP2AC_MAP[TID]), pOutBuffer, FrameLen);
#else /* RTMP_PCI_SUPPORT */
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
#endif /* !RTMP_PCI_SUPPORT */
MlmeFreeMemory(pAd, pOutBuffer);
}
}
}
开发者ID:andy-padavan,项目名称:rt-n56u,代码行数:60,代码来源:action.c
示例2: Cls3errAction
/*
==========================================================================
Description:
right part of IEEE 802.11/1999 page 374
Note:
This event should never cause ASSOC state machine perform state
transition, and has no relationship with CNTL machine. So we separate
this routine as a service outside of ASSOC state transition table.
==========================================================================
*/
VOID Cls3errAction(
IN PRTMP_ADAPTER pAd,
IN PUCHAR pAddr)
{
HEADER_802_11 DisassocHdr;
PCHAR pOutBuffer = NULL;
ULONG FrameLen = 0;
USHORT Reason = REASON_CLS3ERR;
USHORT NStatus;
// allocate memory
NStatus = MlmeAllocateMemory(pAd, (PVOID *)&pOutBuffer); //Get an unused nonpaged memory
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE, "ASSOC - Class 3 Error, Send DISASSOC frame\n");
MgtMacHeaderInit(pAd, &DisassocHdr, SUBTYPE_DISASSOC, 0, pAddr, pAd->PortCfg.Bssid);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &DisassocHdr,
2, &Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
pAd->PortCfg.DisassocReason = REASON_CLS3ERR;
COPY_MAC_ADDR(pAd->PortCfg.DisassocSta, pAddr);
}
开发者ID:ksx4system,项目名称:puspus,代码行数:39,代码来源:assoc.c
示例3: PeerAuthSimpleRspGenAndSend
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
void PeerAuthSimpleRspGenAndSend(
IN struct rtmp_adapter *pAd,
IN PHEADER_802_11 pHdr80211,
IN USHORT Alg,
IN USHORT Seq,
IN USHORT Reason,
IN USHORT Status)
{
HEADER_802_11 AuthHdr;
ULONG FrameLen = 0;
u8 *pOutBuffer = NULL;
if (Reason != MLME_SUCCESS) {
DBGPRINT(RT_DEBUG_TRACE, ("Peer AUTH fail...\n"));
return;
}
/*Get an unused nonpaged memory */
pOutBuffer = kmalloc(MGMT_DMA_BUFFER_SIZE, GFP_ATOMIC);
if (pOutBuffer == NULL)
return;
DBGPRINT(RT_DEBUG_TRACE, ("Send AUTH response (seq#2)...\n"));
MgtMacHeaderInit(pAd, &AuthHdr, SUBTYPE_AUTH, 0, pHdr80211->Addr2,
pAd->MlmeAux.Bssid);
MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof (HEADER_802_11),
&AuthHdr, 2, &Alg, 2, &Seq, 2, &Reason, END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
kfree(pOutBuffer);
}
开发者ID:ulli-kroll,项目名称:mt7610u,代码行数:38,代码来源:auth_rsp.c
示例4: PeerAuthSimpleRspGenAndSend
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
VOID PeerAuthSimpleRspGenAndSend(
IN PRTMP_ADAPTER pAd,
IN PHEADER_802_11 pHdr80211,
IN USHORT Alg,
IN USHORT Seq,
IN USHORT Reason,
IN USHORT Status)
{
HEADER_802_11 AuthHdr;
ULONG FrameLen = 0;
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
if (Reason != MLME_SUCCESS)
{
DBGPRINT(RT_DEBUG_TRACE, ("Peer AUTH fail...\n"));
return;
}
//Get an unused nonpaged memory
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer);
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE, ("Send AUTH response (seq#2)...\n"));
MgtMacHeaderInit(pAd, &AuthHdr, SUBTYPE_AUTH, 0, pHdr80211->Addr2, pAd->MlmeAux.Bssid);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &AuthHdr,
2, &Alg,
2, &Seq,
2, &Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:43,代码来源:auth_rsp.c
示例5: EnqueueChSwAnn
/*
==========================================================================
Description:
Prepare Channel Switch Announcement action frame and enqueue it into
management queue waiting for transmition.
Parametrs:
1. the destination mac address of the frame.
2. Channel switch announcement mode.
2. a New selected channel.
Return : None.
==========================================================================
*/
VOID EnqueueChSwAnn(
IN PRTMP_ADAPTER pAd,
IN PUCHAR pDA,
IN UINT8 ChSwMode,
IN UINT8 NewCh)
{
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen;
HEADER_802_11 ActHdr;
// build action frame header.
MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA,
pAd->CurrentAddress);
NStatus = MlmeAllocateMemory(pAd, (PVOID)&pOutBuffer); //Get an unused nonpaged memory
if(NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_TRACE, ("%s() allocate memory failed \n", __func__));
return;
}
NdisMoveMemory(pOutBuffer, (PCHAR)&ActHdr, sizeof(HEADER_802_11));
FrameLen = sizeof(HEADER_802_11);
InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_CHANNEL_SWITCH);
InsertChSwAnnIE(pAd, (pOutBuffer + FrameLen), &FrameLen, ChSwMode, NewCh, 0);
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
return;
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:48,代码来源:spectrum.c
示例6: PeerAuthSimpleRspGenAndSend
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
void PeerAuthSimpleRspGenAndSend(
PRTMP_ADAPTER pAd,
PHEADER_802_11 pHdr80211,
unsigned short Alg,
unsigned short Seq,
unsigned short Reason,
unsigned short Status)
{
HEADER_802_11 AuthHdr;
unsigned long FrameLen = 0;
unsigned char* pOutBuffer = NULL;
int NStatus;
if (Reason != MLME_SUCCESS) {
DBGPRINT(RT_DEBUG_TRACE, ("Peer AUTH fail...\n"));
return;
}
/*Get an unused nonpaged memory */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer);
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE, ("Send AUTH response (seq#2)...\n"));
MgtMacHeaderInit(pAd, &AuthHdr, SUBTYPE_AUTH, 0, pHdr80211->Addr2,
pAd->MlmeAux.Bssid);
MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof (HEADER_802_11),
&AuthHdr, 2, &Alg, 2, &Seq, 2, &Reason, END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
}
开发者ID:eljefe80,项目名称:mt7610u,代码行数:39,代码来源:auth_rsp.c
示例7: ApCliMlmeDisassocReqAction
/*
==========================================================================
Description:
Upper layer issues disassoc request
Parameters:
Elem -
==========================================================================
*/
static VOID ApCliMlmeDisassocReqAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
PMLME_DISASSOC_REQ_STRUCT pDisassocReq;
HEADER_802_11 DisassocHdr;
PUCHAR pOutBuffer = NULL;
ULONG FrameLen = 0;
NDIS_STATUS NStatus;
APCLI_CTRL_MSG_STRUCT ApCliCtrlMsg;
USHORT ifIndex = (USHORT)(Elem->Priv);
PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].AssocCurrState;
/* skip sanity check */
pDisassocReq = (PMLME_DISASSOC_REQ_STRUCT)(Elem->Msg);
/* allocate and send out DeassocReq frame */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); //Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_TRACE, ("APCLI_ASSOC - ApCliMlmeDisassocReqAction() allocate memory failed\n"));
*pCurrState = APCLI_ASSOC_IDLE;
ApCliCtrlMsg.Status = MLME_FAIL_NO_RESOURCE;
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DEASSOC_RSP,
sizeof(APCLI_CTRL_MSG_STRUCT), &ApCliCtrlMsg, ifIndex);
return;
}
DBGPRINT(RT_DEBUG_TRACE, ("APCLI_ASSOC - Send DISASSOC request [BSSID::%02x:%02x:%02x:%02x:%02x:%02x] \n",
pDisassocReq->Addr[0], pDisassocReq->Addr[1], pDisassocReq->Addr[2],
pDisassocReq->Addr[3], pDisassocReq->Addr[4], pDisassocReq->Addr[5]));
ApCliMgtMacHeaderInit(pAd, &DisassocHdr, SUBTYPE_DISASSOC, 0, pDisassocReq->Addr, pDisassocReq->Addr, ifIndex);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &DisassocHdr,
2, &pDisassocReq->Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
/* Set the control aux SSID to prevent it reconnect to old SSID */
/* Since calling this indicate user don't want to connect to that SSID anymore. */
/* 2004-11-10 can't reset this info, cause it may be the new SSID that user requests for */
/* pAd->MlmeAux.SsidLen = MAX_LEN_OF_SSID; */
/* NdisZeroMemory(pAd->MlmeAux.Ssid, MAX_LEN_OF_SSID); */
/* NdisZeroMemory(pAd->MlmeAux.Bssid, MAC_ADDR_LEN); */
//pAd->PortCfg.DisassocReason = REASON_DISASSOC_STA_LEAVING; */
//COPY_MAC_ADDR(pAd->PortCfg.DisassocSta, pDisassocReq->Addr); */
*pCurrState = APCLI_ASSOC_IDLE;
ApCliCtrlMsg.Status = MLME_SUCCESS;
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DEASSOC_RSP,
sizeof(APCLI_CTRL_MSG_STRUCT), &ApCliCtrlMsg, ifIndex);
return;
}
开发者ID:aircross,项目名称:ray,代码行数:68,代码来源:p2pcli_assoc.c
示例8: SendNotifyBWActionFrame
VOID SendNotifyBWActionFrame(RTMP_ADAPTER *pAd, UCHAR Wcid, UCHAR apidx)
{
UCHAR *pOutBuffer = NULL, *pAddr1;
NDIS_STATUS NStatus;
FRAME_ACTION_HDR Frame;
ULONG FrameLen;
struct wifi_dev *wdev;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /* Get an unused nonpaged memory */
if(NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_ERROR,("ACT - SendNotifyBWAction() allocate memory failed \n"));
return;
}
pAddr1 = pAd->MacTab.Content[Wcid].Addr;
wdev = &pAd->ApCfg.MBSSID[apidx].wdev;
ActHeaderInit(pAd, &Frame.Hdr, pAddr1, wdev->if_addr, wdev->bssid);
Frame.Category = CATEGORY_HT;
Frame.Action = NOTIFY_BW_ACTION;
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(FRAME_ACTION_HDR), &Frame,
END_OF_ARGS);
*(pOutBuffer + FrameLen) = pAd->CommonCfg.AddHTInfo.AddHtInfo.RecomWidth;
FrameLen++;
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
DBGPRINT(RT_DEBUG_TRACE,("ACT - SendNotifyBWAction(NotifyBW= %d)!\n", pAd->CommonCfg.AddHTInfo.AddHtInfo.RecomWidth));
}
开发者ID:jing-git,项目名称:rt-n56u-1,代码行数:34,代码来源:action.c
示例9: Cls2errAction
/*
==========================================================================
Description:
Some STA/AP
Note:
This action should never trigger AUTH state transition, therefore we
separate it from AUTH state machine, and make it as a standalone service
IRQL = DISPATCH_LEVEL
==========================================================================
*/
VOID Cls2errAction(
IN PRTMP_ADAPTER pAd,
IN PUCHAR pAddr)
{
HEADER_802_11 DeauthHdr;
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen = 0;
USHORT Reason = REASON_CLS2ERR;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Class 2 error, Send DEAUTH frame...\n"));
MgtMacHeaderInit(pAd, &DeauthHdr, SUBTYPE_DEAUTH, 0, pAddr,
#ifdef P2P_SUPPORT
pAd->CurrentAddress,
#endif /* P2P_SUPPORT */
pAd->MlmeAux.Bssid);
MakeOutgoingFrame(pOutBuffer, &FrameLen, sizeof (HEADER_802_11),
&DeauthHdr, 2, &Reason, END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
pAd->StaCfg.DeauthReason = Reason;
COPY_MAC_ADDR(pAd->StaCfg.DeauthSta, pAddr);
}
开发者ID:0x000000FF,项目名称:MT7601u,代码行数:41,代码来源:auth.c
示例10: APMlmeDeauthReqAction
/*
==========================================================================
Description:
Upper Layer request to kick out a STA
==========================================================================
*/
static VOID APMlmeDeauthReqAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
MLME_DEAUTH_REQ_STRUCT *pInfo;
HEADER_802_11 Hdr;
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen = 0;
MAC_TABLE_ENTRY *pEntry;
UCHAR apidx;
pInfo = (MLME_DEAUTH_REQ_STRUCT *)Elem->Msg;
if (Elem->Wcid < MAX_LEN_OF_MAC_TABLE)
{
pEntry = &pAd->MacTab.Content[Elem->Wcid];
if (!pEntry)
return;
#ifdef WAPI_SUPPORT
WAPI_InternalCmdAction(pAd,
pEntry->AuthMode,
pEntry->func_tb_idx,
pEntry->Addr,
WAI_MLME_DISCONNECT);
#endif /* WAPI_SUPPORT */
/* send wireless event - for deauthentication */
RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, pInfo->Addr, 0, 0);
ApLogEvent(pAd, pInfo->Addr, EVENT_DISASSOCIATED);
apidx = pEntry->func_tb_idx;
/* 1. remove this STA from MAC table */
MacTableDeleteEntry(pAd, Elem->Wcid, pInfo->Addr);
/* 2. send out DE-AUTH request frame */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer);
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Send DE-AUTH req to %02x:%02x:%02x:%02x:%02x:%02x\n",
PRINT_MAC(pInfo->Addr)));
MgtMacHeaderInit(pAd, &Hdr, SUBTYPE_DEAUTH, 0, pInfo->Addr,
pAd->ApCfg.MBSSID[apidx].wdev.if_addr,
pAd->ApCfg.MBSSID[apidx].wdev.bssid);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &Hdr,
2, &pInfo->Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
}
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:65,代码来源:ap_auth.c
示例11: ApCliMlmeDisassocReqAction
/*
==========================================================================
Description:
Upper layer issues disassoc request
Parameters:
Elem -
==========================================================================
*/
static VOID ApCliMlmeDisassocReqAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
PMLME_DISASSOC_REQ_STRUCT pDisassocReq;
HEADER_802_11 DisassocHdr;
PUCHAR pOutBuffer = NULL;
ULONG FrameLen = 0;
NDIS_STATUS NStatus;
APCLI_CTRL_MSG_STRUCT ApCliCtrlMsg;
USHORT ifIndex = (USHORT)(Elem->Priv);
PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].AssocCurrState;
/* skip sanity check */
pDisassocReq = (PMLME_DISASSOC_REQ_STRUCT)(Elem->Msg);
/* allocate and send out DeassocReq frame */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_TRACE, ("APCLI_ASSOC - ApCliMlmeDisassocReqAction() allocate memory failed\n"));
*pCurrState = APCLI_ASSOC_IDLE;
ApCliCtrlMsg.Status = MLME_FAIL_NO_RESOURCE;
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DEASSOC_RSP,
sizeof(APCLI_CTRL_MSG_STRUCT), &ApCliCtrlMsg, ifIndex);
return;
}
DBGPRINT(RT_DEBUG_TRACE, ("APCLI_ASSOC - Send DISASSOC request [BSSID::%02x:%02x:%02x:%02x:%02x:%02x] \n",
pDisassocReq->Addr[0], pDisassocReq->Addr[1], pDisassocReq->Addr[2],
pDisassocReq->Addr[3], pDisassocReq->Addr[4], pDisassocReq->Addr[5]));
ApCliMgtMacHeaderInit(pAd, &DisassocHdr, SUBTYPE_DISASSOC, 0, pDisassocReq->Addr, pDisassocReq->Addr, ifIndex);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &DisassocHdr,
2, &pDisassocReq->Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
*pCurrState = APCLI_ASSOC_IDLE;
ApCliCtrlMsg.Status = MLME_SUCCESS;
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DEASSOC_RSP,
sizeof(APCLI_CTRL_MSG_STRUCT), &ApCliCtrlMsg, ifIndex);
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
if (pAd->ApCfg.ApCliTab[ifIndex].WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
{
/*send disassociate event to wpa_supplicant*/
RtmpOSWrielessEventSend(pAd->net_dev, RT_WLAN_EVENT_CUSTOM, RT_DISASSOC_EVENT_FLAG, NULL, NULL, 0);
}
RtmpOSWrielessEventSend(pAd->net_dev, SIOCGIWAP, -1, NULL, NULL, 0);
RTMPSendWirelessEvent(pAd, IW_DISASSOC_EVENT_FLAG, NULL, BSS0, 0);
#endif /*APCLI_WPA_SUPPLICANT_SUPPORT*/
return;
}
开发者ID:schidler,项目名称:flyzjhz-rt-n56u,代码行数:67,代码来源:apcli_assoc.c
示例12: APCls2errAction
/*
==========================================================================
Description:
Some STA/AP
Note:
This action should never trigger AUTH state transition, therefore we
separate it from AUTH state machine, and make it as a standalone service
==========================================================================
*/
VOID APCls2errAction(
IN PRTMP_ADAPTER pAd,
IN ULONG Wcid,
IN PHEADER_802_11 pHeader)
{
HEADER_802_11 Hdr;
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen = 0;
USHORT Reason = REASON_CLS2ERR;
MAC_TABLE_ENTRY *pEntry = NULL;
UCHAR idx;
if (Wcid < MAX_LEN_OF_MAC_TABLE)
{
pEntry = &(pAd->MacTab.Content[Wcid]);
}
if (pEntry && IS_ENTRY_CLIENT(pEntry))
{
/*ApLogEvent(pAd, pAddr, EVENT_DISASSOCIATED); */
MacTableDeleteEntry(pAd, pEntry->Aid, pHeader->Addr2);
}
else
{
for (idx = 0; idx < pAd->ApCfg.BssidNum; idx++)
{
PMULTISSID_STRUCT pMbss = &pAd->ApCfg.MBSSID[idx];
if (NdisEqualMemory(pMbss->Bssid, pHeader->Addr1, MAC_ADDR_LEN))
break;
}
if (idx == pAd->ApCfg.BssidNum)
return;
}
/* send out DEAUTH request frame */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer);
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Class 2 error, Send DEAUTH frame to "
"%02x:%02x:%02x:%02x:%02x:%02x \n",
PRINT_MAC(pHeader->Addr2)));
MgtMacHeaderInit(pAd, &Hdr, SUBTYPE_DEAUTH, 0, pHeader->Addr2,
#ifdef P2P_SUPPORT
pHeader->Addr1,
#endif /* P2P_SUPPORT */
pHeader->Addr1);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &Hdr,
2, &Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:68,代码来源:ap_auth.c
示例13: SendBSS2040CoexistMgmtAction
VOID SendBSS2040CoexistMgmtAction(
IN RTMP_ADAPTER *pAd,
IN UCHAR Wcid,
IN UCHAR apidx,
IN UCHAR InfoReq)
{
UCHAR *pOutBuffer = NULL;
NDIS_STATUS NStatus;
FRAME_ACTION_HDR Frame;
ULONG FrameLen;
BSS_2040_COEXIST_ELEMENT BssCoexistInfo;
BSS_2040_INTOLERANT_CH_REPORT BssIntolerantInfo;
UCHAR *pAddr1;
struct wifi_dev *wdev;
DBGPRINT(RT_DEBUG_TRACE, ("SendBSS2040CoexistMgmtAction(): Wcid=%d, apidx=%d, InfoReq=%d!\n", Wcid, apidx, InfoReq));
NdisZeroMemory((PUCHAR)&BssCoexistInfo, sizeof(BSS_2040_COEXIST_ELEMENT));
NdisZeroMemory((PUCHAR)&BssIntolerantInfo, sizeof(BSS_2040_INTOLERANT_CH_REPORT));
BssCoexistInfo.ElementID = IE_2040_BSS_COEXIST;
BssCoexistInfo.Len = 1;
BssCoexistInfo.BssCoexistIe.word = pAd->CommonCfg.LastBSSCoexist2040.word;
BssCoexistInfo.BssCoexistIe.field.InfoReq = InfoReq;
BssIntolerantInfo.ElementID = IE_2040_BSS_INTOLERANT_REPORT;
BssIntolerantInfo.Len = 1;
BssIntolerantInfo.RegulatoryClass = get_regulatory_class(pAd);
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory*/
if(NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_ERROR,("ACT - SendBSS2040CoexistMgmtAction() allocate memory failed \n"));
return;
}
if (Wcid == MCAST_WCID)
pAddr1 = &BROADCAST_ADDR[0];
else
pAddr1 = pAd->MacTab.Content[Wcid].Addr;
wdev = &pAd->ApCfg.MBSSID[apidx].wdev;
ActHeaderInit(pAd, &Frame.Hdr, pAddr1, wdev->if_addr, wdev->bssid);
Frame.Category = CATEGORY_PUBLIC;
Frame.Action = ACTION_BSS_2040_COEXIST;
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(FRAME_ACTION_HDR), &Frame,
sizeof(BSS_2040_COEXIST_ELEMENT), &BssCoexistInfo,
sizeof(BSS_2040_INTOLERANT_CH_REPORT), &BssIntolerantInfo,
END_OF_ARGS);
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
DBGPRINT(RT_DEBUG_ERROR,("ACT - SendBSS2040CoexistMgmtAction(BSSCoexist2040=0x%x)\n", BssCoexistInfo.BssCoexistIe.word));
}
开发者ID:Brainiarc7,项目名称:mtk-wifi-gpl,代码行数:58,代码来源:action.c
示例14: SendPSMPAction
/*
Description : Send PSMP Action frame If PSMP mode switches.
*/
VOID SendPSMPAction(
IN PRTMP_ADAPTER pAd,
IN UCHAR Wcid,
IN UCHAR Psmp)
{
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
//ULONG Idx;
FRAME_PSMP_ACTION Frame;
ULONG FrameLen;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); //Get an unused nonpaged memory
if (NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_ERROR,("BA - MlmeADDBAAction() allocate memory failed \n"));
return;
}
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
ActHeaderInit(pAd, &Frame.Hdr, pAd->CommonCfg.Bssid, pAd->CurrentAddress, pAd->MacTab.Content[Wcid].Addr);
#endif // CONFIG_STA_SUPPORT //
Frame.Category = CATEGORY_HT;
Frame.Action = SMPS_ACTION;
switch (Psmp)
{
case MMPS_ENABLE:
#ifdef RT30xx
if (IS_RT30xx(pAd)
&&(pAd->Antenna.field.RxPath>1||pAd->Antenna.field.TxPath>1))
{
RTMP_ASIC_MMPS_DISABLE(pAd);
}
#endif // RT30xx //
Frame.Psmp = 0;
break;
case MMPS_DYNAMIC:
Frame.Psmp = 3;
break;
case MMPS_STATIC:
#ifdef RT30xx
if (IS_RT30xx(pAd)
&&(pAd->Antenna.field.RxPath>1||pAd->Antenna.field.TxPath>1))
{
RTMP_ASIC_MMPS_ENABLE(pAd);
}
#endif // RT30xx //
Frame.Psmp = 1;
break;
}
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(FRAME_PSMP_ACTION), &Frame,
END_OF_ARGS);
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
DBGPRINT(RT_DEBUG_ERROR,("HT - SendPSMPAction( %d ) \n", Frame.Psmp));
}
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:60,代码来源:ba_action.c
示例15: APPeerDlsTearDownAction
/*
========================================================================
Routine Description:
Handle peer DLS Tear down action frame.
Arguments:
pAd points to our adapter
*pElem action frame
Return Value:
None
Note:
========================================================================
*/
VOID APPeerDlsTearDownAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *pElem)
{
PMAC_TABLE_ENTRY pDAEntry, pSAEntry;
UCHAR DA[MAC_ADDR_LEN], SA[MAC_ADDR_LEN];
UINT16 ReasonCode;
PUCHAR pOutBuffer = NULL;
PFRAME_802_11 Fr;
UINT32 FrameLen = 0;
assert(pElem->Msg);
/* frame sanity check */
if (! PeerDlsTearDownSanity(pAd, pElem->Msg, pElem->MsgLen,
DA, SA, &ReasonCode))
{
return;
}
DBGPRINT(RT_DEBUG_TRACE,
("DLS - PeerDlsTearDownAction() from %02x:%02x:%02x:%02x:%02x:%02x\n",
SA[0], SA[1], SA[2], SA[3], SA[4], SA[5]));
pSAEntry = MacTableLookup(pAd, SA);
if (!pSAEntry)
return;
pDAEntry = MacTableLookup(pAd, DA);
if (!pDAEntry)
{
DBGPRINT(RT_DEBUG_TRACE, ("Destination station does not exist!\n"));
return;
}
pSAEntry->bDlsInit = FALSE;
/* forward Tear-down to real destination */
Fr = (PFRAME_802_11)pElem->Msg;
/* pOutBuffer = kmalloc(MAX_LEN_OF_MLME_BUFFER, MEM_ALLOC_FLAG); */
os_alloc_mem(pAd, (UCHAR **)&pOutBuffer, MAX_LEN_OF_MLME_BUFFER);
if (pOutBuffer == NULL)
return; /* fatal error, no available memory */
NdisMoveMemory(Fr->Hdr.Addr1, DA, MAC_ADDR_LEN);
NdisMoveMemory(Fr->Hdr.Addr2, pAd->ApCfg.MBSSID[pSAEntry->apidx].Bssid, MAC_ADDR_LEN);
NdisMoveMemory(Fr->Hdr.Addr3, SA, MAC_ADDR_LEN);
NdisMoveMemory(pOutBuffer, pElem->Msg, pElem->MsgLen);
FrameLen = pElem->MsgLen;
/* transmit the tear down frame */
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
/* kfree(pOutBuffer); */
os_free_mem(NULL, pOutBuffer);
}
开发者ID:glocklueng,项目名称:MCU_WIFI,代码行数:71,代码来源:ap_dls.c
示例16: MlmeP2pCommonAction
/*
==========================================================================
Description:
P2P Action frame differs only in InBuffer. Others are all common to all ACtion Subtype
Parameters:
S - pointer to the association state machine
Note:
The state machine looks like the following as name implies its function
==========================================================================
*/
VOID MlmeP2pCommonAction(
IN PRTMP_ADAPTER pAd,
IN UCHAR OUISubType,
IN UCHAR Token,
IN PUCHAR pInBuffer,
IN UCHAR InBufferLen,
IN MLME_QUEUE_ELEM *Elem)
{
PRT_P2P_CONFIG pP2PCtrl = &pAd->P2pCfg;
PMLME_P2P_ACTION_STRUCT pGoReq = (PMLME_P2P_ACTION_STRUCT) Elem->Msg;
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen = 0;
FRAME_P2P_ACTION Frame;
ULONG TmpLen;
UCHAR i;
PUCHAR pDest;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /* Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS)
{
return;
}
DBGPRINT(RT_DEBUG_ERROR, (" TO= %x %x %x %x %x %x \n", PRINT_MAC(pGoReq->Addr)));
DBGPRINT(RT_DEBUG_ERROR, (" Bssid= %x %x %x %x %x %x \n", PRINT_MAC(pP2PCtrl->CurrentAddress)));
ActHeaderInit(pAd, &Frame.Hdr, pGoReq->Addr, pP2PCtrl->CurrentAddress, pP2PCtrl->CurrentAddress);
Frame.Category = MT2_ACT_VENDOR; /* 0x7F */
RTMPMoveMemory(&Frame.OUI[0], P2POUIBYTE, 4);
Frame.OUISubType = OUISubType;
Frame.Token = Token;
/* No Element */
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(FRAME_P2P_ACTION), &Frame,
END_OF_ARGS);
if ((InBufferLen > 0) && (pInBuffer != NULL))
{
MakeOutgoingFrame(pOutBuffer + FrameLen, &TmpLen,
InBufferLen, pInBuffer,
END_OF_ARGS);
FrameLen += TmpLen;
}
MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
pDest = (PUCHAR)&Frame;
for (i = 0; i <FrameLen; )
{
DBGPRINT(RT_DEBUG_ERROR,(": %x %x %x %x %x %x %x %x %x \n", *(pDest+i), *(pDest+i+1), *(pDest+i+2),
*(pDest+i+3), *(pDest+i+4), *(pDest+i+5), *(pDest+i+6), *(pDest+i+7), *(pDest+i+8)));
i = i + 9;
}
DBGPRINT(RT_DEBUG_ERROR, ("Common P2P ACT request. FrameLen = %d. \n", FrameLen));
}
开发者ID:aircross,项目名称:ray,代码行数:67,代码来源:p2p_action.c
示例17: APCls2errAction
/*
==========================================================================
Description:
Some STA/AP
Note:
This action should never trigger AUTH state transition, therefore we
separate it from AUTH state machine, and make it as a standalone service
==========================================================================
*/
VOID APCls2errAction(
IN PRTMP_ADAPTER pAd,
IN ULONG Wcid,
IN PHEADER_802_11 pHeader)
{
HEADER_802_11 Hdr;
PUCHAR pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen = 0;
USHORT Reason = REASON_CLS2ERR;
MAC_TABLE_ENTRY *pEntry = NULL;
if (Wcid < MAX_LEN_OF_MAC_TABLE)
{
pEntry = &(pAd->MacTab.Content[Wcid]);
}
if (pEntry && IS_ENTRY_CLIENT(pEntry))
{
/*ApLogEvent(pAd, pAddr, EVENT_DISASSOCIATED); */
MacTableDeleteEntry(pAd, pEntry->Aid, pHeader->Addr2);
}
else
{
UCHAR bssid[MAC_ADDR_LEN];
NdisMoveMemory(bssid, pHeader->Addr1, MAC_ADDR_LEN);
bssid[5] &= pAd->ApCfg.MacMask;
if (NdisEqualMemory(pAd->CurrentAddress, bssid, MAC_ADDR_LEN) == 0)
return;
}
/* send out DEAUTH request frame */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer);
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Class 2 error, Send DEAUTH frame to "
"%02x:%02x:%02x:%02x:%02x:%02x\n",
PRINT_MAC(pHeader->Addr2)));
MgtMacHeaderInit(pAd, &Hdr, SUBTYPE_DEAUTH, 0, pHeader->Addr2,
pHeader->Addr1);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &Hdr,
2, &Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
}
开发者ID:derekcentrico,项目名称:m6.kernel.3.x,代码行数:62,代码来源:ap_auth.c
示例18: APCls2errAction
/*
==========================================================================
Description:
Some STA/AP
Note:
This action should never trigger AUTH state transition, therefore we
separate it from AUTH state machine, and make it as a standalone service
==========================================================================
*/
VOID APCls2errAction(
IN RTMP_ADAPTER *pAd,
IN ULONG Wcid,
IN HEADER_802_11 *pHeader)
{
HEADER_802_11 Hdr;
UCHAR *pOutBuffer = NULL;
NDIS_STATUS NStatus;
ULONG FrameLen = 0;
USHORT Reason = REASON_CLS2ERR;
MAC_TABLE_ENTRY *pEntry = NULL;
UCHAR apidx;
if (Wcid < MAX_LEN_OF_MAC_TABLE)
pEntry = &(pAd->MacTab.Content[Wcid]);
if (pEntry && IS_ENTRY_CLIENT(pEntry))
{
/*ApLogEvent(pAd, pAddr, EVENT_DISASSOCIATED); */
MacTableDeleteEntry(pAd, pEntry->wcid, pHeader->Addr2);
}
else
{
apidx = get_apidx_by_addr(pAd, pHeader->Addr1);
if (apidx >= pAd->ApCfg.BssidNum)
{
DBGPRINT(RT_DEBUG_TRACE,("AUTH - Class 2 error but not my bssid %02x:%02x:%02x:%02x:%02x:%02x\n", PRINT_MAC(pHeader->Addr1)));
return;
}
}
/* send out DEAUTH frame */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer);
if (NStatus != NDIS_STATUS_SUCCESS)
return;
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Class 2 error, Send DEAUTH frame to "
"%02x:%02x:%02x:%02x:%02x:%02x\n",
PRINT_MAC(pHeader->Addr2)));
MgtMacHeaderInit(pAd, &Hdr, SUBTYPE_DEAUTH, 0, pHeader->Addr2,
pHeader->Addr1,
pHeader->Addr1);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &Hdr,
2, &Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
}
开发者ID:Brainiarc7,项目名称:mtk-wifi-gpl,代码行数:61,代码来源:ap_auth.c
示例19: Set_P2P_DelDevByAddr_Proc
INT Set_P2P_DelDevByAddr_Proc(
IN PRTMP_ADAPTER pAd,
IN PSTRING arg)
{
POS_COOKIE pObj;
UCHAR DevAddr[6] = {0};
PMAC_TABLE_ENTRY pEntry = NULL;
pObj = (POS_COOKIE) pAd->OS_Cookie;
if (pObj->ioctl_if_type != INT_P2P)
return 0;
if (rtstrmactohex(arg, (PSTRING) &DevAddr[0]) == FALSE)
return FALSE;
DBGPRINT(RT_DEBUG_TRACE, ("%s:: DevMac = %02x:%02x:%02x:%02x:%02x:%02x\n", __FUNCTION__, PRINT_MAC(DevAddr)));
pEntry = MacTableLookup(pAd, DevAddr);
if (pEntry)
{
PUCHAR pOutBuffer = NULL;
ULONG FrameLen = 0;
USHORT Reason = REASON_NO_LONGER_VALID;
HEADER_802_11 DeAuthHdr;
MlmeAllocateMemory(pAd, &pOutBuffer);
if (pOutBuffer)
{
DBGPRINT(RT_DEBUG_WARN, ("Send DEAUTH - Reason = %d frame tO %02x:%02x:%02x:%02x:%02x:%02x \n",
Reason, PRINT_MAC(DevAddr)));
MgtMacHeaderInit(pAd, &DeAuthHdr, SUBTYPE_DEAUTH, 0,
pEntry->HdrAddr1,
pEntry->HdrAddr2,
pEntry->HdrAddr3);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &DeAuthHdr,
2, &Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
MlmeFreeMemory(pAd, pOutBuffer);
MacTableDeleteEntry(pAd, pEntry->Aid, pEntry->Addr);
P2pGroupTabDelete(pAd, P2P_NOT_FOUND, DevAddr);
}
}
return TRUE;
}
开发者ID:0x000000FF,项目名称:MT7601u,代码行数:52,代码来源:p2p_dbg.c
示例20: APCls2errAction
/*
==========================================================================
Description:
Some STA/AP
Note:
This action should never trigger AUTH state transition, therefore we
separate it from AUTH state machine, and make it as a standalone service
==========================================================================
*/
VOID APCls2errAction(
IN struct rtmp_adapter *pAd,
IN ULONG Wcid,
IN HEADER_802_11 *pHeader)
{
HEADER_802_11 Hdr;
u8 *pOutBuffer = NULL;
int NStatus;
ULONG FrameLen = 0;
unsigned short Reason = REASON_CLS2ERR;
MAC_TABLE_ENTRY *pEntry = NULL;
u8 apidx;
if (Wcid < MAX_LEN_OF_MAC_TABLE)
pEntry = &(pAd->MacTab.Content[Wcid]);
if (pEntry && IS_ENTRY_CLIENT(pEntry))
{
/*ApLogEvent(pAd, pAddr, EVENT_DISASSOCIATED); */
MacTableDeleteEntry(pAd, pEntry->wcid, pHeader->Addr2);
}
else
{
apidx = get_apidx_by_addr(pAd, pHeader->Addr1);
if (apidx >= pAd->ApCfg.BssidNum)
{
DBGPRINT(RT_DEBUG_TRACE,("AUTH - Class 2 error but not my bssid %02x:%02x:%02x:%02x:%02x:%02x\n", PRINT_MAC(pHeader->Addr1)));
return;
}
}
/* send out DEAUTH frame */
pOutBuffer = kmalloc(MGMT_DMA_BUFFER_SIZE, GFP_ATOMIC);
if (pOutBuffer == NULL)
return;
DBGPRINT(RT_DEBUG_TRACE,
("AUTH - Class 2 error, Send DEAUTH frame to "
"%02x:%02x:%02x:%02x:%02x:%02x\n",
PRINT_MAC(pHeader->Addr2)));
MgtMacHeaderInit(pAd, &Hdr, SUBTYPE_DEAUTH, 0, pHeader->Addr2,
pHeader->Addr1,
pHeader->Addr1);
MakeOutgoingFrame(pOutBuffer, &FrameLen,
sizeof(HEADER_802_11), &Hdr,
2, &Reason,
END_OF_ARGS);
MiniportMMRequest(pAd, 0, pOutBuffer, FrameLen);
kfree(pOutBuffer);
}
开发者ID:ulli-kroll,项目名称:mt7612u,代码行数:61,代码来源:ap_auth.c
注:本文中的MiniportMMRequest函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论