rndis_wlan: move copy of module parameters to separate function
PATCH 1/2 rndis_wlan: move copy of module parameters to separate function
Signed-off-by Jussi Kivilinna <[email protected]>
---
drivers/net/wireless/rndis_wlan.c | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-)
drivers/net/wireless/rndis_wlan.c +22 -15
@@ -2594,23 +2594,9 @@ end:/* * driver/device initialization */ -static int bcm4320a_early_init (struct usbnet *usbdev) -{ -/* bcm4320a doesn't handle configuration parameters well. Try -* set any and you get partially zeroed mac and broken device. -*/ - -return 0 ; -} - -static int bcm4320b_early_init (struct usbnet *usbdev) +static void rndis_copy_module_params (struct usbnet *usbdev) {struct rndis_wlan_private *priv =get_rndis_wlan_priv (usbdev); -char buf[8 ]; - -/* Early initialization settings, setting these won't have effect -* if called after generic_rndis_bind(). -*/ priv->param_country[0 ] = modparam_country[0 ]; priv->param_country[1 ] = modparam_country[1 ];
@@ -2652,6 +2638,27 @@ static int bcm4320b_early_init(struct usbnet *usbdev) priv->param_workaround_interval =500 ; else priv->param_workaround_interval = modparam_workaround_interval; +} + +static int bcm4320a_early_init (struct usbnet *usbdev) +{ +/* bcm4320a doesn't handle configuration parameters well. Try +* set any and you get partially zeroed mac and broken device. +*/ + +return 0 ; +} + +static int bcm4320b_early_init (struct usbnet *usbdev) +{ +struct rndis_wlan_private *priv =get_rndis_wlan_priv (usbdev); +char buf[8 ]; + +rndis_copy_module_params (usbdev); + +/* Early initialization settings, setting these won't have effect +* if called after generic_rndis_bind(). +*/ rndis_set_config_parameter_str (usbdev,"Country" , priv->param_country); rndis_set_config_parameter_str(usbdev, "FrameBursting",
PATCH 2/2 rndis_wlan: copy module parameters for bcm4320a devices too
rndis_wlan didn't copy module parameters for bcm4320a to private structure.
Signed-off-by Jussi Kivilinna <[email protected]>
---
drivers/net/wireless/rndis_wlan.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/wireless/rndis_wlan.c +5 -0
@@ -2642,6 +2642,11 @@ static void rndis_copy_module_params(struct usbnet *usbdev)static int bcm4320a_early_init (struct usbnet *usbdev) { +/* copy module parameters for bcm4320a so that iwconfig reports txpower +* and workaround parameter is copied to private structure correctly. +*/ +rndis_copy_module_params (usbdev); +/* bcm4320a doesn't handle configuration parameters well. Try * set any and you get partially zeroed mac and broken device. */