All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k: add a quirk to set use_msi automatically
@ 2018-01-09  1:39 AceLan Kao
  2018-01-09  7:29 ` Kalle Valo
  2018-01-16 14:30 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: AceLan Kao @ 2018-01-09  1:39 UTC (permalink / raw)
  To: QCA ath9k Development, Kalle Valo, linux-wireless, netdev, linux-kernel

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 <acelan.kao@canonical.com>
---
 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 <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,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:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath9k: add a quirk to set use_msi automatically
  2018-01-09  1:39 [PATCH] ath9k: add a quirk to set use_msi automatically AceLan Kao
@ 2018-01-09  7:29 ` Kalle Valo
  2018-01-16 14:30 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-09  7:29 UTC (permalink / raw)
  To: AceLan Kao, Larry.Finger
  Cc: QCA ath9k Development, linux-wireless, netdev, linux-kernel

AceLan Kao <acelan.kao@canonical.com> writes:

> 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 <acelan.kao@canonical.com>

[...]

> @@ -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"),
> +		},
> +	},

Larry, didn't rtlwifi have similar situation that with certain laptops
users were required to enable a module parameter to get the device
working? I think rtlwifi should do the same as AceLan does here as then
the user would not need to manually set the module parameter.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ath9k: add a quirk to set use_msi automatically
  2018-01-09  1:39 [PATCH] ath9k: add a quirk to set use_msi automatically AceLan Kao
  2018-01-09  7:29 ` Kalle Valo
@ 2018-01-16 14:30 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-16 14:30 UTC (permalink / raw)
  To: AceLan Kao; +Cc: QCA ath9k Development, linux-wireless, netdev, linux-kernel

AceLan Kao <acelan.kao@canonical.com> wrote:

> 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 <acelan.kao@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

3153b68e4d1a ath9k: add a quirk to set use_msi automatically

-- 
https://patchwork.kernel.org/patch/10150851/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-16 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09  1:39 [PATCH] ath9k: add a quirk to set use_msi automatically AceLan Kao
2018-01-09  7:29 ` Kalle Valo
2018-01-16 14:30 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.