From b1e2d1a256d471a929ef845184e53d7680438db3 Mon Sep 17 00:00:00 2001 From: Nam Cao Date: Fri, 2 Sep 2022 11:51:53 +0200 Subject: [PATCH] staging: rtl8723bs: remove rtw_change_ifname Delete function rtw_change_ifname because it is not used. Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/975cd771e5b6573b84b31690895d140cbdaeb5e2.1662111798.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/include/drv_types.h | 2 - drivers/staging/rtl8723bs/os_dep/osdep_service.c | 50 ------------------------ 2 files changed, 52 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h index 0bbbdeb..bb4650f 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 -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 4fbfa75..f09c132 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) -- 2.7.4