11fb4bce45362cbf580d6e8522a1ee6736e8ddb7
[openwrt/staging/adrian.git] /
1 From: Arend van Spriel <arend.vanspriel@broadcom.com>
2 Date: Wed, 5 Sep 2018 09:48:59 +0200
3 Subject: [PATCH] brcmfmac: increase buffer for obtaining firmware capabilities
4
5 When obtaining the firmware capability a buffer is provided of 512
6 bytes. However, if all features in firmware are supported the buffer
7 needs to be 565 bytes as otherwise truncated information is retrieved
8 from firmware. Increasing the buffer to 768 bytes on stack.
9
10 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
11 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
12 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
13 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
14 ---
15 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
19 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
20 @@ -178,7 +178,7 @@ static void brcmf_feat_iovar_data_set(st
21 ifp->fwil_fwerr = false;
22 }
23
24 -#define MAX_CAPS_BUFFER_SIZE 512
25 +#define MAX_CAPS_BUFFER_SIZE 768
26 static void brcmf_feat_firmware_capabilities(struct brcmf_if *ifp)
27 {
28 char caps[MAX_CAPS_BUFFER_SIZE];