struct cp_private *cp = container_of(napi, struct cp_private, napi);
struct net_device *dev = cp->dev;
unsigned int rx_tail = cp->rx_tail;
- int rx;
+ int rx = 0;
- rx = 0;
-rx_status_loop:
cpw16(IntrStatus, cp_rx_intr_mask);
while (rx < budget) {
/* if we did not reach work limit, then we're done with
* this round of polling
*/
- if (rx < budget) {
+ if (rx < budget && napi_complete_done(napi, rx)) {
unsigned long flags;
- if (cpr16(IntrStatus) & cp_rx_intr_mask)
- goto rx_status_loop;
-
- napi_gro_flush(napi, false);
spin_lock_irqsave(&cp->lock, flags);
- __napi_complete(napi);
cpw16_f(IntrMask, cp_intr_mask);
spin_unlock_irqrestore(&cp->lock, flags);
}