From patchwork Mon Feb 28 22:40:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 597581 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1SMeXs9000797 for ; Mon, 28 Feb 2011 22:40:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752893Ab1B1Wkb (ORCPT ); Mon, 28 Feb 2011 17:40:31 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:54137 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752848Ab1B1Wka (ORCPT ); Mon, 28 Feb 2011 17:40:30 -0500 X-Authority-Analysis: v=1.1 cv=dquaJDitHqzHCdqWSoZ6IgapSuTzW/4TaRYx9N9k4W8= c=1 sm=0 a=L94ntai6_wEA:10 a=kj9zAlcOel0A:10 a=mpMdnlmFKti1S5SNY1DT+A==:17 a=YYF7fsvRAAAA:8 a=yQdBAQUQAAAA:8 a=NoxCWzACzcAnTL5QE6AA:9 a=hBxqm08qYfkHAtvaDKIA:7 a=Kw4gafKLctUf_phQToEVTdzw4wkA:4 a=CjuIK1q_8ugA:10 a=IcxpeKGZWnEA:10 a=mpMdnlmFKti1S5SNY1DT+A==:117 X-Cloudmark-Score: 0 X-Originating-IP: 65.28.92.85 Received: from [65.28.92.85] ([65.28.92.85:43555] helo=larrylap.lan) by hrndva-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id B6/C8-14011-C542C6D4; Mon, 28 Feb 2011 22:40:29 +0000 Date: Mon, 28 Feb 2011 16:40:28 -0600 From: Larry Finger To: John W Linville Cc: chaoming_li@realsil.com.cn, linux-wireless@vger.kernel.org Subject: [PATCH] rtlwifi: Fix error registering rate-control Message-ID: <4d6c245c.QdaRNI2fJAp8tw9+%Larry.Finger@lwfinger.net> User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 28 Feb 2011 22:40:33 +0000 (UTC) Index: wireless-testing/drivers/net/wireless/rtlwifi/base.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/rtlwifi/base.c +++ wireless-testing/drivers/net/wireless/rtlwifi/base.c @@ -283,13 +283,7 @@ int rtl_init_core(struct ieee80211_hw *h rtlmac->hw = hw; /* <2> rate control register */ - if (rtl_rate_control_register()) { - RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, - ("rtl: Unable to register rtl_rc," - "use default RC !!\n")); - } else { - hw->rate_control_algorithm = "rtl_rc"; - } + hw->rate_control_algorithm = "rtl_rc"; /* * <3> init CRDA must come after init @@ -325,8 +319,6 @@ int rtl_init_core(struct ieee80211_hw *h void rtl_deinit_core(struct ieee80211_hw *hw) { - /*RC*/ - rtl_rate_control_unregister(); } void rtl_init_rx_config(struct ieee80211_hw *hw) @@ -945,11 +937,16 @@ MODULE_DESCRIPTION("Realtek 802.11n PCI static int __init rtl_core_module_init(void) { + if (rtl_rate_control_register()) + printk(KERN_ERR "rtlwifi: Unable to register rtl_rc," + "use default RC !!\n"); return 0; } static void __exit rtl_core_module_exit(void) { + /*RC*/ + rtl_rate_control_unregister(); } module_init(rtl_core_module_init);