本文整理汇总了C++中INFRA_ON函数的典型用法代码示例。如果您正苦于以下问题:C++ INFRA_ON函数的具体用法?C++ INFRA_ON怎么用?C++ INFRA_ON使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了INFRA_ON函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: StaAllowToSendPacket
static BOOLEAN StaAllowToSendPacket(RTMP_ADAPTER *pAd, struct wifi_dev *wdev,
PNDIS_PACKET pPacket, UCHAR *pWcid)
{
BOOLEAN allowToSend;
if (!INFRA_ON(pAd) && !ADHOC_ON(pAd)) {
return FALSE;
} else {
if (ADHOC_ON(pAd)) {
RTMP_SET_PACKET_WCID(pPacket, MCAST_WCID);
}
if (INFRA_ON(pAd) && (0)) {
MAC_TABLE_ENTRY *pEntry;
PUCHAR pSrcBufVA = GET_OS_PKT_DATAPTR(pPacket);
pEntry = MacTableLookup(pAd, pSrcBufVA);
if (pEntry && (IS_ENTRY_DLS(pEntry))) {
*pWcid = pEntry->wcid;
} else {
*pWcid = 0;
}
} else {
*pWcid = 0;
}
allowToSend = TRUE;
}
return allowToSend;
}
开发者ID:BenMueller,项目名称:netgear-a6210-driver-dkms,代码行数:30,代码来源:sta.c
示例2: TDLS_MlmeChannelSwitchRspAction
/*
==========================================================================
Description:
IRQL = PASSIVE_LEVEL
==========================================================================
*/
VOID
TDLS_MlmeChannelSwitchRspAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
PMLME_TDLS_CH_SWITCH_STRUCT pMlmeChSwitchRsp = NULL;
NDIS_STATUS NStatus = NDIS_STATUS_SUCCESS;
PRT_802_11_TDLS pTdls = NULL;
int LinkId = 0xff;
DBGPRINT(RT_DEBUG_WARN,("TDLS ===> TDLS_MlmeChannelSwitchRspAction() \n"));
pMlmeChSwitchRsp = (PMLME_TDLS_CH_SWITCH_STRUCT)Elem->Msg;
if (INFRA_ON(pAd))
{
// Drop not within my TDLS Table that created before !
LinkId = TDLS_SearchLinkId(pAd, pMlmeChSwitchRsp->PeerMacAddr);
if (LinkId == -1 || LinkId == MAX_NUM_OF_TDLS_ENTRY)
{
DBGPRINT(RT_DEBUG_OFF,("TDLS - TDLS_MlmeChannelSwitchRspAction() can not find the LinkId!\n"));
return;
}
/* Point to the current Link ID */
pTdls = &pAd->StaCfg.TdlsInfo.TDLSEntry[LinkId];
/* Build TDLS channel switch Request Frame */
NStatus = TDLS_ChannelSwitchRspAction(pAd, pTdls, pTdls->ChSwitchTime, pTdls->ChSwitchTimeout, 0, (RTMP_TDLS_SPECIFIC_CS_RSP_NOACK + RTMP_TDLS_SPECIFIC_HCCA));
if (NStatus != NDIS_STATUS_SUCCESS)
{
DBGPRINT(RT_DEBUG_ERROR,("TDLS - TDLS_MlmeChannelSwitchRspAction() Build Channel Switch Response Fail !!!\n"));
}
else
{
RTMPusecDelay(300);
NdisGetSystemUpTime(&pAd->StaCfg.TdlsGoBackStartTime);
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_TDLS_DOING_CHANNEL_SWITCH);
if (pAd->CommonCfg.CentralChannel > pAd->CommonCfg.Channel)
TDLS_InitChannelRelatedValue(pAd, pAd->CommonCfg.Channel, EXTCHA_ABOVE);
else if (pAd->CommonCfg.CentralChannel < pAd->CommonCfg.Channel)
TDLS_InitChannelRelatedValue(pAd, pAd->CommonCfg.Channel, EXTCHA_BELOW);
else
TDLS_InitChannelRelatedValue(pAd, pAd->CommonCfg.Channel, EXTCHA_NONE);
TDLS_EnablePktChannel(pAd, TDLS_FIFO_ALL);
RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_TDLS_DOING_CHANNEL_SWITCH);
DBGPRINT(RT_DEBUG_WARN,("TDLS <=== TDLS_MlmeChannelSwitchRspAction() \n"));
}
}
else
{
DBGPRINT(RT_DEBUG_ERROR,("TDLS - TDLS_MlmeChannelSwitchRspAction() TDLS only support infra mode !!!\n"));
}
return;
}
开发者ID:vision8520,项目名称:kernel-amlogic-mx,代码行数:67,代码来源:tdls_chswitch_mng.c
示例3: MeshCtrlMcsTimeoutAction
static VOID
MeshCtrlMcsTimeoutAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
MESH_CTRL_STATE *pCurrState = &(pAd->MeshTab.CtrlCurrentState);
DBGPRINT(RT_DEBUG_TRACE, ("%s: Get Mcs evt when UCG.\n", __FUNCTION__));
if (!INFRA_ON(pAd) && !ADHOC_ON(pAd))
{
/*SET_MESH_CHANNEL(pAd); */
pAd->CommonCfg.Channel = pAd->MeshTab.MeshChannel;
#ifdef DOT11_N_SUPPORT
N_ChannelCheck(pAd);
#endif /* DOT11_N_SUPPORT */
AsicSwitchChannel(pAd, pAd->CommonCfg.CentralChannel, FALSE);
AsicLockChannel(pAd, pAd->CommonCfg.CentralChannel);
pAd->MeshTab.CPI = pAd->MeshTab.NewCPI;
}
else
pAd->MeshTab.MeshChannel = pAd->CommonCfg.Channel;
RTMPSetTimer(&pAd->MeshTab.PldTimer, PLD_TIME);
*pCurrState = MESH_CTRL_ACTIVATED;
}
开发者ID:23171580,项目名称:ralink,代码行数:29,代码来源:mesh_ctrl.c
示例4: CFG80211_ApStaDel
INT CFG80211_ApStaDel(
IN VOID *pAdCB,
IN UCHAR *pMac)
{
PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdCB;
MAC_TABLE_ENTRY *pEntry;
if (pMac == NULL)
{
#ifdef RT_CFG80211_P2P_CONCURRENT_DEVICE
/* From WCID=2 */
if (INFRA_ON(pAd))
;//P2PMacTableReset(pAd);
else
#endif /* RT_CFG80211_P2P_CONCURRENT_DEVICE */
MacTableReset(pAd);
}
else
{
pEntry = MacTableLookup(pAd, pMac);
if (pEntry)
{
MlmeDeAuthAction(pAd, pEntry, REASON_NO_LONGER_VALID, FALSE);
}
else
DBGPRINT(RT_DEBUG_ERROR, ("Can't find pEntry in ApStaDel\n"));
}
}
开发者ID:23171580,项目名称:ralink,代码行数:28,代码来源:cfg80211_ap.c
示例5: CFG80211_VirtualIF_Close
static INT CFG80211_VirtualIF_Close(struct net_device *dev_p)
{
struct rtmp_adapter *pAd;
pAd = RTMP_OS_NETDEV_GET_PRIV(dev_p);
ASSERT(pAd);
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
RTMP_OS_NETDEV_STOP_QUEUE(dev_p);
if (netif_carrier_ok(dev_p))
netif_carrier_off(dev_p);
#ifdef CONFIG_STA_SUPPORT
if (INFRA_ON(pAd))
AsicEnableBssSync(pAd);
else if (ADHOC_ON(pAd))
AsicEnableIbssSync(pAd);
#else
else
AsicDisableSync(pAd);
#endif
//VIRTUAL_IF_DOWN(pAd);
RT_MOD_DEC_USE_COUNT();
return 0;
}
开发者ID:ulli-kroll,项目名称:mt7612u,代码行数:29,代码来源:cfg80211_inf.c
示例6: CFG80211DRV_DisableApInterface
VOID CFG80211DRV_DisableApInterface(PRTMP_ADAPTER pAd)
{
/*CFG_TODO: IT Should be set fRTMP_ADAPTER_HALT_IN_PROGRESS */
MULTISSID_STRUCT *pMbss = &pAd->ApCfg.MBSSID[MAIN_MBSSID];
struct wifi_dev *wdev = &pMbss->wdev;
pAd->ApCfg.MBSSID[MAIN_MBSSID].bBcnSntReq = FALSE;
wdev->Hostapd = Hostapd_Diable;
/* For AP - STA switch */
if (pAd->CommonCfg.BBPCurrentBW != BW_40)
{
CFG80211DBG(RT_DEBUG_TRACE, ("80211> %s, switch to BW_20\n", __FUNCTION__));
bbp_set_bw(pAd, BW_20);
}
/* Disable pre-TBTT interrupt */
AsicSetPreTbtt(pAd, FALSE);
if (!INFRA_ON(pAd))
{
/* Disable piggyback */
RTMPSetPiggyBack(pAd, FALSE);
AsicUpdateProtect(pAd, 0, (ALLN_SETPROTECT|CCKSETPROTECT|OFDMSETPROTECT), TRUE, FALSE);
}
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))
{
AsicDisableSync(pAd);
}
OPSTATUS_CLEAR_FLAG(pAd, fOP_AP_STATUS_MEDIA_STATE_CONNECTED);
RTMP_IndicateMediaState(pAd, NdisMediaStateDisconnected);
}
开发者ID:23171580,项目名称:ralink,代码行数:35,代码来源:cfg80211_ap.c
示例7: 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));
pP2PCtrl->P2PConnectState = P2P_CONNECT_IDLE;
return TRUE;
}
开发者ID:aircross,项目名称:ray,代码行数:33,代码来源:p2p_dbg.c
示例8: CFG80211_ApStaDel
INT CFG80211_ApStaDel(
IN VOID *pAdCB,
IN UCHAR *pMac)
{
PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdCB;
MAC_TABLE_ENTRY *pEntry;
// INT startWcid = 1;
if (pMac == NULL)
{
#ifdef RT_CFG80211_P2P_CONCURRENT_DEVICE
/* From WCID=2 */
if (INFRA_ON(pAd))
startWcid = 2;
#endif /* RT_CFG80211_P2P_CONCURRENT_DEVICE */
MacTableReset(pAd);
}
else
{
pEntry = MacTableLookup(pAd, pMac);
if (pEntry)
{
MlmeDeAuthAction(pAd, pEntry, REASON_NO_LONGER_VALID, FALSE);
}
else
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_ERROR,("Can't find pEntry(%02x:%02x:%02x:%02x:%02x:%02x) in ApStaDel\n",
PRINT_MAC(pMac)));
}
return 0;
}
开发者ID:23171580,项目名称:ralink,代码行数:31,代码来源:cfg80211_ap.c
示例9: PeerDeauthAction
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
VOID PeerDeauthAction(
IN PRTMP_ADAPTER pAd,
IN PMLME_QUEUE_ELEM Elem)
{
UCHAR Addr2[MAC_ADDR_LEN];
USHORT Reason;
if (PeerDeauthSanity(pAd, Elem->Msg, Elem->MsgLen, Addr2, &Reason))
{
if (INFRA_ON(pAd)
&& MAC_ADDR_EQUAL(Addr2, pAd->CommonCfg.Bssid)
)
{
DBGPRINT(RT_DEBUG_TRACE,("AUTH_RSP - receive DE-AUTH from our AP (Reason=%d)\n", Reason));
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
RtmpOSWrielessEventSend(pAd, SIOCGIWAP, -1, NULL, NULL, 0);
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
// send wireless event - for deauthentication
if (pAd->CommonCfg.bWirelessEvent)
RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0);
LinkDown(pAd, TRUE);
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE,("AUTH_RSP - PeerDeauthAction() sanity check fail\n"));
}
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:41,代码来源:auth_rsp.c
示例10: BAOriSessionSetupTimeout
/*
==========================================================================
Description:
Retry sending ADDBA Reqest.
IRQL = DISPATCH_LEVEL
Parametrs:
p8023Header: if this is already 802.3 format, p8023Header is NULL
Return : TRUE if put into rx reordering buffer, shouldn't indicaterxhere.
FALSE , then continue indicaterx at this moment.
==========================================================================
*/
VOID BAOriSessionSetupTimeout(
IN PVOID SystemSpecific1,
IN PVOID FunctionContext,
IN PVOID SystemSpecific2,
IN PVOID SystemSpecific3)
{
BA_ORI_ENTRY *pBAEntry = (BA_ORI_ENTRY *)FunctionContext;
MAC_TABLE_ENTRY *pEntry;
PRTMP_ADAPTER pAd;
if (pBAEntry == NULL)
return;
pAd = pBAEntry->pAdapter;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
/* Do nothing if monitor mode is on*/
if (MONITOR_ON(pAd))
return;
}
#endif /* CONFIG_STA_SUPPORT */
pEntry = &pAd->MacTab.Content[pBAEntry->Wcid];
if ((pBAEntry->ORI_BA_Status == Originator_WaitRes) && (pBAEntry->Token < ORI_SESSION_MAX_RETRY))
{
MLME_ADDBA_REQ_STRUCT AddbaReq;
#ifdef CONFIG_STA_SUPPORT
IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
{
if (INFRA_ON(pAd) &&
RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS) &&
(OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)))
{
/* In scan progress and have no chance to send out, just re-schedule to another time period */
RTMPSetTimer(&pBAEntry->ORIBATimer, ORI_BA_SESSION_TIMEOUT);
return;
}
}
#endif /* CONFIG_STA_SUPPORT */
NdisZeroMemory(&AddbaReq, sizeof(AddbaReq));
COPY_MAC_ADDR(AddbaReq.pAddr, pEntry->Addr);
AddbaReq.Wcid = (UCHAR)(pEntry->Aid);
AddbaReq.TID = pBAEntry->TID;
AddbaReq.BaBufSize = pAd->CommonCfg.BACapability.field.RxBAWinLimit;
AddbaReq.TimeOutValue = 0;
AddbaReq.Token = pBAEntry->Token;
MlmeEnqueue(pAd, ACTION_STATE_MACHINE, MT2_MLME_ADD_BA_CATE, sizeof(MLME_ADDBA_REQ_STRUCT), (PVOID)&AddbaReq, 0);
RTMP_MLME_HANDLER(pAd);
DBGPRINT(RT_DEBUG_TRACE,("BA Ori Session Timeout(%d) : Send ADD BA again\n", pBAEntry->Token));
pBAEntry->Token++;
RTMPSetTimer(&pBAEntry->ORIBATimer, ORI_BA_SESSION_TIMEOUT);
}
开发者ID:1950packard,项目名称:rt3573sta,代码行数:73,代码来源:ba_action.c
示例11: TDLS_UAPSD_PeerTrafficIndAction
/*
========================================================================
Routine Description:
Receive a traffic indication frame.
Arguments:
pAd - WLAN control block pointer
pElem - the frame information
Return Value:
None
Note:
========================================================================
*/
static VOID TDLS_UAPSD_PeerTrafficIndAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *pElem)
{
UCHAR Token;
UCHAR PeerAddr[6];
UCHAR PeerAddr1[6];
ULONG OffsetPuBuff;
INT LinkId = 0xff;
PRT_802_11_TDLS pTDLS = NULL;
PFRAME_802_11 pFrame = (PFRAME_802_11)pElem->Msg;
DBGPRINT(RT_DEBUG_TRACE, ("tdls uapsd> ====> %s\n", __FUNCTION__));
/* Not TDLS Capable, ignore it */
if (!IS_TDLS_SUPPORT(pAd))
return;
/* Not BSS mode, ignore it */
if (!INFRA_ON(pAd))
return;
hex_dump("TDLS UAPSD Peer Traffic Ind receive pack", pElem->Msg, pElem->MsgLen);
/* sanity check */
if (TDLS_UAPSD_ARE_WE_IN_ACTIVE(pAd))
return; /* we are not in power-save mode */
COPY_MAC_ADDR(PeerAddr, &pFrame->Hdr.Addr3);
// Drop not within my TDLS Table that created before !
LinkId = TDLS_SearchLinkId(pAd, PeerAddr);
if (LinkId == -1 || LinkId == MAX_NUM_OF_TDLS_ENTRY)
{
DBGPRINT(RT_DEBUG_ERROR,("TDLS - TDLS_UAPSD_PeerTrafficIndAction() can not find the LinkId!\n"));
return;
}
// Point to the current Link ID
pTDLS = (PRT_802_11_TDLS)&pAd->StaCfg.TdlsInfo.TDLSEntry[LinkId];
OffsetPuBuff = PeerTdlsBasicSanity(pAd,
pElem->Msg,
pElem->MsgLen,
pTDLS->bInitiator,
&Token,
PeerAddr1);
if (OffsetPuBuff <= 0)
return;
/* hex_dump("PeerAddr=", PeerAddr, 6); */
DBGPRINT(RT_DEBUG_ERROR, ("tdls uapsd> PU Buffer Status = 0x%x\n",
pElem->Msg[OffsetPuBuff+2])); /* 2: skip ID and length field */
/* reply a response frame with UP = 5 */
/* for TDLS UAPSD, all AC will be UAPSD mode */
TDLS_UAPSD_TrafficRspSend(pAd, PeerAddr, Token);
}
开发者ID:2421,项目名称:mt7601u_driver_linux,代码行数:72,代码来源:tdls_uapsd.c
示例12: PeerDeauthAction
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
void PeerDeauthAction(
IN struct rtmp_adapter *pAd,
IN PMLME_QUEUE_ELEM Elem)
{
u8 Addr1[ETH_ALEN];
u8 Addr2[ETH_ALEN];
u8 Addr3[ETH_ALEN];
USHORT Reason;
bool bDoIterate = false;
if (PeerDeauthSanity
(pAd, Elem->Msg, Elem->MsgLen, Addr1, Addr2, Addr3, &Reason)) {
if (INFRA_ON(pAd)
&& (MAC_ADDR_EQUAL(Addr1, pAd->CurrentAddress)
|| MAC_ADDR_EQUAL(Addr1, BROADCAST_ADDR))
&& MAC_ADDR_EQUAL(Addr2, pAd->CommonCfg.Bssid)
&& MAC_ADDR_EQUAL(Addr3, pAd->CommonCfg.Bssid)
) {
DBGPRINT(RT_DEBUG_TRACE,
("AUTH_RSP - receive DE-AUTH from our AP (Reason=%d)\n",
Reason));
#ifdef WPA_SUPPLICANT_SUPPORT
if ((pAd->StaCfg.WpaSupplicantUP !=
WPA_SUPPLICANT_DISABLE)
&& (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2)
&& (pAd->StaCfg.PortSecured ==
WPA_802_1X_PORT_SECURED))
pAd->StaCfg.bLostAp = true;
#endif /* WPA_SUPPLICANT_SUPPORT */
/*
Some customer would set AP1 & AP2 same SSID, AuthMode & EncrypType but different WPAPSK,
therefore we need to do iterate here.
*/
if ((pAd->StaCfg.PortSecured ==
WPA_802_1X_PORT_NOT_SECURED)
&&
((pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK)
|| (pAd->StaCfg.AuthMode ==
Ndis802_11AuthModeWPA2PSK))
)
bDoIterate = true;
LinkDown(pAd, true);
if (bDoIterate) {
pAd->MlmeAux.BssIdx++;
IterateOnBssTab(pAd);
}
}
} else {
DBGPRINT(RT_DEBUG_TRACE,
("AUTH_RSP - PeerDeauthAction() sanity check fail\n"));
}
}
开发者ID:ulli-kroll,项目名称:mt7610u,代码行数:65,代码来源:auth_rsp.c
示例13: PeerDisassocAction
/*
==========================================================================
Description:
left part of IEEE 802.11/1999 p.374
Parameters:
Elem - MLME message containing the received frame
==========================================================================
*/
VOID PeerDisassocAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
UCHAR Addr2[MAC_ADDR_LEN];
USHORT Reason;
#ifdef RALINK_WPA_SUPPLICANT_SUPPORT
union iwreq_data wrqu;
#endif
if(PeerDisassocSanity(pAd, Elem->Msg, Elem->MsgLen, Addr2, &Reason))
{
if (INFRA_ON(pAd) && MAC_ADDR_EQUAL(pAd->PortCfg.Bssid, Addr2))
{
LinkDown(pAd, TRUE);
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
#ifdef RALINK_WPA_SUPPLICANT_SUPPORT
if (pAd->PortCfg.WPA_Supplicant == TRUE)
{
// send disassoc event to wpa_supplicant
memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.flags = RT_DISASSOC_EVENT_FLAG;
wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
}
#endif
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
if (pAd->PortCfg.bNativeWpa == TRUE) // add by johnli
wext_notify_event_assoc(pAd, SIOCGIWAP, FALSE);
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT
#if 0
// 2004-09-11 john: can't remember why AP will DISASSOCIATE us.
// But since it says for 2430 only, we temporaily remove the patch.
// 2002/11/21 -
// patch RT2430/RT2420 hangup issue. We suspect this AP DIS-ASSOCIATE frame
// is caused by PHY hangup, so we reset PHY, then auto recover the connection.
// if this attempt fails, then remains in LinkDown and leaves the problem
// to MlmePeriodicExec()
// NICPatchRT2430Bug(pAd);
pAd->RalinkCounters.BeenDisassociatedCount ++;
// Remove auto recover effort when disassociate by AP, re-enable for patch 2430 only
DBGPRINT(RT_DEBUG_TRACE, "ASSOC - Disassociated by AP, Auto Recovery attempt #%d\n", pAd->RalinkCounters.BeenDisassociatedCount);
MlmeAutoReconnectLastSSID(pAd);
#endif
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE, "ASSOC - PeerDisassocAction() sanity check fail\n");
}
}
开发者ID:cnm,项目名称:mia_vita,代码行数:63,代码来源:assoc.c
示例14: PeerDeauthAction
/*
==========================================================================
Description:
IRQL = DISPATCH_LEVEL
==========================================================================
*/
VOID PeerDeauthAction(
IN PRTMP_ADAPTER pAd,
IN PMLME_QUEUE_ELEM Elem)
{
UCHAR Addr2[MAC_ADDR_LEN];
USHORT Reason;
if (PeerDeauthSanity(pAd, Elem->Msg, Elem->MsgLen, Addr2, &Reason))
{
if (INFRA_ON(pAd) && MAC_ADDR_EQUAL(Addr2, pAd->CommonCfg.Bssid))
{
DBGPRINT(RT_DEBUG_TRACE,("AUTH_RSP - receive DE-AUTH from our AP (Reason=%d)\n", Reason));
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
{
union iwreq_data wrqu;
memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
}
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
// send wireless event - for deauthentication
if (pAd->CommonCfg.bWirelessEvent)
RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0);
LinkDown(pAd, TRUE);
// Authentication Mode Cisco_LEAP has start a timer
// We should cancel it if using LEAP
#ifdef LEAP_SUPPORT
if (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
{
RTMPCancelTimer(&pAd->StaCfg.LeapAuthTimer, &TimerCancelled);
//Check is it mach the LEAP Authentication failed as possible a Rogue AP
//on it's PortSecured not equal to WPA_802_1X_PORT_SECURED while process the Authenticaton.
if ((pAd->StaCfg.PortSecured != WPA_802_1X_PORT_SECURED) && (pAd->Mlme.LeapMachine.CurrState != LEAP_IDLE))
{
RogueApTableSetEntry(pAd, &pAd->StaCfg.RogueApTab, Addr2, LEAP_REASON_AUTH_TIMEOUT);
}
}
#endif // LEAP_SUPPORT //
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE,("AUTH_RSP - PeerDeauthAction() sanity check fail\n"));
}
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:57,代码来源:auth_rsp.c
示例15: CFG80211_VirtualIF_Close
static INT CFG80211_VirtualIF_Close(PNET_DEV dev_p)
{
VOID *pAdSrc;
pAdSrc = RTMP_OS_NETDEV_GET_PRIV(dev_p);
ASSERT(pAdSrc);
PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdSrc;
#ifdef RT_CFG80211_P2P_SUPPORT
if (dev_p->ieee80211_ptr->iftype == RT_CMD_80211_IFTYPE_P2P_CLIENT)
{
DBGPRINT(RT_DEBUG_TRACE, ("CFG80211_VirtualIF_Close\n"));
CFG80211OS_ScanEnd(pAd->pCfg80211_CB, TRUE);
RT_MOD_DEC_USE_COUNT();
return ApCli_Close(pAd, dev_p);
}
#endif /* RT_CFG80211_P2P_SUPPORT */
#ifdef CONFIG_SNIFFER_SUPPORT
#ifdef CONFIG_AP_SUPPORT
if(dev_p->ieee80211_ptr->iftype == RT_CMD_80211_IFTYPE_MONITOR)
{
pAd->ApCfg.BssType = BSS_INFRA;
AsicSetRxFilter(pAd);
}
#endif /*CONFIG_AP_SUPPORT*/
#endif /*CONFIG_SNIFFER_SUPPORT*/
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
RTMP_OS_NETDEV_STOP_QUEUE(dev_p);
if (netif_carrier_ok(dev_p))
netif_carrier_off(dev_p);
#ifdef CONFIG_STA_SUPPORT
if (INFRA_ON(pAd))
AsicEnableBssSync(pAd);
else if (ADHOC_ON(pAd))
AsicEnableIbssSync(pAd);
#else
else
AsicDisableSync(pAd);
#endif
//VIRTUAL_IF_DOWN(pAd);
RT_MOD_DEC_USE_COUNT();
return 0;
}
开发者ID:pierce1234,项目名称:rt-n56u,代码行数:48,代码来源:cfg80211_inf.c
示例16: CFG80211DRV_DisableApInterface
VOID CFG80211DRV_DisableApInterface(PRTMP_ADAPTER pAd)
{
#ifdef RT_CFG80211_P2P_SUPPORT
UINT apidx = CFG_GO_BSSID_IDX;
#else
UINT apidx = MAIN_MBSSID;
#endif /* RT_CFG80211_P2P_SUPPORT */
// INT startWcid = 1;
/*CFG_TODO: IT Should be set fRTMP_ADAPTER_HALT_IN_PROGRESS */
pAd->ApCfg.MBSSID[apidx].bcn_buf.bBcnSntReq = FALSE;
/* For AP - STA switch */
if (pAd->CommonCfg.BBPCurrentBW != BW_40)
{
CFG80211DBG(DBG_LVL_TRACE, ("80211> %s, switch to BW_20\n", __FUNCTION__));
bbp_set_bw(pAd, BW_20);
}
/* Disable pre-TBTT interrupt */
AsicSetPreTbtt(pAd, FALSE);
if (!INFRA_ON(pAd))
{
/* Disable piggyback */
AsicSetPiggyBack(pAd, FALSE);
AsicUpdateProtect(pAd, 0, (ALLN_SETPROTECT|CCKSETPROTECT|OFDMSETPROTECT), TRUE, FALSE);
}
if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))
{
AsicDisableSync(pAd);
}
MacTableReset(pAd);
OPSTATUS_CLEAR_FLAG(pAd, fOP_AP_STATUS_MEDIA_STATE_CONNECTED);
RTMP_IndicateMediaState(pAd, NdisMediaStateDisconnected);
#ifdef CONFIG_STA_SUPPORT
#ifdef P2P_SINGLE_DEVICE
/* re-assoc to STA's wdev */
RTMP_OS_NETDEV_SET_WDEV(pAd->net_dev, &pAd->StaCfg.wdev);
#endif /* P2P_SINGLE_DEVICE */
#endif /*CONFIG_STA_SUPPORT*/
}
开发者ID:23171580,项目名称:ralink,代码行数:47,代码来源:cfg80211_ap.c
示例17: CFG80211_VirtualIF_Close
static INT CFG80211_VirtualIF_Close(PNET_DEV dev_p)
{
VOID *pAdSrc;
pAdSrc = RTMP_OS_NETDEV_GET_PRIV(dev_p);
ASSERT(pAdSrc);
PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdSrc;
if ((dev_p->ieee80211_ptr->iftype == RT_CMD_80211_IFTYPE_P2P_CLIENT)
#ifdef CFG80211_MULTI_STA
|| (dev_p->ieee80211_ptr->iftype == RT_CMD_80211_IFTYPE_STATION)
#endif /* CFG80211_MULTI_STA */
)
{
DBGPRINT(RT_DEBUG_TRACE, ("CFG80211_VirtualIF_Close\n"));
CFG80211OS_ScanEnd(pAd->pCfg80211_CB, TRUE);
if (pAd->cfg80211_ctrl.FlgCfg80211Scanning)
pAd->cfg80211_ctrl.FlgCfg80211Scanning = FALSE;
RT_MOD_DEC_USE_COUNT();
return ApCli_Close(pAd, dev_p);
}
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
RTMP_OS_NETDEV_STOP_QUEUE(dev_p);
if (netif_carrier_ok(dev_p))
netif_carrier_off(dev_p);
if (INFRA_ON(pAd))
AsicEnableBssSync(pAd, pAd->CommonCfg.BeaconPeriod);
else if (ADHOC_ON(pAd))
AsicEnableIbssSync(pAd);
else
AsicDisableSync(pAd);
//VIRTUAL_IF_DOWN(pAd);
RT_MOD_DEC_USE_COUNT();
return 0;
}
开发者ID:eager7,项目名称:linux-kernel,代码行数:42,代码来源:cfg80211_inf.c
示例18: PeerDeauthAction
/*
==========================================================================
Description:
==========================================================================
*/
VOID PeerDeauthAction(
IN PRTMP_ADAPTER pAd,
IN PMLME_QUEUE_ELEM Elem)
{
UCHAR Addr2[MAC_ADDR_LEN];
USHORT Reason;
if (PeerDeauthSanity(pAd, Elem->Msg, Elem->MsgLen, Addr2, &Reason))
{
if (INFRA_ON(pAd) && MAC_ADDR_EQUAL(Addr2, &pAd->PortCfg.Bssid))
{
DBGPRINT(RT_DEBUG_TRACE,"AUTH_RSP - receive DE-AUTH from our AP\n");
LinkDown(pAd, TRUE);
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE,"AUTH_RSP - PeerDeauthAction() sanity check fail\n");
}
}
开发者ID:ksx4system,项目名称:puspus,代码行数:25,代码来源:auth_rsp.c
示例19: P2PDiscCanlAction
static VOID P2PDiscCanlAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
P2P_DISC_STATE *pCurrState = &(pAd->P2pCfg.DiscCurrentState);
PRT_P2P_CONFIG pP2PCtrl = &pAd->P2pCfg;
UCHAR channel = pP2PCtrl->ListenChannel;
UCHAR p2pindex;
BOOLEAN bGoBack = TRUE;
/*
Go back to working channel
*/
if (INFRA_ON(pAd) || (pAd->flg_p2p_OpStatusFlags != P2P_DISABLE))
{
if ((pAd->CommonCfg.Channel != pAd->CommonCfg.CentralChannel) && (pAd->CommonCfg.BBPCurrentBW == BW_40))
channel = pAd->CommonCfg.CentralChannel;
else
channel = pAd->CommonCfg.Channel;
}
p2pindex = P2pGroupTabSearch(pAd, pAd->P2pCfg.ConnectingMAC);
if (p2pindex != P2P_NOT_FOUND)
{
if (pAd->P2pTable.Client[p2pindex].P2pClientState > P2PSTATE_DISCOVERY_UNKNOWN)
bGoBack = FALSE;
}
if (bGoBack && (channel != pAd->LatchRfRegs.Channel))
{
if (pAd->CommonCfg.BBPCurrentBW == BW_40)
rtmp_bbp_set_bw(pAd, BW_40);
AsicSwitchChannel(pAd, channel, FALSE);
AsicLockChannel(pAd, channel);
DBGPRINT(RT_DEBUG_TRACE, ("P2PDiscCanlAction - Restore to channel %d\n",channel));
}
*pCurrState = P2P_DISC_IDLE;
}
开发者ID:kuscsik,项目名称:Archer_T2U,代码行数:41,代码来源:p2p_disc_mng.c
示例20: CFG80211_SwitchTxChannel
VOID CFG80211_SwitchTxChannel(RTMP_ADAPTER *pAd, ULONG Data)
{
//UCHAR lock_channel = CFG80211_getCenCh(pAd, Data);
BSS_STRUCT *pMbss = &pAd->ApCfg.MBSSID[MAIN_MBSSID];
struct wifi_dev *wdev = &pMbss->wdev;
UCHAR lock_channel = Data;
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_INFO,("%s\n", __FUNCTION__));
if(wdev->Hostapd == Hostapd_CFG && pAd->CommonCfg.BBPCurrentBW != BW_20)
return;
#ifdef RT_CFG80211_P2P_CONCURRENT_DEVICE
pMbss = &pAd->ApCfg.MBSSID[CFG_GO_BSSID_IDX];
wdev = &pMbss->wdev;
if(pAd->Mlme.bStartScc == TRUE)
{
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("SCC Enabled, Do not switch channel for Tx %d\n",lock_channel));
return;
}
#endif /*RT_CFG80211_P2P_CONCURRENT_DEVICE */
if ( pAd->LatchRfRegs.Channel != lock_channel
#ifdef CONFIG_STA_SUPPORT
|| (INFRA_ON(pAd) && (((pAd->LatchRfRegs.Channel != pAd->StaCfg.wdev.CentralChannel) && (pAd->StaCfg.wdev.CentralChannel != 0))))
#endif /* CONFIG_STA_SUPPORT */
)
{
bbp_set_bw(pAd, BW_20);
AsicSwitchChannel(pAd, lock_channel, FALSE);
AsicLockChannel(pAd, lock_channel);
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_INFO, ("Off-Channel Send Packet: From(%d)-To(%d)\n",
pAd->LatchRfRegs.Channel, lock_channel));
}
else
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_INFO, ("Off-Channel Channel Equal: %d\n", pAd->LatchRfRegs.Channel));
}
开发者ID:andy-padavan,项目名称:rt-n56u,代码行数:41,代码来源:cfg80211_tx.c
注:本文中的INFRA_ON函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论