summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorhayeswang <hayeswang@realtek.com>2017-06-09 17:11:48 +0800
committerDavid S. Miller <davem@davemloft.net>2017-06-09 15:37:02 -0400
commita3307f9b1b3611e925123f8b052cc6f49e51d1bb (patch)
treeed459429393bb3e8d14a08ac9ce7eeb172299ff1 /drivers
parent745444583ab5c322def99907efa591860e38c75d (diff)
downloadlinux-a3307f9b1b3611e925123f8b052cc6f49e51d1bb.tar.bz2
r8152: replace napi_complete with napi_complete_done
Change from using napi_complete to napi_complete_done to allow for the use of gro_flush_timeout in tuning network processing. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/r8152.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index fa2958393730..5a02053181d1 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1938,7 +1938,8 @@ static int r8152_poll(struct napi_struct *napi, int budget)
bottom_half(tp);
if (work_done < budget) {
- napi_complete(napi);
+ if (!napi_complete_done(napi, work_done))
+ goto out;
if (!list_empty(&tp->rx_done))
napi_schedule(napi);
else if (!skb_queue_empty(&tp->tx_queue) &&
@@ -1946,6 +1947,7 @@ static int r8152_poll(struct napi_struct *napi, int budget)
napi_schedule(napi);
}
+out:
return work_done;
}