本文整理汇总了C++中RTMP_OS_NETDEV_GET_DEVNAME函数的典型用法代码示例。如果您正苦于以下问题:C++ RTMP_OS_NETDEV_GET_DEVNAME函数的具体用法?C++ RTMP_OS_NETDEV_GET_DEVNAME怎么用?C++ RTMP_OS_NETDEV_GET_DEVNAME使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RTMP_OS_NETDEV_GET_DEVNAME函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: P2P_VirtualIF_Open
/*
========================================================================
Routine Description:
Open a virtual network interface.
Arguments:
dev_p which WLAN network interface
Return Value:
0: open successfully
otherwise: open fail
Note:
========================================================================
*/
int P2P_VirtualIF_Open(
IN PNET_DEV dev_p)
{
VOID *pAd;
/*PMULTISSID_STRUCT pMbss; */
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)));
if (RTMP_COM_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_P2P_OPEN_PRE, 0,
dev_p, 0) != NDIS_STATUS_SUCCESS)
return -1;
if (VIRTUAL_IF_UP(pAd) != 0)
return -1;
/* increase MODULE use count */
RT_MOD_INC_USE_COUNT();
RTMP_OS_NETDEV_START_QUEUE(dev_p);
if (RTMP_COM_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_P2P_OPEN_POST, 0,
dev_p, 0) != NDIS_STATUS_SUCCESS)
return -1;
DBGPRINT(RT_DEBUG_TRACE, ("%s: <=== %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
return 0;
}
示例2: RtmpMgmtTaskInit
/*
========================================================================
Routine Description:
Create kernel threads & tasklets.
Arguments:
*net_dev Pointer to wireless net device interface
Return Value:
NDIS_STATUS_SUCCESS
NDIS_STATUS_FAILURE
Note:
========================================================================
*/
NDIS_STATUS RtmpMgmtTaskInit(RTMP_ADAPTER *pAd)
{
RTMP_OS_TASK *pTask;
NDIS_STATUS status;
/*
Create TimerQ Thread, We need init timerQ related structure
before create the timer thread.
*/
RtmpTimerQInit(pAd);
pTask = &pAd->timerTask;
RTMP_OS_TASK_INIT(pTask, "RtmpTimerTask", pAd);
status = RtmpOSTaskAttach(pTask, RtmpTimerQThread, (ULONG)pTask);
if (status == NDIS_STATUS_FAILURE) {
printk (KERN_WARNING "%s: unable to start RtmpTimerQThread\n",
RTMP_OS_NETDEV_GET_DEVNAME(pAd->net_dev));
return NDIS_STATUS_FAILURE;
}
/* Creat Command Thread */
pTask = &pAd->cmdQTask;
RTMP_OS_TASK_INIT(pTask, "RtmpCmdQTask", pAd);
status = RtmpOSTaskAttach(pTask, RTUSBCmdThread, (ULONG)pTask);
if (status == NDIS_STATUS_FAILURE) {
printk (KERN_WARNING "%s: unable to start RTUSBCmdThread\n",
RTMP_OS_NETDEV_GET_DEVNAME(pAd->net_dev));
return NDIS_STATUS_FAILURE;
}
return NDIS_STATUS_SUCCESS;
}
示例3: CFG80211_VirtualIF_Open
static INT CFG80211_VirtualIF_Open(PNET_DEV dev_p)
{
VOID *pAdSrc;
pAdSrc = RTMP_OS_NETDEV_GET_PRIV(dev_p);
ASSERT(pAdSrc);
PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdSrc;
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> %d,%s\n", __FUNCTION__, dev_p->ifindex,
RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
//if (VIRTUAL_IF_UP(pAd) != 0)
// return -1;
/* increase MODULE use count */
RT_MOD_INC_USE_COUNT();
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_Open\n"));
pAd->flg_apcli_init = TRUE;
ApCli_Open(pAd, dev_p);
return 0;
}
RTMP_OS_NETDEV_START_QUEUE(dev_p);
DBGPRINT(RT_DEBUG_TRACE, ("%s: <=== %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
return 0;
}
示例4: CFG80211_VirtualIF_Open
static int CFG80211_VirtualIF_Open(PNET_DEV dev_p) {
void *pAdSrc;
PRTMP_ADAPTER pAd;
pAdSrc = RtmpOsGetNetDevPriv(dev_p);
ASSERT(pAdSrc);
pAd = (PRTMP_ADAPTER)pAdSrc;
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> %d,%s\n", __FUNCTION__,
dev_p->ifindex, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
//if (VIRTUAL_IF_UP(pAd) != 0)
// return -1;
/* increase MODULE use count */
RT_MOD_INC_USE_COUNT();
#ifdef RT_CFG80211_P2P_SUPPORT
if (dev_p->ieee80211_ptr->iftype == RT_CMD_80211_IFTYPE_P2P_CLIENT) {
DBGPRINT(RT_DEBUG_TRACE, ("CFG80211_VirtualIF_Open\n"));
pAd->flg_apcli_init = TRUE;
ApCli_Open(pAd, dev_p);
return 0;
}
#endif /* RT_CFG80211_P2P_SUPPORT */
RTMP_OS_NETDEV_START_QUEUE(dev_p);
DBGPRINT(RT_DEBUG_TRACE, ("%s: <=== %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
return 0;
}
示例5: RtmpMgmtTaskInit
/*
========================================================================
Routine Description:
Create kernel threads & tasklets.
Arguments:
*net_dev Pointer to wireless net device interface
Return Value:
NDIS_STATUS_SUCCESS
NDIS_STATUS_FAILURE
Note:
========================================================================
*/
NDIS_STATUS RtmpMgmtTaskInit(
IN RTMP_ADAPTER *pAd)
{
RTMP_OS_TASK *pTask;
NDIS_STATUS status;
/*
Creat TimerQ Thread, We need init timerQ related structure before create the timer thread.
*/
RtmpTimerQInit(pAd);
pTask = &pAd->timerTask;
RTMP_OS_TASK_INIT(pTask, "rtmp_timer_task", pAd);
status = RtmpOSTaskAttach(pTask, RtmpTimerQThread, (ULONG)pTask);
if (status == NDIS_STATUS_FAILURE)
{
#ifdef DBG
printk(KERN_WARNING "%s: unable to start RtmpTimerQThread\n", RTMP_OS_NETDEV_GET_DEVNAME(pAd->net_dev));
#endif /* DBG */
return NDIS_STATUS_FAILURE;
}
/* Creat MLME Thread */
pTask = &pAd->mlmeTask;
RTMP_OS_TASK_INIT(pTask, "rtmp_mlme_task", pAd);
status = RtmpOSTaskAttach(pTask, MlmeThread, (ULONG)pTask);
if (status == NDIS_STATUS_FAILURE)
{
#ifdef DBG
printk(KERN_WARNING "%s: unable to start MlmeThread\n", RTMP_OS_NETDEV_GET_DEVNAME(pAd->net_dev));
#endif /* DBG */
return NDIS_STATUS_FAILURE;
}
/* Creat Command Thread */
pTask = &pAd->cmdQTask;
RTMP_OS_TASK_INIT(pTask, "rtmp_cmd_qtask", pAd);
status = RtmpOSTaskAttach(pTask, RTUSBCmdThread, (ULONG)pTask);
if (status == NDIS_STATUS_FAILURE)
{
#ifdef DBG
printk(KERN_WARNING "%s: unable to start RTUSBCmdThread\n", RTMP_OS_NETDEV_GET_DEVNAME(pAd->net_dev));
#endif /* DBG */
return NDIS_STATUS_FAILURE;
}
#ifdef WSC_INCLUDED
/* start the crediential write task first. */
WscThreadInit(pAd);
#endif /* WSC_INCLUDED */
return NDIS_STATUS_SUCCESS;
}
示例6: ApCli_VirtualIF_Open
/*
========================================================================
Routine Description:
Open a virtual network interface.
Arguments:
dev_p which WLAN network interface
Return Value:
0: open successfully
otherwise: open fail
Note:
========================================================================
*/
INT ApCli_VirtualIF_Open(
IN PNET_DEV dev_p)
{
UCHAR ifIndex;
PRTMP_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)));
if (VIRTUAL_IF_UP(pAd) != 0)
return -1;
// increase MODULE use count
RT_MOD_INC_USE_COUNT();
for (ifIndex = 0; ifIndex < MAX_APCLI_NUM; ifIndex++)
{
if (pAd->ApCfg.ApCliTab[ifIndex].dev == dev_p)
{
RTMP_OS_NETDEV_START_QUEUE(dev_p);
ApCliIfUp(pAd);
}
}
return 0;
} /* End of ApCli_VirtualIF_Open */
示例7: ApCli_VirtualIF_Close
/*
========================================================================
Routine Description:
Close a virtual network interface.
Arguments:
dev_p which WLAN network interface
Return Value:
0: close successfully
otherwise: close fail
Note:
========================================================================
*/
INT ApCli_VirtualIF_Close(
IN PNET_DEV dev_p)
{
UCHAR ifIndex;
PRTMP_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)));
for (ifIndex = 0; ifIndex < MAX_APCLI_NUM; ifIndex++)
{
if (pAd->ApCfg.ApCliTab[ifIndex].dev == dev_p)
{
RTMP_OS_NETDEV_STOP_QUEUE(dev_p);
// send disconnect-req to sta State Machine.
if (pAd->ApCfg.ApCliTab[ifIndex].Enable)
{
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DISCONNECT_REQ, 0, NULL, ifIndex);
RTMP_MLME_HANDLER(pAd);
DBGPRINT(RT_DEBUG_TRACE, ("(%s) ApCli interface[%d] startdown.\n", __FUNCTION__, ifIndex));
}
break;
}
}
VIRTUAL_IF_DOWN(pAd);
RT_MOD_DEC_USE_COUNT();
return 0;
} /* End of ApCli_VirtualIF_Close */
示例8: MBSS_VirtualIF_Open
/*
========================================================================
Routine Description:
Open a virtual network interface.
Arguments:
pDev which WLAN network interface
Return Value:
0: open successfully
otherwise: open fail
Note:
========================================================================
*/
INT MBSS_VirtualIF_Open(
IN PNET_DEV pDev)
{
PRTMP_ADAPTER pAd;
INT BssId;
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> MBSSVirtualIF_open\n", RTMP_OS_NETDEV_GET_DEVNAME(pDev)));
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
BssId = RT28xx_MBSS_IdxGet(pAd, pDev);
if (BssId < 0)
return -1;
pAd->ApCfg.MBSSID[BssId].bBcnSntReq = TRUE;
if (VIRTUAL_IF_UP(pAd) != 0)
return -1;
/* increase MODULE use count */
RT_MOD_INC_USE_COUNT();
RTMP_OS_NETDEV_START_QUEUE(pDev);
return 0;
} /* End of MBSS_VirtualIF_Open */
示例9: MBSS_VirtualIF_Close
/*
========================================================================
Routine Description:
Close a virtual network interface.
Arguments:
pDev which WLAN network interface
Return Value:
0: close successfully
otherwise: close fail
Note:
========================================================================
*/
INT MBSS_VirtualIF_Close(
IN PNET_DEV pDev)
{
PRTMP_ADAPTER pAd;
INT BssId;
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> MBSSVirtualIF_close\n", RTMP_OS_NETDEV_GET_DEVNAME(pDev)));
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
BssId = RT28xx_MBSS_IdxGet(pAd, pDev);
if (BssId < 0)
return -1;
RTMP_OS_NETDEV_STOP_QUEUE(pDev);
/* kick out all stas behind the Bss */
MbssKickOutStas(pAd, BssId, REASON_DISASSOC_INACTIVE);
pAd->ApCfg.MBSSID[BssId].bBcnSntReq = FALSE;
APMakeAllBssBeacon(pAd);
APUpdateAllBeaconFrame(pAd);
VIRTUAL_IF_DOWN(pAd);
RT_MOD_DEC_USE_COUNT();
return 0;
} /* End of MBSS_VirtualIF_Close */
示例10: 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 */
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);
else
AsicDisableSync(pAd);
//VIRTUAL_IF_DOWN(pAd);
RT_MOD_DEC_USE_COUNT();
return 0;
}
示例11: 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;
}
示例12: CFG80211_VirtualIF_Open
static INT CFG80211_VirtualIF_Open(PNET_DEV dev_p)
{
VOID *pAdSrc;
pAdSrc = RTMP_OS_NETDEV_GET_PRIV(dev_p);
ASSERT(pAdSrc);
PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdSrc;
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> %d,%s\n", __FUNCTION__, dev_p->ifindex,
RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
//if (VIRTUAL_IF_UP(pAd) != 0)
// return -1;
/* increase MODULE use count */
RT_MOD_INC_USE_COUNT();
#ifdef RT_CFG80211_P2P_SUPPORT
if (dev_p->ieee80211_ptr->iftype == RT_CMD_80211_IFTYPE_P2P_CLIENT)
{
DBGPRINT(RT_DEBUG_TRACE, ("CFG80211_VirtualIF_Open\n"));
pAd->flg_apcli_init = TRUE;
ApCli_Open(pAd, dev_p);
return 0;
}
#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_MONITOR;
pAd->sniffer_ctl.sniffer_type = RADIOTAP_TYPE;
AsicSetRxFilter(pAd);
}
#endif /*CONFIG_AP_SUPPORT*/
#endif /* CONFIG_SNIFFER_SUPPORT */
RTMP_OS_NETDEV_START_QUEUE(dev_p);
DBGPRINT(RT_DEBUG_TRACE, ("%s: <=== %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
return 0;
}
示例13: CFG80211_VirtualIF_Open
static INT CFG80211_VirtualIF_Open(struct net_device *dev_p)
{
struct rtmp_adapter *pAd;
pAd = RTMP_OS_NETDEV_GET_PRIV(dev_p);
ASSERT(pAd);
DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> %d,%s\n", __FUNCTION__, dev_p->ifindex,
RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
//if (VIRTUAL_IF_UP(pAd) != 0)
// return -1;
/* increase MODULE use count */
RT_MOD_INC_USE_COUNT();
RTMP_OS_NETDEV_START_QUEUE(dev_p);
DBGPRINT(RT_DEBUG_TRACE, ("%s: <=== %s\n", __FUNCTION__, RTMP_OS_NETDEV_GET_DEVNAME(dev_p)));
return 0;
}
示例14: IGMPTableDisplay
/*
==========================================================================
Description:
Display all entrys in IGMP table
==========================================================================
*/
static VOID IGMPTableDisplay(
IN PRTMP_ADAPTER pAd)
{
int i;
MULTICAST_FILTER_TABLE_ENTRY *pEntry = NULL;
PMULTICAST_FILTER_TABLE pMulticastFilterTable = pAd->pMulticastFilterTable;
printk("Multicast filter table: ");
if (pMulticastFilterTable == NULL)
{
printk("Table is not ready!\n");
return;
}
// if FULL, return
if (pMulticastFilterTable->Size == 0)
{
printk("Table is empty.\n");
return;
}
printk("\n");
// allocate one MAC entry
RTMP_SEM_LOCK(&pMulticastFilterTable->MulticastFilterTabLock);
for (i = 0; i< MAX_LEN_OF_MULTICAST_FILTER_TABLE; i++)
{
// pick up the first available vacancy
if (pMulticastFilterTable->Content[i].Valid == TRUE)
{
PMEMBER_ENTRY pMemberEntry = NULL;
pEntry = &pMulticastFilterTable->Content[i];
printk("IF(%s) entry #%d, type=%s, GrpId=(%02x:%02x:%02x:%02x:%02x:%02x) memberCnt=%d\n",
RTMP_OS_NETDEV_GET_DEVNAME(pEntry->net_dev), i, (pEntry->type==0 ? "static":"dynamic"),
PRINT_MAC(pEntry->Addr), IgmpMemberCnt(&pEntry->MemberList));
pMemberEntry = (PMEMBER_ENTRY)pEntry->MemberList.pHead;
while (pMemberEntry)
{
printk(" member MAC=(%02x:%02x:%02x:%02x:%02x:%02x)\n", PRINT_MAC(pMemberEntry->Addr));
pMemberEntry = pMemberEntry->pNext;
}
}
}
RTMP_SEM_UNLOCK(&pMulticastFilterTable->MulticastFilterTabLock);
return;
}
示例15: IGMPTableDisplay
/*
==========================================================================
Description:
Display all entrys in IGMP table
==========================================================================
*/
static VOID IGMPTableDisplay(
IN PRTMP_ADAPTER pAd)
{
int i;
MULTICAST_FILTER_TABLE_ENTRY *pEntry = NULL;
PMULTICAST_FILTER_TABLE pMulticastFilterTable = pAd->pMulticastFilterTable;
if (pMulticastFilterTable == NULL)
{
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%s Multicase filter table is not ready.\n", __FUNCTION__));
return;
}
/* if FULL, return */
if (pMulticastFilterTable->Size == 0)
{
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("Table empty.\n"));
return;
}
/* allocate one MAC entry */
RTMP_SEM_LOCK(&pMulticastFilterTable->MulticastFilterTabLock);
for (i = 0; i< MAX_LEN_OF_MULTICAST_FILTER_TABLE; i++)
{
/* pick up the first available vacancy */
if (pMulticastFilterTable->Content[i].Valid == TRUE)
{
PMEMBER_ENTRY pMemberEntry = NULL;
pEntry = &pMulticastFilterTable->Content[i];
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("IF(%s) entry #%d, type=%s, GrpId=(%02x:%02x:%02x:%02x:%02x:%02x) memberCnt=%d\n",
RTMP_OS_NETDEV_GET_DEVNAME(pEntry->net_dev), i, (pEntry->type==0 ? "static":"dynamic"),
PRINT_MAC(pEntry->Addr), IgmpMemberCnt(&pEntry->MemberList)));
pMemberEntry = (PMEMBER_ENTRY)pEntry->MemberList.pHead;
while (pMemberEntry)
{
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("member mac=(%02x:%02x:%02x:%02x:%02x:%02x)\n",
PRINT_MAC(pMemberEntry->Addr)));
pMemberEntry = pMemberEntry->pNext;
}
}
}
RTMP_SEM_UNLOCK(&pMulticastFilterTable->MulticastFilterTabLock);
return;
}