提交 a5a36720 编写于 作者: I Ivan T. Ivanov 提交者: David S. Miller

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: 7682de8b ("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: NIvan T. Ivanov <iivanov@suse.de>
Reviewed-by: NHector Martin <marcan@marcan.st>
Reviewed-by: NArend van Spriel <arend.vanspriel@broadcom.com>
Tested-by: NPeter Robinson <pbrobinson@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 571f3dd0
...@@ -79,7 +79,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, ...@@ -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 /* Apple ARM64 platforms have their own idea of board type, passed in
* via the device tree. They also have an antenna SKU parameter * 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; settings->board_type = prop;
if (!of_property_read_string(np, "apple,antenna-sku", &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, ...@@ -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 */ /* Set board-type to the first string of the machine compatible prop */
root = of_find_node_by_path("/"); root = of_find_node_by_path("/");
if (root && !settings->board_type) { if (root && err) {
char *board_type; char *board_type;
const char *tmp; const char *tmp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册