summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2020-08-02 11:11:07 +0000
committerstsp <stsp@openbsd.org>2020-08-02 11:11:07 +0000
commit3fc43da45d4626b342542f7e49b8ffbda90a1098 (patch)
tree32aa6b56d091bc8e94ca80f370c7d919b170e4be
parentCheck the return value of tls1_enc() in the write path. (diff)
downloadwireguard-openbsd-3fc43da45d4626b342542f7e49b8ffbda90a1098.tar.xz
wireguard-openbsd-3fc43da45d4626b342542f7e49b8ffbda90a1098.zip
Make iwx(4) match any AX200 device again.
In case of AX201 we need to be careful about which devices are matched by the driver because devices with technical differences share the same PCI product ID. The driver must additionally match against a table of known PCI subsystem product IDs to identify an AX201 device correctly. For consistency, I wrote similar matching code for AX200 devices. This matches my AX200 device correctly but fails to recognize some other devices which were previously attached and working. Turns out the Linux driver seems to use AX200 subsystem product IDs merely for marketing purposes. It makes the operating system advertise some AX200 devices with distinct trademarked names. There are no technical differences that concern the driver and there is no exhaustive list of possible AX200 subsystem product IDs. So just match them all. Problem reported by Bobby Reynolds.
-rw-r--r--sys/dev/pci/if_iwx.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index 0f929a34d66..0482cf039bd 100644
--- a/sys/dev/pci/if_iwx.c
+++ b/sys/dev/pci/if_iwx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwx.c,v 1.42 2020/08/01 16:14:05 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.43 2020/08/02 11:11:07 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -7706,10 +7706,6 @@ static const struct pci_matchid iwx_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_2 },
};
-static const struct pci_matchid iwx_subsystem_id_ax200[] = {
- { PCI_VENDOR_INTEL, 0x0080 },
-};
-
static const struct pci_matchid iwx_subsystem_id_ax201[] = {
{ PCI_VENDOR_INTEL, 0x0070 },
{ PCI_VENDOR_INTEL, 0x0074 },
@@ -7744,13 +7740,7 @@ iwx_match(struct device *parent, iwx_match_t match __unused, void *aux)
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_INTEL_WL_22500_1: /* AX200 */
- for (i = 0; i < nitems(iwx_subsystem_id_ax200); i++) {
- if (svid == iwx_subsystem_id_ax200[i].pm_vid &&
- spid == iwx_subsystem_id_ax200[i].pm_pid)
- return 1;
-
- }
- break;
+ return 1; /* match any device */
case PCI_PRODUCT_INTEL_WL_22500_2: /* AX201 */
for (i = 0; i < nitems(iwx_subsystem_id_ax201); i++) {
if (svid == iwx_subsystem_id_ax201[i].pm_vid &&