mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AceLan Kao <acelan.kao@canonical.com>
To: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically
Date: Tue, 26 Sep 2017 14:41:35 +0800	[thread overview]
Message-ID: <1506408099-18488-2-git-send-email-acelan.kao@canonical.com> (raw)
In-Reply-To: <1506408099-18488-1-git-send-email-acelan.kao@canonical.com>

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 Dell Inspiron 24-3460 to the quirk.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/net/wireless/ath/ath9k/init.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index b6b7a35..1667949 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -23,6 +23,7 @@
 #include <linux/of.h>
 #include <linux/of_net.h>
 #include <linux/relay.h>
+#include <linux/dmi.h>
 #include <net/ieee80211_radiotap.h>
 
 #include "ath9k.h"
@@ -96,6 +97,24 @@ 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"),
+		},
+	},
+	{}
+};
+
 static void ath9k_deinit_softc(struct ath_softc *sc);
 
 static void ath9k_op_ps_wakeup(struct ath_common *common)
@@ -1104,6 +1123,8 @@ static int __init ath9k_init(void)
 		goto err_pci_exit;
 	}
 
+	dmi_check_system(ath9k_quirks);
+
 	return 0;
 
  err_pci_exit:
-- 
2.7.4

  reply	other threads:[~2017-09-26  6:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  6:41 [PATCH 1/6] ath9k: add MSI support and use_msi parameter AceLan Kao
2017-09-26  6:41 ` AceLan Kao [this message]
2017-09-26  6:44   ` [PATCH 2/6] ath9k: add a quirk to set use_msi automatically Christoph Hellwig
2017-09-26  7:26     ` AceLan Kao
2017-09-26 14:04       ` Christoph Hellwig
2017-09-26 14:14         ` Kalle Valo
2017-09-28  8:28           ` AceLan Kao
2017-10-02  4:21             ` Daniel Drake
2017-10-05  6:39               ` AceLan Kao
2017-10-13  1:12                 ` AceLan Kao
2017-10-13  1:17                   ` Daniel Drake
2017-09-26  6:41 ` [PATCH 3/6] ath9k: set use_msi=1 on Dell Vostro 3262 AceLan Kao
2017-09-26  6:41 ` [PATCH 4/6] ath9k: set use_msi=1 on Dell Inspiron 3472 AceLan Kao
2017-09-26  6:41 ` [PATCH 5/6] ath9k: set use_msi=1 on Dell Vostro 15-3572 AceLan Kao
2017-09-26  6:41 ` [PATCH 6/6] ath9k: set use_msi=1 on Dell Inspiron 14-3473 AceLan Kao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506408099-18488-2-git-send-email-acelan.kao@canonical.com \
    --to=acelan.kao@canonical.com \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®