From: navin patidar Date: Thu, 10 Jul 2014 03:42:16 +0000 (+0530) Subject: staging: rtl8188eu: Remove unused function rtw_change_ifname() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9ed24e1f1a3619ca6e99c192d2bd22619ee7e928;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8188eu: Remove unused function rtw_change_ifname() Signed-off-by: navin patidar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h index 187fe1f32478..005ec17fcbbc 100644 --- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h +++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h @@ -45,6 +45,5 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter); int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode); int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan); int rtw_set_country(struct adapter *adapter, const char *country_code); -int rtw_change_ifname(struct adapter *padapter, const char *ifname); #endif diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index de0efe2759ff..76eddcdb6ad1 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -153,61 +153,6 @@ RETURN: return; } -int rtw_change_ifname(struct adapter *padapter, const char *ifname) -{ - struct net_device *pnetdev; - struct net_device *cur_pnetdev; - struct rereg_nd_name_data *rereg_priv; - int ret; - - if (!padapter) - goto error; - - cur_pnetdev = padapter->pnetdev; - rereg_priv = &padapter->rereg_nd_name_priv; - - /* free the old_pnetdev */ - if (rereg_priv->old_pnetdev) { - free_netdev(rereg_priv->old_pnetdev); - rereg_priv->old_pnetdev = NULL; - } - - if (!rtnl_is_locked()) - unregister_netdev(cur_pnetdev); - else - unregister_netdevice(cur_pnetdev); - - rtw_proc_remove_one(cur_pnetdev); - - rereg_priv->old_pnetdev = cur_pnetdev; - - pnetdev = rtw_init_netdev(padapter); - if (!pnetdev) { - ret = -1; - goto error; - } - - SET_NETDEV_DEV(pnetdev, dvobj_to_dev(adapter_to_dvobj(padapter))); - - rtw_init_netdev_name(pnetdev, ifname); - - memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN); - - if (!rtnl_is_locked()) - ret = register_netdev(pnetdev); - else - ret = register_netdevice(pnetdev); - if (ret != 0) { - RT_TRACE(_module_hci_intfs_c_, _drv_err_, - ("register_netdev() failed\n")); - goto error; - } - rtw_proc_init_one(pnetdev); - return 0; -error: - return -1; -} - u64 rtw_modular64(u64 x, u64 y) { return do_div(x, y);