aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2009-11-30 14:50:07 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-21 18:56:04 -0500
commitcef6e91280b724e93b0fb8a9fd3e6bf072f54c81 (patch)
treebaa67eee0b411cd0618fa267188e20f88baad65a /drivers/net
parentda2fb4e9c215b8f0f8954818691549f8a34135be (diff)
rndis_wlan: move copy of module parameters to separate function
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rndis_wlan.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 2ecbedb26e15..8dd9224c2d4e 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2594,23 +2594,9 @@ end:
2594/* 2594/*
2595 * driver/device initialization 2595 * driver/device initialization
2596 */ 2596 */
2597static int bcm4320a_early_init(struct usbnet *usbdev) 2597static void rndis_copy_module_params(struct usbnet *usbdev)
2598{
2599 /* bcm4320a doesn't handle configuration parameters well. Try
2600 * set any and you get partially zeroed mac and broken device.
2601 */
2602
2603 return 0;
2604}
2605
2606static int bcm4320b_early_init(struct usbnet *usbdev)
2607{ 2598{
2608 struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); 2599 struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
2609 char buf[8];
2610
2611 /* Early initialization settings, setting these won't have effect
2612 * if called after generic_rndis_bind().
2613 */
2614 2600
2615 priv->param_country[0] = modparam_country[0]; 2601 priv->param_country[0] = modparam_country[0];
2616 priv->param_country[1] = modparam_country[1]; 2602 priv->param_country[1] = modparam_country[1];
@@ -2652,6 +2638,27 @@ static int bcm4320b_early_init(struct usbnet *usbdev)
2652 priv->param_workaround_interval = 500; 2638 priv->param_workaround_interval = 500;
2653 else 2639 else
2654 priv->param_workaround_interval = modparam_workaround_interval; 2640 priv->param_workaround_interval = modparam_workaround_interval;
2641}
2642
2643static int bcm4320a_early_init(struct usbnet *usbdev)
2644{
2645 /* bcm4320a doesn't handle configuration parameters well. Try
2646 * set any and you get partially zeroed mac and broken device.
2647 */
2648
2649 return 0;
2650}
2651
2652static int bcm4320b_early_init(struct usbnet *usbdev)
2653{
2654 struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
2655 char buf[8];
2656
2657 rndis_copy_module_params(usbdev);
2658
2659 /* Early initialization settings, setting these won't have effect
2660 * if called after generic_rndis_bind().
2661 */
2655 2662
2656 rndis_set_config_parameter_str(usbdev, "Country", priv->param_country); 2663 rndis_set_config_parameter_str(usbdev, "Country", priv->param_country);
2657 rndis_set_config_parameter_str(usbdev, "FrameBursting", 2664 rndis_set_config_parameter_str(usbdev, "FrameBursting",