From patchwork Sat Mar 16 18:19:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 2282521 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BD79F4006E for ; Sat, 16 Mar 2013 18:20:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932541Ab3CPSUD (ORCPT ); Sat, 16 Mar 2013 14:20:03 -0400 Received: from mx3.wp.pl ([212.77.101.7]:41854 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932506Ab3CPSUA (ORCPT ); Sat, 16 Mar 2013 14:20:00 -0400 Received: (wp-smtpd smtp.wp.pl 22345 invoked from network); 16 Mar 2013 19:19:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1363457998; bh=dmzZ6KitdmYXk10/M8cnRbmPUTuZ2neMGNqLdNVybzg=; h=From:To:Cc:Subject; b=VQrnW8NinvTJhWwSNy5rfCLJjrjMShBkBHsp71n9j1m13/Oy/8Yeehakq2Sd74V9U 02adB0zobyqAWlJDzlXno7OXCEN/jHNu0e9a9puvQ/ipfuwUz8KvA40uc0A1PcuxdZ Dy08VdVeVJfSPOK9prTLbA34Ap2iWzJKupS85pB0= Received: from ip-78-102-117-137.net.upcbroadband.cz (HELO localhost) (stf_xl@wp.pl@[78.102.117.137]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES128-SHA encrypted SMTP for ; 16 Mar 2013 19:19:58 +0100 From: stf_xl@wp.pl To: "John W. Linville\"" Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com, Stanislaw Gruszka Subject: [PATCH 14/25] rt2800: 5592: setup LDO_CFG0 when configuring channel Date: Sat, 16 Mar 2013 19:19:42 +0100 Message-Id: <1363457993-15541-15-git-send-email-stf_xl@wp.pl> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1363457993-15541-1-git-send-email-stf_xl@wp.pl> References: <1363457993-15541-1-git-send-email-stf_xl@wp.pl> X-WP-DKIM-Status: good (id: wp.pl) X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [EfNk] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Stanislaw Gruszka Based on: RT5592_ChipSwitchChannel() from: DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/rt2x00/rt2800lib.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 93b9def..189c880 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -2187,12 +2187,17 @@ static void rt2800_config_channel_rf55xx(struct rt2x00_dev *rt2x00dev, struct channel_info *info) { u8 rfcsr, ep_reg; + u32 reg; int power_bound; /* TODO */ const bool is_11b = false; const bool is_type_ep = false; + rt2800_register_read(rt2x00dev, LDO_CFG0, ®); + rt2x00_set_field32(®, LDO_CFG0_LDO_CORE_VLEVEL, + (rf->channel > 14 || conf_is_ht40(conf)) ? 5 : 0); + rt2800_register_write(rt2x00dev, LDO_CFG0, reg); /* Order of values on rf_channel entry: N, K, mod, R */ rt2800_rfcsr_write(rt2x00dev, 8, rf->rf1 & 0xff);