Skip to content

Commit

Permalink
brcmfmac: Prefer DT board type over DMI board type
Browse files Browse the repository at this point in the history
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: stable@vger.kernel.org
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Reviewed-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ivan T. Ivanov authored and David S. Miller committed Jan 9, 2023
1 parent 571f3dd commit a5a3672
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,16 @@ 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))
settings->antenna_sku = prop;

/* 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;

Expand Down

0 comments on commit a5a3672

Please sign in to comment.