software/drivers/sd8887/src/wlan/mlinux/moal_uap_cfg80211.c
/**
 *  @brief This function removes an virtual interface.
 *
 *  @param handle    A pointer to the moal_handle structure
 *
 *  @return        N/A
 */
@brief This function removes an virtual interface.
@param handle    A pointer to the moal_handle structure

@return        N/A
@brief This function removes an virtual interface . @param handle A pointer to the moal_handle structure @return N / A
void
woal_remove_virtual_interface(moal_handle *handle)
{
#ifdef WIFI_DIRECT_SUPPORT
	moal_private *priv = NULL;
	int vir_intf = 0;
	int i = 0;
#endif
	ENTER();
	rtnl_lock();
#ifdef WIFI_DIRECT_SUPPORT
	for (i = 0; i < handle->priv_num; i++) {
		priv = handle->priv[i];
		if (priv) {
			if (priv->bss_virtual) {
				PRINTM(MCMND, "Remove virtual interface %s\n",
				       priv->netdev->name);
#ifdef CONFIG_PROC_FS
#ifdef PROC_DEBUG
				woal_debug_remove(priv);
#endif 
				woal_proc_remove(priv);
#endif 
				netif_device_detach(priv->netdev);
				if (priv->netdev->reg_state ==
				    NETREG_REGISTERED)
					unregister_netdevice(priv->netdev);
				handle->priv[i] = NULL;
				vir_intf++;
			}
		}
	}
#endif
	rtnl_unlock();
#ifdef WIFI_DIRECT_SUPPORT
	handle->priv_num -= vir_intf;
#endif
	LEAVE();
}
void woal_remove_virtual_interface ( moal_handle * handle ) { #ifdef WIFI_DIRECT_SUPPORT moal_private * priv = NULL ; int vir_intf = 0 ; int i = 0 ; #endif ENTER ( ) ; rtnl_lock ( ) ; #ifdef WIFI_DIRECT_SUPPORT for ( i = 0 ; i < handle -> priv_num ; i ++ ) { priv = handle -> priv [ i ] ; if ( priv ) { if ( priv -> bss_virtual ) { PRINTM ( MCMND , " \n " , priv -> netdev -> name ) ; #ifdef CONFIG_PROC_FS #ifdef PROC_DEBUG woal_debug_remove ( priv ) ; #endif woal_proc_remove ( priv ) ; #endif netif_device_detach ( priv -> netdev ) ; if ( priv -> netdev -> reg_state == NETREG_REGISTERED ) unregister_netdevice ( priv -> netdev ) ; handle -> priv [ i ] = NULL ; vir_intf ++ ; } } } #endif rtnl_unlock ( ) ; #ifdef WIFI_DIRECT_SUPPORT handle -> priv_num -= vir_intf ; #endif LEAVE ( ) ; }
@brief This function removes an virtual interface.
@brief This function removes an virtual interface .
/* Remove proc debug */ /* PROC_DEBUG */ /* CONFIG_PROC_FS */