staging: rtl8188eu: Remove unused function rtw_change_ifname()
Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4dfeb7beb3
commit
9ed24e1f1a
|
@ -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 @@ 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);
|
||||
|
|
Loading…
Reference in a new issue