From patchwork Sat Jul 28 14:32:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 1251721 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 771823FC5A for ; Sat, 28 Jul 2012 14:33:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752387Ab2G1Odt (ORCPT ); Sat, 28 Jul 2012 10:33:49 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:54399 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494Ab2G1OdQ (ORCPT ); Sat, 28 Jul 2012 10:33:16 -0400 Received: by wgbdr13 with SMTP id dr13so3584067wgb.1 for ; Sat, 28 Jul 2012 07:33:15 -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=S1YSWfOV3yB99KWkSlPhxW+qmkGPqK2WDIHdMGKH5G32dlcZVLznUxkDy6HCcXl66q RYla/NaUQo2thw5nsjx5vhmLbJ51PxQ41pT3lMVxetPmdUSyV75inGmzp6lSzM9ThuFw 8OasMJISKiYUDgAnuSvrrjZHNuxO4j0p421XXVCbyLOLS2kus1O4R/L9symnjKpGWHOb rKWDIT2bzgwxHWJcnWr50axZWNx5gyhevev1hK49N+/9ixKgonEcK0B69Citw9sm1XTY E6CVz0zAqVlIqtQxd8Tp1xhZYILgFOvzEicYxKda7UWbTEnaC3GA30BpHFxkcdGyegeR pQmQ== Received: by 10.216.181.67 with SMTP id k45mr2739039wem.17.1343485995540; Sat, 28 Jul 2012 07:33:15 -0700 (PDT) Received: from localhost.localdomain (athedsl-131073.home.otenet.gr. [85.75.87.160]) by mx.google.com with ESMTPS id o2sm6873745wiz.11.2012.07.28.07.33.13 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 28 Jul 2012 07:33:14 -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 3/4] ath5k: Preserve tx power level requested from above on phy_init Date: Sat, 28 Jul 2012 17:32:50 +0300 Message-Id: <1343485971-31360-3-git-send-email-mickflemm@gmail.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1343485971-31360-1-git-send-email-mickflemm@gmail.com> References: <1343485971-31360-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;