From patchwork Tue Jan 9 01:39:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 10150851 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B307760223 for ; Tue, 9 Jan 2018 01:39:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA35E28926 for ; Tue, 9 Jan 2018 01:39:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EAD7289CB; Tue, 9 Jan 2018 01:39:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F7B828926 for ; Tue, 9 Jan 2018 01:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932501AbeAIBjb (ORCPT ); Mon, 8 Jan 2018 20:39:31 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:45271 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932231AbeAIBj2 (ORCPT ); Mon, 8 Jan 2018 20:39:28 -0500 Received: by mail-pg0-f66.google.com with SMTP id c194so5897801pga.12; Mon, 08 Jan 2018 17:39:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id; bh=o//VcbMYGVSC4N9NTxj4Btr56Krajaa0kWPXOhXw5mo=; b=bIplPvziM2torB8wWGf4jYskf3SwTwrcj+capP/f9asyPxXp2DUKCgbLvtCiNIdCpo Llxo/tN54hkFJCsPfhx9IKJEuJnGYF0Q8Kd79vdjSyZykD38C3LSL96bRxWjzSdv9fX4 F/vVExdoPYr7GIjNRvn41yGMPtGoq68IzNyVXkWRZ1j6blD8/23G8yFD99uGFbhKx+25 gyLXzfUQQpqgttgaJBqDP7ufx1xjxRAJyxg1r8pjFi7egmZO6+EczMBuvc9cW2pYFw1H dRUHwTdN77ycLeqMMyZOblJgBwI5wiij3+yoGYpTkcZHhQRaKqcqk3gXzkoE3gigRKjT iOAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id; bh=o//VcbMYGVSC4N9NTxj4Btr56Krajaa0kWPXOhXw5mo=; b=GlxjV+OJm/ZFUTJM+K9H9IFTS9Ly0FJJP1DW/TD3kKnDd8s0OEwXM0kYH9Q76Bvl9p mLWRja8i8DXA5x5ZUc/LwtQlLNLk7mW4XETiM1EhF94/Y6nooCX71nY3zC6XF2h7AM2U 38X2t3JWXugbSPeKq7DfQl7fr0ttHgGn5vMYtPf3tZn9lHBnCvdd6lb+Cl5hQ+APSlHE DRBQgjyAyjWSwlk8tFlnqbK3CnBL9J5yazKQ8JW5WE/tWErXyDoX1wmSLdgxdrmvTcvi qwppIptHMnz4GyAQuUmdt3I+1hlkStT9cJmVB5FXVwUi0WxSg6F04AXnvwpkn5Yul2Uy 2RvQ== X-Gm-Message-State: AKGB3mIiUAmICKEPy3tH7rOQk+BVTxW5S5SxNw8mhgIPWNzHqCAhVtAf HP81JM77MZXLz5mqXGqtcXM= X-Google-Smtp-Source: ACJfBot31CQI3dKGYWQbS/sUOmpWK0VPqw7rz3Xhroz8GsV5/fe8EhbNYfEt2HvG3xJ1a+0Ab7hO6A== X-Received: by 10.99.61.143 with SMTP id k137mr11364841pga.315.1515461967579; Mon, 08 Jan 2018 17:39:27 -0800 (PST) Received: from localhost ([175.41.48.77]) by smtp.gmail.com with ESMTPSA id g7sm25770768pfm.76.2018.01.08.17.39.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jan 2018 17:39:25 -0800 (PST) From: AceLan Kao To: QCA ath9k Development , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ath9k: add a quirk to set use_msi automatically Date: Tue, 9 Jan 2018 09:39:22 +0800 Message-Id: <1515461962-27129-1-git-send-email-acelan.kao@canonical.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some platform(BIOS) blocks legacy interrupts (INTx), and only allows MSI for WLAN device. So adding a quirk to list those machines and set use_msi automatically. Adding the following platforms to the quirk. Dell Inspiron 24-3460 Dell Inspiron 3472 Dell Inspiron 14-3473 Dell Vostro 3262 Dell Vostro 15-3572 Signed-off-by: AceLan Kao --- drivers/net/wireless/ath/ath9k/init.c | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 43adead..e479fae 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "ath9k.h" @@ -96,6 +97,56 @@ static const struct ieee80211_tpt_blink ath9k_tpt_blink[] = { }; #endif +static int __init set_use_msi(const struct dmi_system_id *dmi) +{ + ath9k_use_msi = 1; + return 1; +} + +static const struct dmi_system_id ath9k_quirks[] __initconst = { + { + .callback = set_use_msi, + .ident = "Dell Inspiron 24-3460", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 24-3460"), + }, + }, + { + .callback = set_use_msi, + .ident = "Dell Vostro 3262", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3262"), + }, + }, + { + .callback = set_use_msi, + .ident = "Dell Inspiron 3472", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 3472"), + }, + }, + { + .callback = set_use_msi, + .ident = "Dell Vostro 15-3572", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15-3572"), + }, + }, + { + .callback = set_use_msi, + .ident = "Dell Inspiron 14-3473", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 14-3473"), + }, + }, + {} +}; + static void ath9k_deinit_softc(struct ath_softc *sc); static void ath9k_op_ps_wakeup(struct ath_common *common) @@ -1104,6 +1155,8 @@ static int __init ath9k_init(void) goto err_pci_exit; } + dmi_check_system(ath9k_quirks); + return 0; err_pci_exit: