rndis_wlan: move copy of module parameters to separate function
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Mon, 30 Nov 2009 19:50:07 +0000 (21:50 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 21 Dec 2009 23:56:04 +0000 (18:56 -0500)
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rndis_wlan.c

index 2ecbedb26e152c28e697ac8927be151934ee4144..8dd9224c2d4ec99e06fd6ca6bcb1e4334fefc0cf 100644 (file)
@@ -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",