VOID RTMP_CFG80211_DummyP2pIf_Remove( IN struct rtmp_adapter *pAd) { PCFG80211_CTRL cfg80211_ctrl = &pAd->cfg80211_ctrl; struct net_device *dummy_p2p_net_dev = (PNET_DEV)cfg80211_ctrl->dummy_p2p_net_dev; DBGPRINT(RT_DEBUG_TRACE, (" %s =====> \n", __FUNCTION__)); RtmpOSNetDevProtect(1); if (dummy_p2p_net_dev) { RTMP_OS_NETDEV_STOP_QUEUE(dummy_p2p_net_dev); RtmpOSNetDevDetach(dummy_p2p_net_dev); if (dummy_p2p_net_dev->ieee80211_ptr) { kfree(dummy_p2p_net_dev->ieee80211_ptr); dummy_p2p_net_dev->ieee80211_ptr = NULL; } RtmpOSNetDevProtect(0); RtmpOSNetDevFree(dummy_p2p_net_dev); RtmpOSNetDevProtect(1); cfg80211_ctrl->flg_cfg_dummy_p2p_init = false; } RtmpOSNetDevProtect(0); DBGPRINT(RT_DEBUG_TRACE, (" %s <=====\n", __FUNCTION__)); }
VOID RTMP_CFG80211_DummyP2pIf_Remove( IN VOID *pAdSrc) { PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdSrc; PCFG80211_CTRL cfg80211_ctrl = &pAd->cfg80211_ctrl; PNET_DEV dummy_p2p_net_dev = (PNET_DEV)cfg80211_ctrl->dummy_p2p_net_dev; DBGPRINT(RT_DEBUG_TRACE, (" %s =====> \n", __FUNCTION__)); RtmpOSNetDevProtect(1); if (dummy_p2p_net_dev) { RTMP_OS_NETDEV_STOP_QUEUE(dummy_p2p_net_dev); RtmpOSNetDevDetach(dummy_p2p_net_dev); if (dummy_p2p_net_dev->ieee80211_ptr) { kfree(dummy_p2p_net_dev->ieee80211_ptr); dummy_p2p_net_dev->ieee80211_ptr = NULL; } RtmpOSNetDevProtect(0); RtmpOSNetDevFree(dummy_p2p_net_dev); RtmpOSNetDevProtect(1); cfg80211_ctrl->flg_cfg_dummy_p2p_init = FALSE; } RtmpOSNetDevProtect(0); DBGPRINT(RT_DEBUG_TRACE, (" %s <=====\n", __FUNCTION__)); }
/* ======================================================================== Routine Description: Remove Multi-BSS network interface. Arguments: pAd points to our adapter Return Value: None Note: FIRST_MBSSID = 1 Main BSS is not removed here. ======================================================================== */ VOID MBSS_Remove( IN PRTMP_ADAPTER pAd) { MULTISSID_STRUCT *pMbss; UINT IdBss; for(IdBss=FIRST_MBSSID; IdBss<MAX_MBSSID_NUM(pAd); IdBss++) { pMbss = &pAd->ApCfg.MBSSID[IdBss]; RtmpOSNetDevProtect(1); if (pMbss->MSSIDDev) { RtmpOSNetDevDetach(pMbss->MSSIDDev); RtmpOSNetDevProtect(0); RtmpOSNetDevFree(pMbss->MSSIDDev); RtmpOSNetDevProtect(1); /* clear it as NULL to prevent latter access error */ pMbss->MSSIDDev = NULL; } RtmpOSNetDevProtect(0); } }
VOID RTMP_CFG80211_AllVirtualIF_Remove( IN VOID *pAdSrc) { PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdSrc; PLIST_HEADER pCacheList = &pAd->cfg80211_ctrl.Cfg80211VifDevSet.vifDevList; PCFG80211_VIF_DEV pDevEntry = NULL; RT_LIST_ENTRY *pListEntry = NULL; if (pCacheList->size <= 0 ) { DBGPRINT(RT_DEBUG_TRACE, ("%s <-- Vif list is empty\n", __FUNCTION__)); return; } pListEntry = pCacheList->pHead; pDevEntry = (PCFG80211_VIF_DEV)pListEntry; while ((pDevEntry != NULL) && (pCacheList->size != 0)) { RtmpOSNetDevProtect(1); RTMP_CFG80211_VirtualIF_Remove(pAd, pDevEntry->net_dev, pDevEntry->net_dev->ieee80211_ptr->iftype); RtmpOSNetDevProtect(0); pListEntry = pListEntry->pNext; pDevEntry = (PCFG80211_VIF_DEV)pListEntry; } }
/* ======================================================================== Routine Description: Remove Multi-BSS network interface. Arguments: pAd points to our adapter Return Value: None Note: FIRST_MBSSID = 1 Main BSS is not removed here. ======================================================================== */ VOID MBSS_Remove(RTMP_ADAPTER *pAd) { struct wifi_dev *wdev; UINT IdBss; BSS_STRUCT *pMbss; for(IdBss=FIRST_MBSSID; IdBss<MAX_MBSSID_NUM(pAd); IdBss++) { wdev = &pAd->ApCfg.MBSSID[IdBss].wdev; pMbss = &pAd->ApCfg.MBSSID[IdBss]; if (pMbss) { wdev_bcn_buf_deinit(pAd, &pMbss->bcn_buf); } if (wdev->if_dev) { RtmpOSNetDevProtect(1); RtmpOSNetDevDetach(wdev->if_dev); RtmpOSNetDevProtect(0); rtmp_wdev_idx_unreg(pAd, wdev); RtmpOSNetDevFree(wdev->if_dev); wdev->if_dev = NULL; } } }
VOID RTMP_CFG80211_AllVirtualIF_Remove( IN struct rtmp_adapter *pAd) { PLIST_HEADER pCacheList = &pAd->cfg80211_ctrl.Cfg80211VifDevSet.vifDevList; PCFG80211_VIF_DEV pDevEntry = NULL; PLIST_ENTRY pListEntry = NULL; pListEntry = pCacheList->pHead; pDevEntry = (PCFG80211_VIF_DEV)pListEntry; while ((pDevEntry != NULL) && (pCacheList->size != 0)) { RtmpOSNetDevProtect(1); RTMP_CFG80211_VirtualIF_Remove(pAd, pDevEntry->net_dev, pDevEntry->net_dev->ieee80211_ptr->iftype); RtmpOSNetDevProtect(0); pListEntry = pListEntry->pNext; pDevEntry = (PCFG80211_VIF_DEV)pListEntry; } }
VOID WDS_Remove(RTMP_ADAPTER *pAd) { UINT index; struct wifi_dev *wdev; for(index = 0; index < MAX_WDS_ENTRY; index++) { wdev = &pAd->WdsTab.WdsEntry[index].wdev; if (wdev->if_dev) { RtmpOSNetDevProtect(1); RtmpOSNetDevDetach(wdev->if_dev); RtmpOSNetDevProtect(0); rtmp_wdev_idx_unreg(pAd, wdev); RtmpOSNetDevFree(wdev->if_dev); /* Clear it as NULL to prevent latter access error. */ wdev->if_dev = NULL; } } }