From: patrick Date: Thu, 22 Apr 2021 22:14:30 +0000 (+0000) Subject: Use the long version of the bwfm(4) firmware path, which includes the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9ef03c50eb8bd00d087c1bc36df9e8312ac8874c;p=openbsd 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@ --- 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 @@ -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);