From 007747cc9017c1ccfda66e0453a368a2373ac339 Mon Sep 17 00:00:00 2001 From: kn Date: Sun, 24 Jul 2022 17:22:12 +0000 Subject: [PATCH] Update Atheros AR928X pcidev string The AR9280 half Mini Card (HB92) supports 5GHz as confirmed by athn(4)'s "The AR9220, AR9223 and AR9280 (codenamed Merlin) ..." paragraph. pcidevs however wrongly identifies this device as athn0 at pci2 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 int 17 athn0: AR9280 rev 2 (2T2R), ROM rev 22, address 04:f0:21:30:37:de athn(4) says AR9281 is 2GHz only, so the first line (pcidevs string) does not match the real information on the second line (from real hardware). Looking around, the PCI Vendor ID: 168c, Product ID: 002a are described as * https://pcilookup.com/?ven=168c&dev=002a&action=submit "AR928X Wireless Network Adapter (PCI-Express)" * https://pci-ids.ucw.cz/read/PC/168c/002a calls this "AR928X Wireless Network Adapter (PCI-Express)" * https://github.com/torvalds/linux/blob/fc02cb2b37fe2cbf1d3334b9f0f0eab9431766c4/Documentation/devicetree/bindings/net/wireless/qca%2Cath9k.yaml#L27 says - pci168c,002a # AR9280 and AR9283 * https://pcisig.com/membership/member-companies?combine=168c (empty, no result) * NetBSD pcidevs is like ours product ATHEROS AR9281 0x002a AR9281 Im summary, "AR928X" seems more appropiate and matches both AR9280 and AR9281 chipsets, so use that to avoid contradicting dmesg lines: athn0 at pci2 dev 0 function 0 "Atheros AR928X" rev 0x01: apic 2 int 17 athn0: AR9280 rev 2 (2T2R), ROM rev 22, address 04:f0:21:30:37:de stsp confirms how "Atheros naming is very convoluted." Feedback sthen OK stsp --- sys/dev/cardbus/if_athn_cardbus.c | 4 ++-- sys/dev/pci/if_athn_pci.c | 4 ++-- sys/dev/pci/pcidevs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/cardbus/if_athn_cardbus.c b/sys/dev/cardbus/if_athn_cardbus.c index 2082fea0b0d..0f1a767605d 100644 --- a/sys/dev/cardbus/if_athn_cardbus.c +++ b/sys/dev/cardbus/if_athn_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_cardbus.c,v 1.17 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_athn_cardbus.c,v 1.18 2022/07/24 17:22:12 kn Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini @@ -93,7 +93,7 @@ static const struct pci_matchid athn_cardbus_devices[] = { { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR5418 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9160 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9280 }, - { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9281 }, + { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR928X }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9285 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR2427 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9227 }, diff --git a/sys/dev/pci/if_athn_pci.c b/sys/dev/pci/if_athn_pci.c index b1a9aadb2e4..35db0664942 100644 --- a/sys/dev/pci/if_athn_pci.c +++ b/sys/dev/pci/if_athn_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_pci.c,v 1.22 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_athn_pci.c,v 1.23 2022/07/24 17:22:12 kn Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini @@ -93,7 +93,7 @@ static const struct pci_matchid athn_pci_devices[] = { { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR5418 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9160 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9280 }, - { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9281 }, + { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR928X }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9285 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR2427 }, { PCI_VENDOR_ATHEROS, PCI_PRODUCT_ATHEROS_AR9227 }, diff --git a/sys/dev/pci/pcidevs b/sys/dev/pci/pcidevs index fa08068a33d..bb972141a84 100644 --- a/sys/dev/pci/pcidevs +++ b/sys/dev/pci/pcidevs @@ -1,4 +1,4 @@ -$OpenBSD: pcidevs,v 1.1998 2022/06/28 13:05:42 deraadt Exp $ +$OpenBSD: pcidevs,v 1.1999 2022/07/24 17:22:12 kn Exp $ /* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */ /* @@ -1163,7 +1163,7 @@ product ATHEROS AR5416 0x0023 AR5416 product ATHEROS AR5418 0x0024 AR5418 product ATHEROS AR9160 0x0027 AR9160 product ATHEROS AR9280 0x0029 AR9280 -product ATHEROS AR9281 0x002a AR9281 +product ATHEROS AR928X 0x002a AR928X product ATHEROS AR9285 0x002b AR9285 product ATHEROS AR2427 0x002c AR2427 product ATHEROS AR9227 0x002d AR9227 -- 2.20.1