23180c723613345c9b79df2d5398c176250a5b48
[openwrt/staging/adrian.git] /
1 From a250c91c1762e85c736e67cb4a9a95ebae72e62d Mon Sep 17 00:00:00 2001
2 From: Arend van Spriel <arend.vanspriel@broadcom.com>
3 Date: Thu, 14 Feb 2019 13:43:52 +0100
4 Subject: [PATCH] brcmfmac: use chipname in brcmf_fw_alloc_request() for error
5 path as well
6
7 The local variable chipname is string representation of chip id and revision
8 which is printed in the good flow of brcmf_fw_alloc_request(). Also use it
9 for the error path, ie. for unknown/unsupported devices.
10
11 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
12 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
13 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
14 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
15 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
16 ---
17 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
21 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
22 @@ -719,8 +719,10 @@ brcmf_fw_alloc_request(u32 chip, u32 chi
23 break;
24 }
25
26 + brcmf_chip_name(chip, chiprev, chipname, sizeof(chipname));
27 +
28 if (i == table_size) {
29 - brcmf_err("Unknown chipid %d [%d]\n", chip, chiprev);
30 + brcmf_err("Unknown chip %s\n", chipname);
31 return NULL;
32 }
33
34 @@ -729,8 +731,6 @@ brcmf_fw_alloc_request(u32 chip, u32 chi
35 if (!fwreq)
36 return NULL;
37
38 - brcmf_chip_name(chip, chiprev, chipname, sizeof(chipname));
39 -
40 brcmf_info("using %s for chip %s\n",
41 mapping_table[i].fw_base, chipname);
42