From patchwork Wed Dec 5 20:58:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1843091 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 10CF2DF266 for ; Wed, 5 Dec 2012 20:58:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374Ab2LEU6G (ORCPT ); Wed, 5 Dec 2012 15:58:06 -0500 Received: from mail-vb0-f74.google.com ([209.85.212.74]:36649 "EHLO mail-vb0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754119Ab2LEU6C (ORCPT ); Wed, 5 Dec 2012 15:58:02 -0500 Received: by mail-vb0-f74.google.com with SMTP id s24so556247vbi.1 for ; Wed, 05 Dec 2012 12:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=1AdHoyBgKCF1HSV60n8koVteQfO2nZvqjNx3NZ/tcLc=; b=UucSVk/UE39jQVqKkY54WyXv6a9DrAOGL7hnjnrlY7T1DU1fK0D4BG9VjjHolX13mA 8llmLF2+shpLKHz9SPFWizXB9uKvUfPcJz09NT3eiQ4VCW1lLAM2SNnLvNV+UL5WtHR0 1P2Hl16y7AfoUytX67HOzzkFZQTrCLqEknNWrVs9rx6AYm4fadna78QYWWMWhlIjgpO2 9Jck1h7MJvqq0XMmYDqA2KVsPaf+L13YpX8IH3QjZpJZgDOQFWt6ad+EcZMK+NG10zg5 m+Hbt1kt8/DN83O4oCk5mWkkN8UPUb7VZ0dReD8NKDmhF8V2pgESqak/3AhsGHuFZKiv kGuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=1AdHoyBgKCF1HSV60n8koVteQfO2nZvqjNx3NZ/tcLc=; b=gc7lopTMN+Dpq6yyOLSfveRSfNcPfrokzniObZuLYGhwNaD/DyavpsT7P47dF6x2FK uTs+XkQJ3C2J+rVeVgQ1cLwxwi7SlAuUSgL8vsX5Rf6Gd61D+TadVjEaSNBFrEBbUojZ scJI20EHUfnhXf04/5bmBaWXnKR2TlM66geqNP52NAhrcJfRshvhAhtQ1F/8dEgDTqhn VtR0Bq8B7P9ZJvBsdnRL1F1jG6H2DUXWVzm3tN0tpsBDPbiKHzHcoGovXCvhPHla+D3P g6m8eJFSd4KfUb1p62KZx0KcWy6KsW9e1nG4XbUNJa9/F6u/yUWjrthVJKU0jvHmzPYw YBVQ== Received: by 10.101.133.34 with SMTP id k34mr3133272ann.21.1354741081539; Wed, 05 Dec 2012 12:58:01 -0800 (PST) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id l20si474640yhi.2.2012.12.05.12.58.01 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 05 Dec 2012 12:58:01 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.17.131.112]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 6E881820059; Wed, 5 Dec 2012 12:58:01 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 2B224180280; Wed, 5 Dec 2012 12:58:01 -0800 (PST) Subject: [PATCH 08/12] ath9k: Use standard #defines for PCIe Capability ASPM fields To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Vasanthakumar Thiagarajan , Jouni Malinen , linux-wireless@vger.kernel.org, "John W. Linville" , "Luis R. Rodriguez" , ath9k-devel@lists.ath9k.org, Senthil Balasubramanian Date: Wed, 05 Dec 2012 13:58:01 -0700 Message-ID: <20121205205801.13851.35427.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20121205205724.13851.50508.stgit@bhelgaas.mtv.corp.google.com> References: <20121205205724.13851.50508.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkzcyIGcgmOeNaEBTtAO4zpTsV5FDQ433aLUDWwT793OasiQVhCafL0vVPweTXRi7X3MCReHEuyVmJvDSK3I8LhSDkYA3AzNMLytRbt7NWU2iES8g2LG1nL0iYraLyI7inuLqd3mJVc1A9uJu19u/5N9aT6jU2fUO5Oj76SQx43vsx9aYknhP2EG7bL8attzXyYmo/fpPrLdG6YcqFe4YRnudOeSw== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use the standard #defines for PCIe Capability ASPM fields. Previously we used PCIE_LINK_STATE_L0S and PCIE_LINK_STATE_L1 directly, but these are defined for the Linux ASPM interfaces, e.g., pci_disable_link_state(), and only coincidentally match the actual register bits. PCIE_LINK_STATE_CLKPM, also part of that interface, does not match the register bit. Signed-off-by: Bjorn Helgaas CC: "John W. Linville" CC: "Luis R. Rodriguez" CC: Jouni Malinen CC: Vasanthakumar Thiagarajan CC: Senthil Balasubramanian CC: linux-wireless@vger.kernel.org CC: ath9k-devel@lists.ath9k.org --- drivers/net/wireless/ath/ath9k/pci.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index f088f4b..71d8207 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -125,23 +125,23 @@ static void ath_pci_aspm_init(struct ath_common *common) if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) && (AR_SREV_9285(ah))) { - /* Bluetooth coexistance requires disabling ASPM. */ + /* Bluetooth coexistence requires disabling ASPM. */ pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL, - PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); + PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1); /* * Both upstream and downstream PCIe components should * have the same ASPM settings. */ pcie_capability_clear_word(parent, PCI_EXP_LNKCTL, - PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); + PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1); ath_info(common, "Disabling ASPM since BTCOEX is enabled\n"); return; } pcie_capability_read_word(parent, PCI_EXP_LNKCTL, &aspm); - if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { + if (aspm & (PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1)) { ah->aspm_enabled = true; /* Initialize PCIe PM and SERDES registers. */ ath9k_hw_configpcipowersave(ah, false);