mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
staging: rtl8723bs: remove rtw_change_ifname
Delete function rtw_change_ifname because it is not used. Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/975cd771e5b6573b84b31690895d140cbdaeb5e2.1662111798.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6066a281d8
commit
b1e2d1a256
@ -493,8 +493,6 @@ static inline u8 *myid(struct eeprom_priv *peepriv)
|
||||
|
||||
#include <rtw_btcoex.h>
|
||||
|
||||
int rtw_change_ifname(struct adapter *padapter, const char *ifname);
|
||||
|
||||
extern char *rtw_initmac;
|
||||
extern int rtw_mc2u_disable;
|
||||
extern int rtw_ht_enable;
|
||||
|
@ -108,56 +108,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);
|
||||
|
||||
rereg_priv->old_pnetdev = cur_pnetdev;
|
||||
|
||||
pnetdev = rtw_init_netdev(padapter);
|
||||
if (!pnetdev)
|
||||
goto error;
|
||||
|
||||
SET_NETDEV_DEV(pnetdev, dvobj_to_dev(adapter_to_dvobj(padapter)));
|
||||
|
||||
rtw_init_netdev_name(pnetdev, ifname);
|
||||
|
||||
eth_hw_addr_set(pnetdev, padapter->eeprompriv.mac_addr);
|
||||
|
||||
if (!rtnl_is_locked())
|
||||
ret = register_netdev(pnetdev);
|
||||
else
|
||||
ret = register_netdevice(pnetdev);
|
||||
|
||||
if (ret != 0)
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
void rtw_buf_free(u8 **buf, u32 *buf_len)
|
||||
{
|
||||
if (!buf || !buf_len)
|
||||
|
Loading…
Reference in New Issue
Block a user