From patchwork Sun Aug 5 19:35:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 1275591 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BC26DDF27F for ; Sun, 5 Aug 2012 19:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754995Ab2HETgS (ORCPT ); Sun, 5 Aug 2012 15:36:18 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:52849 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754879Ab2HETgS (ORCPT ); Sun, 5 Aug 2012 15:36:18 -0400 Received: by mail-we0-f174.google.com with SMTP id x8so1488533wey.19 for ; Sun, 05 Aug 2012 12:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=KTXmRCX7csbSre8s7ObQTkxI1KtXlo7PpgMj9oXZN8A=; b=Fbq/yrzpYbDceL1RwKZIRpEcLLLt0VfJjyyRKerz6oLEArFYZSBbLXU6KJ5L5FGEEc L2O4pNd4fHhAJh12CAUInLm0gWlh4614Du2hcMKQ23iNyg0Fk3925lV1Is5fkBBV1vC/ ZHzuU3+AkB16hbMEMJjeicVteX7Nw9u0Lw3lUzYlcDBRdTrFvhkOh0srlThkrIi66/rV rQxv6WpUB10B0HwQQ1T2YVDODA/gYCfpbCoFgA29uAX0F4nG2XxF8Z/bjK7lEQBW3oow FAqblUN+9IkDxWMuT1zKF3yPJBtmKmuWaR6pEummF/H7kj+iKVu1MsZn0xG3LfIngW44 NrRg== Received: by 10.180.86.226 with SMTP id s2mr12319848wiz.9.1344195377607; Sun, 05 Aug 2012 12:36:17 -0700 (PDT) Received: from localhost.localdomain (athedsl-133041.home.otenet.gr. [85.75.95.80]) by mx.google.com with ESMTPS id b7sm16708044wiz.9.2012.08.05.12.36.10 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 05 Aug 2012 12:36:16 -0700 (PDT) From: Nick Kossifidis To: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, mcgrof@gmail.com, jirislaby@gmail.com, thomas@net.t-labs.tu-berlin.de, nbd@openwrt.org, Nick Kossifidis Subject: [PATCH v2 3/5] ath5k: Preserve tx power level requested from above on phy_init Date: Sun, 5 Aug 2012 22:35:35 +0300 Message-Id: <1344195337-27461-4-git-send-email-mickflemm@gmail.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1344195337-27461-1-git-send-email-mickflemm@gmail.com> References: <1344195337-27461-1-git-send-email-mickflemm@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org By using cur_pwr on phy_init we re-use the power level previously set by the driver, not the one we got from above. Signed-off-by: Nick Kossifidis --- drivers/net/wireless/ath/ath5k/phy.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 84a9aaf..27ca993 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c @@ -3802,8 +3802,8 @@ ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, * RF buffer settings on 5211/5212+ so that we * properly set curve indices. */ - ret = ath5k_hw_txpower(ah, channel, ah->ah_txpower.txp_cur_pwr ? - ah->ah_txpower.txp_cur_pwr / 2 : AR5K_TUNE_MAX_TXPOWER); + ret = ath5k_hw_txpower(ah, channel, ah->power_level ? + ah->power_level * 2 : AR5K_TUNE_MAX_TXPOWER); if (ret) return ret;