Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96fb41fe authored by David S. Miller's avatar David S. Miller Committed by Liangliang Lu
Browse files

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.

Change-Id: I63a958b1545380d2f53905a7fe8ad807b8dcee39
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: e42a43a5cab2e019b5ab82bedb1340854709154d
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git


[luliang@codeaurora.org: remove '.' in commit summary line]
Signed-off-by: default avatarLiangliang Lu <luliang@codeaurora.org>
parent d3eec15e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3331,9 +3331,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;
			}