From patchwork Wed Dec 5 20:58:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1843171 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 F1ED540E3F for ; Wed, 5 Dec 2012 20:58:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964828Ab2LEU60 (ORCPT ); Wed, 5 Dec 2012 15:58:26 -0500 Received: from mail-yh0-f74.google.com ([209.85.213.74]:41419 "EHLO mail-yh0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754250Ab2LEU6W (ORCPT ); Wed, 5 Dec 2012 15:58:22 -0500 Received: by mail-yh0-f74.google.com with SMTP id 10so560893yhl.1 for ; Wed, 05 Dec 2012 12:58:22 -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=vot2qnS2WjLvKFpKCWTf/B6R3JoNVluhrRAVwNM1GHE=; b=iOQHpENa12MzKlC6J8C0vBzw0eMhK9xlcpEc0AnUA39+fYUxF2XAbmGDod8siIirOI T1ND3HBgn12TbxHndc3t6YpYYb9Zu7FNT33/l45btoWbpM9WoXwfYe3e4zm86Hp1KUa+ 5i663+/OArWVLMlyXsN5Vx6UrnDtdtwmHADpPSI8lEcBFdY9koJj4aKyEEPY8VsHt+tl 1+OKJCGkVLISrOt8CIOri0+qEM5OIRIxgjI9ucY8+sc8AHvpx0kw4lgfv+3rUi76N2XE oPVcemfkf1/0Q5DUXy0GwVIQxEoLSwOzD8/KZuE9m9blgmRncImzT+4ELeMd6DlkCf0h 0YLg== 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=vot2qnS2WjLvKFpKCWTf/B6R3JoNVluhrRAVwNM1GHE=; b=WtcI0/OWAvtu176bemCON1zTxlybkbHQOIDV5iGzQ+d3ivUw6QBHfTd36KZP/Z7RPS VuRkKg8usci3FgTrLMtZSe1Anl14oTFwi6Q8fhXP6RFS8B0UbO+YIg3bKnZTFPLSveUa J4wBX/1GGkbAVk4+8QKqP9yuAEKHL1+mnWXHQ2n0haU8GnVhy6s/K13I9zHEQ7J9Lehk pH+a8kcyPLHWdFcVMxy2s4pSUkYNugWzuKDFjdYHX3nbWlGaGMPgc4i5CwshU9zR/E5j FsalEALoX4gomt7/GbN06ZE/j9R9hXqfGlyZQAhykNgk3tu33HFMHfHZFaJ0/S6j6lAK wj8A== Received: by 10.236.78.199 with SMTP id g47mr11783276yhe.0.1354741102189; Wed, 05 Dec 2012 12:58:22 -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 i63si474208yhk.5.2012.12.05.12.58.22 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 05 Dec 2012 12:58:22 -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 1943D82004A; Wed, 5 Dec 2012 12:58:22 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id CA2FA180280; Wed, 5 Dec 2012 12:58:21 -0800 (PST) Subject: [PATCH 12/12] iwlwifi: Use standard #defines for PCIe Capability ASPM fields To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Intel Linux Wireless , linux-wireless@vger.kernel.org, "John W. Linville" , Johannes Berg , Wey-Yi Guy Date: Wed, 05 Dec 2012 13:58:21 -0700 Message-ID: <20121205205821.13851.59050.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: ALoCoQlY2zPA4D/jVN/thb2ADfsOaBll0LMkfSPZpSicR8oVwKtYAbAqI0WGII8T/FoCRciI9/MyuAPETKQdi5/WyJhy8aBmleGAUCDlv4morLHyq3Yvw+NdpAczdtaLJdWWwabX1rp6x3mB/SkDmBuVRMy8kiCFraAo/nDa8u4uzQy2hulJU5Rj7XC7hkbTtTisYC6P2lly9a6G8yUVTKrO6ysRf2o2wQ== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use the standard #defines rather than creating local definitions for PCIe Capability ASPM fields. Signed-off-by: Bjorn Helgaas CC: "John W. Linville" CC: Johannes Berg CC: Wey-Yi Guy CC: Intel Linux Wireless CC: linux-wireless@vger.kernel.org Acked-by: Johannes Berg --- drivers/net/wireless/iwlwifi/pcie/trans.c | 7 ++----- 1 files changed, 2 insertions(+), 5 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/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 5cd06b3..1dfa6be 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -670,8 +670,6 @@ static void iwl_set_pwr_vmain(struct iwl_trans *trans) /* PCI registers */ #define PCI_CFG_RETRY_TIMEOUT 0x041 -#define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01 -#define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02 static void iwl_apm_config(struct iwl_trans *trans) { @@ -688,8 +686,7 @@ static void iwl_apm_config(struct iwl_trans *trans) */ pcie_capability_read_word(trans_pcie->pci_dev, PCI_EXP_LNKCTL, &lctl); - if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == - PCI_CFG_LINK_CTRL_VAL_L1_EN) { + if (lctl & PCI_EXP_LNKCTL_ASPM_L1) { /* L1-ASPM enabled; disable(!) L0S */ iwl_set_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED); dev_printk(KERN_INFO, trans->dev, @@ -700,7 +697,7 @@ static void iwl_apm_config(struct iwl_trans *trans) dev_printk(KERN_INFO, trans->dev, "L1 Disabled; Enabling L0S\n"); } - trans->pm_support = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); + trans->pm_support = !(lctl & PCI_EXP_LNKCTL_ASPM_L0S); } /*