aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-08-06 23:12:17 -0700
committerDavid S. Miller <davem@davemloft.net>2018-09-10 10:06:53 -0700
commite42a43a5cab2e019b5ab82bedb1340854709154d (patch)
tree19e096804a618082ac35346e3b6e8918b14c84a4 /drivers
parentmac80211: Don't access sk_queue_head->next directly. (diff)
downloadlinux-dev-e42a43a5cab2e019b5ab82bedb1340854709154d.tar.xz
linux-dev-e42a43a5cab2e019b5ab82bedb1340854709154d.zip
lan78xx: Do not access skb_queue_head list pointers directly.
Use skb_queue_walk() instead. Adjust inner loop test to utilize and skb_queue_is_first(). Unfortunately we have to keep pkt_cnt around because it is used by a latter loop in this function. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/lan78xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 331bc99d55e7..3ce3c66559e4 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -3340,9 +3340,9 @@ static void lan78xx_tx_bh(struct lan78xx_net *dev)
count = 0;
length = 0;
spin_lock_irqsave(&tqp->lock, flags);
- for (skb = tqp->next; pkt_cnt < tqp->qlen; skb = skb->next) {
+ skb_queue_walk(tqp, skb) {
if (skb_is_gso(skb)) {
- if (pkt_cnt) {
+ if (!skb_queue_is_first(tqp, skb)) {
/* handle previous packets first */
break;
}