Commit 2af15580 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: avoid error output in receive path

Parsing the tlv upon receiving frames can fail. Instead of printing
an error message, just count the parse failure. On some devices we
receive a lot of invalid tlv signals.

this commit will be squashed.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Change-Id: I08e0f62c55e5028f9aa70c396d291679abd273c9
Reviewed-on: http://lb-bun-88.bun.broadcom.com:8080/72Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPiotr Haber <phaber@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0f8b5cc5
...@@ -440,7 +440,6 @@ static int brcmf_fws_get_tlv_len(struct brcmf_fws_info *fws, ...@@ -440,7 +440,6 @@ static int brcmf_fws_get_tlv_len(struct brcmf_fws_info *fws,
switch (id) { switch (id) {
BRCMF_FWS_TLV_DEFLIST BRCMF_FWS_TLV_DEFLIST
default: default:
brcmf_err("invalid tlv id: %d\n", id);
fws->stats.tlv_invalid_type++; fws->stats.tlv_invalid_type++;
break; break;
} }
...@@ -1013,6 +1012,9 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len, ...@@ -1013,6 +1012,9 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
len = signal_data[1]; len = signal_data[1];
data = signal_data + 2; data = signal_data + 2;
brcmf_dbg(INFO, "tlv type=%d (%s), len=%d, data[0]=%d\n", type,
brcmf_fws_get_tlv_name(type), len, *data);
/* abort parsing when length invalid */ /* abort parsing when length invalid */
if (data_len < len + 2) if (data_len < len + 2)
break; break;
...@@ -1020,8 +1022,6 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len, ...@@ -1020,8 +1022,6 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
if (len != brcmf_fws_get_tlv_len(fws, type)) if (len != brcmf_fws_get_tlv_len(fws, type))
break; break;
brcmf_dbg(INFO, "tlv type=%d (%s), len=%d\n", type,
brcmf_fws_get_tlv_name(type), len);
switch (type) { switch (type) {
case BRCMF_FWS_TYPE_MAC_OPEN: case BRCMF_FWS_TYPE_MAC_OPEN:
case BRCMF_FWS_TYPE_MAC_CLOSE: case BRCMF_FWS_TYPE_MAC_CLOSE:
......
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