rtl8188eu: Remove CONFIG_EASY_REPLACEMENT - not defined

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-22 15:04:57 -05:00
parent 6b0ff2a824
commit 3eb2ca707d

View file

@ -792,47 +792,10 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname)
{ {
_adapter *padapter = rtw_netdev_priv(pnetdev); _adapter *padapter = rtw_netdev_priv(pnetdev);
#ifdef CONFIG_EASY_REPLACEMENT
struct net_device *TargetNetdev = NULL;
_adapter *TargetAdapter = NULL;
struct net *devnet = NULL;
if (padapter->bDongle == 1) {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
TargetNetdev = dev_get_by_name("wlan0");
#else
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
devnet = pnetdev->nd_net;
#else
devnet = dev_net(pnetdev);
#endif
TargetNetdev = dev_get_by_name(devnet, "wlan0");
#endif
if (TargetNetdev) {
DBG_88E("Force onboard module driver disappear !!!\n");
TargetAdapter = rtw_netdev_priv(TargetNetdev);
TargetAdapter->DriverState = DRIVER_DISAPPEAR;
padapter->pid[0] = TargetAdapter->pid[0];
padapter->pid[1] = TargetAdapter->pid[1];
padapter->pid[2] = TargetAdapter->pid[2];
dev_put(TargetNetdev);
unregister_netdev(TargetNetdev);
if (TargetAdapter->chip_type == padapter->chip_type)
rtw_proc_remove_one(TargetNetdev);
padapter->DriverState = DRIVER_REPLACE_DONGLE;
}
}
#endif
if (dev_alloc_name(pnetdev, ifname) < 0) if (dev_alloc_name(pnetdev, ifname) < 0)
RT_TRACE(_module_os_intfs_c_,_drv_err_,("dev_alloc_name, fail!\n")); RT_TRACE(_module_os_intfs_c_,_drv_err_,("dev_alloc_name, fail!\n"));
netif_carrier_off(pnetdev); netif_carrier_off(pnetdev);
return 0; return 0;
} }