brcmfmac: finalize transmit upon any rollback failure
authorArend van Spriel <arend@broadcom.com>
Wed, 17 Apr 2013 19:25:56 +0000 (21:25 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Apr 2013 19:20:23 +0000 (15:20 -0400)
All rollback failures should result in freeing of the sk_buff
by calling brcmf_txfinalize().

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 1cfec5601c68eeef2e7d32ba966ebecbdc3add60..13518ecce04765bb20588bd976213dbe30dc8e73 100644 (file)
@@ -1616,7 +1616,6 @@ brcmf_fws_rollback_toq(struct brcmf_fws_info *fws, struct sk_buff *skb)
                                /* free the hanger slot */
                                brcmf_fws_hanger_poppkt(&fws->hanger, hslot,
                                                        &pktout, true);
-                               brcmf_txfinalize(fws->drvr, skb, false);
                                rc = -EINVAL;
                                goto fail;
                        }
@@ -1650,9 +1649,10 @@ brcmf_fws_rollback_toq(struct brcmf_fws_info *fws, struct sk_buff *skb)
 
 
 fail:
-       if (rc)
+       if (rc) {
+               brcmf_txfinalize(fws->drvr, skb, false);
                fws->stats.rollback_failed++;
-       else
+       else
                fws->stats.rollback_success++;
        return rc;
 }