Commit 4165fe9a authored by Arend van Spriel's avatar Arend van Spriel Committed by Kalle Valo

brcmfmac: fix nvram processing

The nvram file can hold a key=value combination in which the value
may have spaces, ie. 'RAW1=80 02 fe ff'. The parsing functionality
did not deal with this so it gives an error message:

[621746.311635] brcmfmac: brcmf_nvram_handle_key
	warning: ln=90:col=11: '=' expected, skip invalid key entry

because RAW1=80 is being considerd as key=value pair and it expects
'=' sign after '02' for next key=value pair. This entry can be
completely ignored as firmware does not need it.
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarDaniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 7f52c81d
......@@ -103,6 +103,10 @@ static enum nvram_parser_state brcmf_nvram_handle_key(struct nvram_parser *nvp)
c = nvp->fwnv->data[nvp->pos];
if (c == '=') {
/* ignore RAW1 by treating as comment */
if (strncmp(&nvp->fwnv->data[nvp->entry], "RAW1", 4) == 0)
st = COMMENT;
else
st = VALUE;
} else if (!is_nvram_char(c)) {
brcmf_dbg(INFO, "warning: ln=%d:col=%d: '=' expected, skip invalid key entry\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment