From: "Ivan T. Ivanov" <iivanov@suse.de>
To: aspriel@gmail.com, marcan@marcan.st
Cc: franky.lin@broadcom.com, hante.meuleman@broadcom.com,
rmk+kernel@armlinux.org.uk, stefan.wahren@i2se.com,
pbrobinson@gmail.com, jforbes@fedoraproject.org,
kvalo@kernel.org, davem@davemloft.net,
devicetree@vger.kernel.org, edumazet@google.com,
krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org,
pabeni@redhat.com, robh+dt@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
brcm80211-dev-list.pdl@broadcom.com,
SHA-cyfmac-dev-list@infineon.com,
"Ivan T. Ivanov" <iivanov@suse.de>,
stable@vger.kernel.org
Subject: [PATCH v2] brcmfmac: Prefer DT board type over DMI board type
Date: Fri, 6 Jan 2023 15:19:05 +0200 [thread overview]
Message-ID: <20230106131905.81854-1-iivanov@suse.de> (raw)
The introduction of support for Apple board types inadvertently changed
the precedence order, causing hybrid SMBIOS+DT platforms to look up the
firmware using the DMI information instead of the device tree compatible
to generate the board type. Revert back to the old behavior,
as affected platforms use firmwares named after the DT compatible.
Fixes: 7682de8b3351 ("wifi: brcmfmac: of: Fetch Apple properties")
[1] https://bugzilla.opensuse.org/show_bug.cgi?id=1206697#c13
Cc: stable@vger.kernel.org
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Reviewed-by: Hector Martin <marcan@marcan.st>
---
Changes since v1
Rewrite commit message according feedback.
https://lore.kernel.org/all/20230106072746.29516-1-iivanov@suse.de/
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index a83699de01ec..fdd0c9abc1a1 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -79,7 +79,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
/* Apple ARM64 platforms have their own idea of board type, passed in
* via the device tree. They also have an antenna SKU parameter
*/
- if (!of_property_read_string(np, "brcm,board-type", &prop))
+ err = of_property_read_string(np, "brcm,board-type", &prop);
+ if (!err)
settings->board_type = prop;
if (!of_property_read_string(np, "apple,antenna-sku", &prop))
@@ -87,7 +88,7 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
/* Set board-type to the first string of the machine compatible prop */
root = of_find_node_by_path("/");
- if (root && !settings->board_type) {
+ if (root && err) {
char *board_type;
const char *tmp;
--
2.35.3
next reply other threads:[~2023-01-06 13:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 13:19 Ivan T. Ivanov [this message]
2023-01-06 16:21 ` [PATCH v2] brcmfmac: Prefer DT board type over DMI board type Arend Van Spriel
2023-01-06 16:35 ` Hector Martin
2023-01-06 17:00 ` Peter Robinson
2023-01-16 11:18 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230106131905.81854-1-iivanov@suse.de \
--to=iivanov@suse.de \
--cc=SHA-cyfmac-dev-list@infineon.com \
--cc=aspriel@gmail.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=jforbes@fedoraproject.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pbrobinson@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=stable@vger.kernel.org \
--cc=stefan.wahren@i2se.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox