summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2021-12-27 12:04:00 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2021-12-27 12:04:00 +0000
commit1b446f7229e8c20fd8f6ff722a4e9bc44d5fff77 (patch)
tree8dfc56b92d72a380f2a9bc26aeef292b6f06fe71 /sys
parent81e976bfaf2d33bac0d995116f8c91450fb60814 (diff)
Switch module codename retrieval to use the newly proposed device tree
bindings.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_bwfm_pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c
index 4c05b448ce6..de65a1883f9 100644
--- a/sys/dev/pci/if_bwfm_pci.c
+++ b/sys/dev/pci/if_bwfm_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bwfm_pci.c,v 1.59 2021/12/27 10:56:55 patrick Exp $ */
+/* $OpenBSD: if_bwfm_pci.c,v 1.60 2021/12/27 12:03:59 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2017 Patrick Wildt <patrick@blueri.se>
@@ -968,7 +968,7 @@ bwfm_pci_process_otp_tuple(struct bwfm_pci_softc *sc, uint8_t type, uint8_t size
struct bwfm_softc *bwfm = (void *)sc;
char chiprev[8] = "", module[8] = "", modrev[8] = "", vendor[8] = "", chip[8] = "";
char product[16] = "unknown";
- int node, len;
+ int len;
switch (type) {
case 0x15: /* system vendor OTP */
@@ -1022,9 +1022,9 @@ next:
snprintf(chip, sizeof(chip),
bwfm->sc_chip.ch_chip > 40000 ? "%05d" : "%04x",
bwfm->sc_chip.ch_chip);
- node = OF_finddevice("/chosen");
- if (node != -1)
- OF_getprop(node, "module-wlan0", product, sizeof(product));
+ if (sc->sc_sc.sc_node)
+ OF_getprop(sc->sc_sc.sc_node, "apple,module-instance",
+ product, sizeof(product));
printf("%s: firmware C-%s%s%s/P-%s_M-%s_V-%s__m-%s\n",
DEVNAME(sc), chip,
*chiprev ? "__s-" : "", *chiprev ? chiprev : "",