staging: rtl8723bs: Remove unused ifname module parameter
PATCH 1/1 staging: rtl8723bs: Remove unused ifname module parameter
Remove the ifname module parameter and the corresponding ifname field in struct registry_priv. Hardcode the default "wlan%d" interface name format string directly in rtw_drv_register_netdev().
Suggested-by Greg Kroah-Hartman <[email protected]>
Signed-off-by Svyatoslav Nikolenko <[email protected]>
--- drivers/staging/rtl8723bs/include/drv_types.h | 2 -- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 9 +-------- 2 files changed, 1 insertion(+), 10 deletions(-)
drivers/staging/rtl8723bs/include/drv_types.h +0 -2
@@ -151,8 +151,6 @@ struct registry_priv {u8 enable80211d; -u8 ifname[16 ]; -u8 notch_filter;/* define for tx power adjust */
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -8
@@ -109,10 +109,6 @@ static int rtw_80211d;static int rtw_qos_opt_enable;/* 0: disable, 1:enable */ module_param (rtw_qos_opt_enable, int,0644 ); -static char *ifname ="wlan%d" ; -module_param (ifname, charp,0644 ); -MODULE_PARM_DESC (ifname,"The default name to allocate for first interface" ); -char *rtw_initmac;/* temp mac address if users want to use instead of the mac address in Efuse */ module_param (rtw_initmac, charp,0644 );
@@ -256,8 +252,6 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev) registry_par->enable80211d = (u8 )rtw_80211d; -strscpy (registry_par->ifname, ifname,sizeof (registry_par->ifname)); - registry_par->notch_filter = (u8 )rtw_notch_filter; registry_par->reg_enable_tx_power_limit = (u8 )rtw_tx_pwr_lmt_enable;
@@ -784,9 +778,8 @@ int rtw_drv_register_netdev(struct adapter *if1) {struct dvobj_priv *dvobj = if1->dvobj;struct adapter *padapter = dvobj->padapters; -char *name = if1->registrypriv.ifname; -return _rtw_drv_register_netdev (padapter, name); +return _rtw_drv_register_netdev (padapter,"wlan%d" ); }static int _netdev_open (struct net_device *pnetdev)
Signature · 1 line
2.47.3
Greg KH
maintainerQuoted 61 lines · Svyatoslav Nikolenko
Remove the ifname module parameter and the corresponding ifname field in struct
registry_priv. Hardcode the default "wlan%d" interface name format string directly inrtw_drv_register_netdev().Suggested-by Greg Kroah-Hartman <[email protected]>Signed-off-by Svyatoslav Nikolenko <[email protected]>--- drivers/staging/rtl8723bs/include/drv_types.h | 2 -- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 9 +-------- 2 files changed, 1 insertion(+), 10 deletions(-)drivers/staging/rtl8723bs/include/drv_types.h +0
-2@@ -151,8 +151,6 @@ struct registry_priv {u8 enable80211d; -u8 ifname[16 ]; -u8 notch_filter;/* define for tx power adjust */ drivers/staging/rtl8723bs/os_dep/os_intfs.c +1
-8@@ -109,10 +109,6 @@ static int rtw_80211d;static int rtw_qos_opt_enable;/* 0: disable, 1:enable */ module_param (rtw_qos_opt_enable, int,0644 ); -static char *ifname ="wlan%d" ; -module_param (ifname, charp,0644 ); -MODULE_PARM_DESC (ifname,"The default name to allocate for first interface" ); -char *rtw_initmac;/* temp mac address if users want to use instead of the mac address in Efuse */ module_param (rtw_initmac, charp,0644 );@@ -256,8 +252,6 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev) registry_par->enable80211d = (u8 )rtw_80211d; -strscpy (registry_par->ifname, ifname,sizeof (registry_par->ifname)); - registry_par->notch_filter = (u8 )rtw_notch_filter; registry_par->reg_enable_tx_power_limit = (u8 )rtw_tx_pwr_lmt_enable;@@ -784,9 +778,8 @@ int rtw_drv_register_netdev(struct adapter *if1) {struct dvobj_priv *dvobj = if1->dvobj;struct adapter *padapter = dvobj->padapters; -char *name = if1->registrypriv.ifname; -return _rtw_drv_register_netdev (padapter, name); +return _rtw_drv_register_netdev (padapter,"wlan%d" ); }static int _netdev_open (struct net_device *pnetdev)Signature · 1 line
2.47.3
Close, but really, why are we saying "wlan" at all? Why not use the default wifi network naming like it is supposed to be using? The whole callpath here that sets the device name can probably be removed as the networking core should handle that for us, right?
thanks,
greg k-h