brcmfmac: increase buffer for obtaining firmware capabilities
authorArend van Spriel <arend.vanspriel@broadcom.com>
Wed, 5 Sep 2018 07:48:59 +0000 (09:48 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 20 Sep 2018 12:09:31 +0000 (15:09 +0300)
When obtaining the firmware capability a buffer is provided of 512
bytes. However, if all features in firmware are supported the buffer
needs to be 565 bytes as otherwise truncated information is retrieved
from firmware. Increasing the buffer to 768 bytes on stack.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c

index 8347da632a5b0de85f9a68d9eedfd0436d2da915..4c5a3995dc352282e3243bd8a3ba608c55e17bf2 100644 (file)
@@ -178,7 +178,7 @@ static void brcmf_feat_iovar_data_set(struct brcmf_if *ifp,
        ifp->fwil_fwerr = false;
 }
 
-#define MAX_CAPS_BUFFER_SIZE   512
+#define MAX_CAPS_BUFFER_SIZE   768
 static void brcmf_feat_firmware_capabilities(struct brcmf_if *ifp)
 {
        char caps[MAX_CAPS_BUFFER_SIZE];