]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/jme.c
ath9k: Update copyright in all the files
[karo-tx-linux.git] / drivers / net / jme.c
index 4da81a3602dc21d72b8b81c4de5c34488394f16d..860dcd98a07c1c036d3aa97286152ea5a061f05f 100644 (file)
@@ -956,13 +956,14 @@ jme_process_receive(struct jme_adapter *jme, int limit)
                goto out_inc;
 
        i = atomic_read(&rxring->next_to_clean);
-       while (limit-- > 0) {
+       while (limit > 0) {
                rxdesc = rxring->desc;
                rxdesc += i;
 
                if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) ||
                !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL))
                        goto out;
+               --limit;
 
                desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT;