From patchwork Fri Aug 14 21:00:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?G=C3=A1bor_Stefanik?= X-Patchwork-Id: 41540 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 n7EL0Z66028240 for ; Fri, 14 Aug 2009 21:00:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754602AbZHNVAc (ORCPT ); Fri, 14 Aug 2009 17:00:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754533AbZHNVAc (ORCPT ); Fri, 14 Aug 2009 17:00:32 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:64478 "EHLO mail-bw0-f222.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754517AbZHNVAb (ORCPT ); Fri, 14 Aug 2009 17:00:31 -0400 Received: by bwz22 with SMTP id 22so1356783bwz.18 for ; Fri, 14 Aug 2009 14:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=9AtdAxs7FdVZAbk4mQQWfRkUrtidnk22y2nD7pjyBEQ=; b=xbKcDWeRhBki+HX8RM8pG3vrLxnvflyjg+2bXcQmDNd5kJ0tcbOPmMy0/mfAC0Fqs+ a0uR4G1IEZYRt3isbX6p5dmNWcnvRtnxi3phNXaGuQbQOy6pHM3PQ7oDjAT7433/UD7k 9t+iMrqcqZBrXJLycwLKPR6mctRucu4NUE47M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=iYcUplFjbkeC22P/VkcFAEF30ypVPHWc8oDHOqA69WZoxLjiUyHWgPiAHOQwMMNcf+ ctpy7GYXlH85oFacdez2571Is0Gqz5874o9lgn7KC8uKVVu7550g5yaN7ddIMlEeOXpv kIF9Jxg3lIOss5mDAuB8Ygx7CbgbgxhDgwj/8= Received: by 10.103.78.30 with SMTP id f30mr721671mul.87.1250283632016; Fri, 14 Aug 2009 14:00:32 -0700 (PDT) Received: from ?192.168.1.5? (pool-02f2c.externet.hu [88.209.217.43]) by mx.google.com with ESMTPS id 12sm8461166muq.22.2009.08.14.14.00.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 Aug 2009 14:00:31 -0700 (PDT) Message-ID: <4A85D070.6070702@gmail.com> Date: Fri, 14 Aug 2009 23:00:32 +0200 From: =?UTF-8?B?R8OhYm9yIFN0ZWZhbmlr?= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Linville , Michael Buesch , Larry Finger , Mark Huijgen CC: Broadcom Wireless , linux-wireless Subject: [PATCH] b43: LP-PHY: Fix another TX power control abuse Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This should fix the remaining WARN_ON. Signed-off-by: Gábor Stefanik --- drivers/net/wireless/b43/phy_lp.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index bf89173..3872a31 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c @@ -1059,7 +1059,8 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev *dev) bool old_txg_ovr; u8 old_bbmult; u16 old_rf_ovr, old_rf_ovrval, old_afe_ovr, old_afe_ovrval, - old_rf2_ovr, old_rf2_ovrval, old_phy_ctl, old_txpctl; + old_rf2_ovr, old_rf2_ovrval, old_phy_ctl; + enum b43_lpphy_txpctl_mode old_txpctl; u32 normal_pwr, ideal_pwr, mean_sq_pwr, tmp = 0, mean_sq_pwr_min = 0; int loopback, i, j, inner_sum; @@ -1077,8 +1078,8 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev *dev) old_rf2_ovr = b43_phy_read(dev, B43_LPPHY_RF_OVERRIDE_2); old_rf2_ovrval = b43_phy_read(dev, B43_LPPHY_RF_OVERRIDE_2_VAL); old_phy_ctl = b43_phy_read(dev, B43_LPPHY_LP_PHY_CTL); - old_txpctl = b43_phy_read(dev, B43_LPPHY_TX_PWR_CTL_CMD) & - B43_LPPHY_TX_PWR_CTL_CMD_MODE; + lpphy_read_tx_pctl_mode_from_hardware(dev); + old_txpctl = lpphy->txpctl_mode; lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF); lpphy_disable_crs(dev);