From patchwork Tue Dec 30 22:10:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 5553181 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 174709F6E8 for ; Tue, 30 Dec 2014 22:10:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 445CE200FE for ; Tue, 30 Dec 2014 22:10:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5578E201BB for ; Tue, 30 Dec 2014 22:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbaL3WKi (ORCPT ); Tue, 30 Dec 2014 17:10:38 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:60987 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbaL3WK2 (ORCPT ); Tue, 30 Dec 2014 17:10:28 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so26224173wib.5 for ; Tue, 30 Dec 2014 14:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lnEvh+AMDVl74mFgucdtLofIkRQ6HJgvjlwEHaaVWsg=; b=nea/XmgJhBmglloPauC3XIGUIZHSK9nHAGQDVPbQU3zdmFJBwW82E85hUXzvV5f0e0 p83TAfM3zPijeRSNZeokc6NUTpx459b00baI29p7CXMJt6HZ83UpqueR92d9L8W5PMiT fFsyC/VBTLOHRrbukWUwmsJKlMYyAOy7ID7qTjo3oAyKHNQSGA0uMeog+Qisc4hLMraw 2CIjkTebo33BwnfmW9ospwKWYuzxXEwSICutqLPw8jHK39L3X8oAqYj4p2J45+9fz7Tn Xir/5d5rkwHm/83ZfkDr2Yh6R3toqXCuLjdhxCOdqyv8guyLhqwdIcQL1IxeL3zCeWuO IRqw== X-Received: by 10.194.20.67 with SMTP id l3mr44374797wje.94.1419977427606; Tue, 30 Dec 2014 14:10:27 -0800 (PST) Received: from localhost.localdomain ([95.238.130.99]) by mx.google.com with ESMTPSA id e7sm55354699wjx.31.2014.12.30.14.10.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Dec 2014 14:10:27 -0800 (PST) From: Lorenzo Bianconi To: linux-wireless@vger.kernel.org Cc: nbd@openwrt.org, thomas@net.t-labs.tu-berlin.de, adrian@freebsd.org Subject: [PATCH 3/3] ath9k: enable per-packet TPC on AR9002 based chips Date: Tue, 30 Dec 2014 23:10:20 +0100 Message-Id: <1419977420-23732-4-git-send-email-lorenzo.bianconi83@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1419977420-23732-1-git-send-email-lorenzo.bianconi83@gmail.com> References: <1419977420-23732-1-git-send-email-lorenzo.bianconi83@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enable per-packet TPC on AR9002 based chips by default Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/ath/ath9k/debug.c | 5 ----- drivers/net/wireless/ath/ath9k/hw.c | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index c43e2ad..a52cbf13 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -1150,11 +1150,6 @@ static ssize_t write_file_tpc(struct file *file, const char __user *user_buf, ssize_t len; bool tpc_enabled; - if (!AR_SREV_9300_20_OR_LATER(ah)) { - /* ar9002 does not support TPC for the moment */ - return -EOPNOTSUPP; - } - len = min(count, sizeof(buf) - 1); if (copy_from_user(buf, user_buf, len)) return -EFAULT; diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 258c4d2..e2e4441 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -422,8 +422,7 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah) ah->power_mode = ATH9K_PM_UNDEFINED; ah->htc_reset_init = true; - /* ar9002 does not support TPC for the moment */ - ah->tpc_enabled = !!AR_SREV_9300_20_OR_LATER(ah); + ah->tpc_enabled = true; ah->ani_function = ATH9K_ANI_ALL; if (!AR_SREV_9300_20_OR_LATER(ah))