aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorHante Meuleman2013-01-02 15:22:38 +0100
committerJohn W. Linville2013-01-07 15:16:55 -0500
commit0429a6fa6be9489bf451e9fcc0f97341e4a356b6 (patch)
tree4a439524b87e322d534a6c729498a93e486f7e9f /drivers/net/wireless
parent637ccc27f46f2232267e689b6f8eb744f78f4810 (diff)
brcmfmac: do not reconfigure refill rx on 0-length packet.
When USB device gets removed rx complete comes with 0-length packets. Do not refill those packets. In some rare cases it can cause infinite loop. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index 914c56fe6c5f..22eae57d9546 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -467,7 +467,11 @@ static void brcmf_usb_rx_complete(struct urb *urb)
devinfo->bus_pub.bus->dstats.rx_errors++;
} else
brcmf_rx_packet(devinfo->dev, ifidx, skb);
- brcmf_usb_rx_refill(devinfo, req);
+ /* zero lenght packets indicate usb "failure". Do not refill */
+ if (urb->actual_length)
+ brcmf_usb_rx_refill(devinfo, req);
+ else
+ brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req, NULL);
} else {
brcmu_pkt_buf_free_skb(skb);
brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req, NULL);