Commit 9ed24e1f authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Remove unused function rtw_change_ifname()

Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4dfeb7be
......@@ -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
......@@ -153,61 +153,6 @@ void rtw_free_netdev(struct net_device *netdev)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment