diff options
author | Nam Cao <namcaov@gmail.com> | 2022-09-02 11:51:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-09 09:49:47 +0200 |
commit | b1e2d1a256d471a929ef845184e53d7680438db3 (patch) | |
tree | 35a97226ab91d258ebb4e88ed6db4ab157c94bef /drivers/staging | |
parent | 6066a281d82479c9b39dda57200ccfd80886e775 (diff) | |
download | linux-stable-b1e2d1a256d471a929ef845184e53d7680438db3.tar.gz linux-stable-b1e2d1a256d471a929ef845184e53d7680438db3.tar.bz2 linux-stable-b1e2d1a256d471a929ef845184e53d7680438db3.zip |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8723bs/include/drv_types.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/osdep_service.c | 50 |
2 files changed, 0 insertions, 52 deletions
diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h index 0bbbdebdf157..bb4650f0b297 100644 --- a/drivers/staging/rtl8723bs/include/drv_types.h +++ b/drivers/staging/rtl8723bs/include/drv_types.h @@ -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; diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c index 4fbfa75c05d7..f09c1324c39c 100644 --- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c @@ -108,56 +108,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); - - 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) |