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: 203952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B4E642C0131 for ; Thu, 6 Dec 2012 07:58:09 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604Ab2LEU6G (ORCPT ); Wed, 5 Dec 2012 15:58:06 -0500 Received: from mail-vc0-f202.google.com ([209.85.220.202]:46719 "EHLO mail-vc0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753644Ab2LEU6C (ORCPT ); Wed, 5 Dec 2012 15:58:02 -0500 Received: by mail-vc0-f202.google.com with SMTP id m8so583671vcd.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=Q5Xx4Z61sSOl8ZkFrQn2kmKQxBGaMuPHEfo4ZP4Wu2lGn9fmENoW/eMW8pqNNIsSvR X8J70OcFnnNMWcoaIHqCYFKInrjRxZye9RKGPcf+zMZuooCoTEz9+xQiPZsJWGB5T4NZ c/faNukB8eptPNHxAiLxDZzT0zZaM0q2U9yzojflJIhDVM8jPIrPdtgt7vi6xemf1bhC iVK2lEJ30Ye/Hg4eaT9BXcegqb+pISlRoOQuP+2P5Orb1SV7ByqIlvLtHFqFlbEcQGrm rN1jW1rFLhbUw7Dh0XAf+cEe1zuqtb43QeOkR+gFBMgC0oZpy83WPT9CyGFDJIgr+wK8 eSFA== 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: ALoCoQlxXuVUON8Rnoli58XZKAcNt+SLA+2lxBbO+Uj0U+/nSQQV8pMhLZ3SXPwKzxhy/gC5E9exjSH/S3IIroQeeNwh3MxGZv4utBkjCC1kVlK/mxSCoV3SLZKYbgLEXQY4o45kjUSHwJ3YjxZQuwyl9lbJXTZQtmcoSQRVy/G9MijkIsmHKWvfzRhP4svxPoLEJBq5Op3iW0e3hCtC0bK0c/CuRRZydw== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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-pci" 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);