From patchwork Sun Apr 11 12:31:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gertjan van Wingerde X-Patchwork-Id: 91898 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3BCVaSb026489 for ; Sun, 11 Apr 2010 12:31:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751540Ab0DKMb2 (ORCPT ); Sun, 11 Apr 2010 08:31:28 -0400 Received: from cpsmtpb-ews05.kpnxchange.com ([213.75.39.8]:4162 "EHLO cpsmtpb-ews05.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751247Ab0DKMbZ (ORCPT ); Sun, 11 Apr 2010 08:31:25 -0400 Received: from cpbrm-ews10.kpnxchange.com ([10.94.84.141]) by cpsmtpb-ews05.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 11 Apr 2010 14:31:22 +0200 Received: from CPSMTPM-EML106.kpnxchange.com ([195.121.3.10]) by cpbrm-ews10.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 11 Apr 2010 14:31:22 +0200 Received: from wingerd.gvw.nl ([86.87.118.224]) by CPSMTPM-EML106.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Sun, 11 Apr 2010 14:31:22 +0200 Received: by wingerd.gvw.nl (Postfix, from userid 501) id 6903260036; Sun, 11 Apr 2010 14:31:22 +0200 (CEST) From: Gertjan van Wingerde To: "John W. Linville" Cc: Ivo van Doorn , , , Gertjan van Wingerde Subject: [PATCH 1/9] rt2x00: Let RF chipset decide the RF channel switch method to use in rt2800. Date: Sun, 11 Apr 2010 14:31:07 +0200 Message-Id: <1270989075-2267-2-git-send-email-gwingerde@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1270989075-2267-1-git-send-email-gwingerde@gmail.com> References: <1270989075-2267-1-git-send-email-gwingerde@gmail.com> X-OriginalArrivalTime: 11 Apr 2010 12:31:22.0477 (UTC) FILETIME=[E4FD11D0:01CAD972] X-RecipientDomain: vger.kernel.org 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.3 (demeter.kernel.org [140.211.167.41]); Sun, 11 Apr 2010 12:31:38 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index ec3ec78..6fdec15 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -717,10 +717,10 @@ static void rt2800_config_lna_gain(struct rt2x00_dev *rt2x00dev, rt2x00dev->lna_gain = lna_gain; } -static void rt2800_config_channel_rt2x(struct rt2x00_dev *rt2x00dev, - struct ieee80211_conf *conf, - struct rf_channel *rf, - struct channel_info *info) +static void rt2800_config_channel_rf2xxx(struct rt2x00_dev *rt2x00dev, + struct ieee80211_conf *conf, + struct rf_channel *rf, + struct channel_info *info) { rt2x00_set_field32(&rf->rf4, RF4_FREQ_OFFSET, rt2x00dev->freq_offset); @@ -786,10 +786,10 @@ static void rt2800_config_channel_rt2x(struct rt2x00_dev *rt2x00dev, rt2800_rf_write(rt2x00dev, 4, rf->rf4); } -static void rt2800_config_channel_rt3x(struct rt2x00_dev *rt2x00dev, - struct ieee80211_conf *conf, - struct rf_channel *rf, - struct channel_info *info) +static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev, + struct ieee80211_conf *conf, + struct rf_channel *rf, + struct channel_info *info) { u8 rfcsr; @@ -826,16 +826,13 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, unsigned int tx_pin; u8 bbp; - if ((rt2x00_rt(rt2x00dev, RT3070) || - rt2x00_rt(rt2x00dev, RT3090) || - rt2x00_rt(rt2x00dev, RT2872)) && - (rt2x00_rf(rt2x00dev, RF2020) || - rt2x00_rf(rt2x00dev, RF3020) || - rt2x00_rf(rt2x00dev, RF3021) || - rt2x00_rf(rt2x00dev, RF3022))) - rt2800_config_channel_rt3x(rt2x00dev, conf, rf, info); + if (rt2x00_rf(rt2x00dev, RF2020) || + rt2x00_rf(rt2x00dev, RF3020) || + rt2x00_rf(rt2x00dev, RF3021) || + rt2x00_rf(rt2x00dev, RF3022)) + rt2800_config_channel_rf3xxx(rt2x00dev, conf, rf, info); else - rt2800_config_channel_rt2x(rt2x00dev, conf, rf, info); + rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info); /* * Change BBP settings