diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-04-22 22:14:31 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-04-22 22:14:31 +0000 |
commit | fe32cfdb930a0facb340df7c604197a27ff9a60a (patch) | |
tree | 655edced12063e8956df90911c849c8d1cfe3576 /sys/dev/ic/bwfm.c | |
parent | 436d9e11a871cc61c332d4ed0828b0f4f246ca1f (diff) |
Use the long version of the bwfm(4) firmware path, which includes the
board's compatible string, when printing an error about not being able
to load the firmware. Since most NVRAM files are board- or package-
specific, having the compatible makes it easier for us to find the
correct files, so that we can add them to the bwfm-firmware port.
ok kurt@
Diffstat (limited to 'sys/dev/ic/bwfm.c')
-rw-r--r-- | sys/dev/ic/bwfm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index f720281b09e..ea245574f62 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.83 2021/02/26 00:07:41 patrick Exp $ */ +/* $OpenBSD: bwfm.c,v 1.84 2021/04/22 22:14:30 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -2955,6 +2955,8 @@ bwfm_loadfirmware(struct bwfm_softc *sc, const char *chip, const char *bus, if (*size == 0) { snprintf(name, sizeof(name), "brcmfmac%s%s.bin", chip, bus); if (loadfirmware(name, ucode, size) != 0) { + snprintf(name, sizeof(name), "brcmfmac%s%s%s%s.bin", chip, bus, + sysname ? "." : "", sysname ? sysname : ""); printf("%s: failed loadfirmware of file %s\n", DEVNAME(sc), name); return 1; @@ -2998,7 +3000,8 @@ bwfm_loadfirmware(struct bwfm_softc *sc, const char *chip, const char *bus, } if (*nvlen == 0 && strcmp(bus, "-sdio") == 0) { - snprintf(name, sizeof(name), "brcmfmac%s%s.txt", chip, bus); + snprintf(name, sizeof(name), "brcmfmac%s%s%s%s.txt", chip, bus, + sysname ? "." : "", sysname ? sysname : ""); printf("%s: failed loadfirmware of file %s\n", DEVNAME(sc), name); free(*ucode, M_DEVBUF, *size); |