From patchwork Mon Nov 30 19:50:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jussi Kivilinna X-Patchwork-Id: 63761 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAUJoC6j012377 for ; Mon, 30 Nov 2009 19:50:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbZK3TuE (ORCPT ); Mon, 30 Nov 2009 14:50:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752861AbZK3TuE (ORCPT ); Mon, 30 Nov 2009 14:50:04 -0500 Received: from sirokuusama.dnainternet.net ([83.102.40.133]:49917 "EHLO sirokuusama.dnainternet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709AbZK3TuD (ORCPT ); Mon, 30 Nov 2009 14:50:03 -0500 Received: from localhost (localhost [127.0.0.1]) by sirokuusama.dnainternet.net (Postfix) with ESMTP id C58AC2C676; Mon, 30 Nov 2009 21:50:08 +0200 (EET) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Flag: NO X-Spam-Score: 1.909 X-Spam-Level: * X-Spam-Status: No, score=1.909 tagged_above=-9999 required=6 tests=[AWL=-0.793, HELO_LH_HOME=2.602, RDNS_DYNAMIC=0.1] Received: from sirokuusama.dnainternet.net ([83.102.40.133]) by localhost (sirokuusama.dnainternet.net [127.0.0.1]) (amavisd-new, port 10041) with ESMTP id gVlZrk0Qxa1D; Mon, 30 Nov 2009 21:50:08 +0200 (EET) Received: from oliivipuu.dnainternet.net (oliivipuu.dnainternet.net [83.102.40.215]) by sirokuusama.dnainternet.net (Postfix) with ESMTP id A0BA02C629; Mon, 30 Nov 2009 21:50:08 +0200 (EET) Received: from fate.lan (dyn2-85-23-163-66.psoas.suomi.net [85.23.163.66]) by oliivipuu.dnainternet.net (Postfix) with ESMTP id 8F1D27F002; Mon, 30 Nov 2009 21:50:08 +0200 (EET) From: Jussi Kivilinna Subject: [PATCH 1/2] rndis_wlan: move copy of module parameters to separate function To: "John W. Linville" Cc: linux-wireless@vger.kernel.org Date: Mon, 30 Nov 2009 21:50:07 +0200 Message-ID: <20091130195007.13062.25776.stgit@fate.lan> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 2ecbedb..8dd9224 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -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",