Skip to content

Commit a5a3672

Browse files
hanzyddavem330
authored andcommitted
brcmfmac: Prefer DT board type over DMI board type
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: 7682de8 ("wifi: brcmfmac: of: Fetch Apple properties") [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1206697#c13 Cc: [email protected] Signed-off-by: Ivan T. Ivanov <[email protected]> Reviewed-by: Hector Martin <[email protected]> Reviewed-by: Arend van Spriel <[email protected]> Tested-by: Peter Robinson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 571f3dd commit a5a3672

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

1 file changed

+3
-2
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,16 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
7979
/* Apple ARM64 platforms have their own idea of board type, passed in
8080
* via the device tree. They also have an antenna SKU parameter
8181
*/
82-
if (!of_property_read_string(np, "brcm,board-type", &prop))
82+
err = of_property_read_string(np, "brcm,board-type", &prop);
83+
if (!err)
8384
settings->board_type = prop;
8485

8586
if (!of_property_read_string(np, "apple,antenna-sku", &prop))
8687
settings->antenna_sku = prop;
8788

8889
/* Set board-type to the first string of the machine compatible prop */
8990
root = of_find_node_by_path("/");
90-
if (root && !settings->board_type) {
91+
if (root && err) {
9192
char *board_type;
9293
const char *tmp;
9394

0 commit comments

Comments
 (0)