brcmfmac: clear control lock on usb error.
authorHante Meuleman <meuleman@broadcom.com>
Wed, 19 Sep 2012 20:21:16 +0000 (22:21 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Sep 2012 19:02:06 +0000 (15:02 -0400)
On a usb error the lock bit should be cleared.

Reviewed-by: Arend Van Spriel <arend@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>
drivers/net/wireless/brcm80211/brcmfmac/usb.c

index 246d06bb573af834bb568c9af806d06a1ef581f6..5fe6ec7f838e229667664d426ce7042e19cba6e4 100644 (file)
@@ -337,6 +337,7 @@ static int brcmf_usb_tx_ctlpkt(struct device *dev, u8 *buf, u32 len)
        err = brcmf_usb_send_ctl(devinfo, buf, len);
        if (err) {
                brcmf_dbg(ERROR, "fail %d bytes: %d\n", err, len);
+               clear_bit(0, &devinfo->ctl_op);
                return err;
        }
 
@@ -367,6 +368,7 @@ static int brcmf_usb_rx_ctlpkt(struct device *dev, u8 *buf, u32 len)
        err = brcmf_usb_recv_ctl(devinfo, buf, len);
        if (err) {
                brcmf_dbg(ERROR, "fail %d bytes: %d\n", err, len);
+               clear_bit(0, &devinfo->ctl_op);
                return err;
        }
        devinfo->ctl_completed = false;