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

Commit 129372d0 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik
Browse files

[PATCH] sky2: ring distance optimization



Faster way to compute ring distance.

Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent f2e46561
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1039,7 +1039,7 @@ static int sky2_up(struct net_device *dev)
/* Modular subtraction in ring */
static inline int tx_dist(unsigned tail, unsigned head)
{
	return (head >= tail ? head : head + TX_RING_SIZE) - tail;
	return (head - tail) % TX_RING_SIZE;
}

/* Number of list elements available for next tx */