OSDN Git Service

brcmfmac: allow firmware-signal tlv to be longer than specified
authorArend van Spriel <arend@broadcom.com>
Thu, 6 Jun 2013 11:17:46 +0000 (13:17 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Jun 2013 19:02:15 +0000 (15:02 -0400)
The firmware-signal API specification defines length for the different
tlv. During testing on different devices it turned out not all firmware
used the tlv length according specification. Therefore the length check
is made less strict with this patch.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c

index 5352dc1..d6f05ae 100644 (file)
@@ -1433,7 +1433,7 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
                if (data_len < len + 2)
                        break;
 
-               if (len != brcmf_fws_get_tlv_len(fws, type))
+               if (len < brcmf_fws_get_tlv_len(fws, type))
                        break;
 
                err = BRCMF_FWS_RET_OK_NOSCHEDULE;