From: Don Fry Date: Thu, 29 Jun 2006 20:53:23 +0000 (-0700) Subject: [PATCH] pcnet32: Fix off-by-one in get_ringparam X-Git-Tag: MMI-PSA29.97-13-9~48364^2~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6dcd60c2c78ca87163730472ddea6aa1a7754b61;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] pcnet32: Fix off-by-one in get_ringparam Fix off-by-one in pcnet32_get_ringparam Signed-off-by: Don Fry Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 971bd6e91e4f..5fcd4d94871d 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -515,10 +515,10 @@ static void pcnet32_get_ringparam(struct net_device *dev, { struct pcnet32_private *lp = dev->priv; - ering->tx_max_pending = TX_MAX_RING_SIZE - 1; - ering->tx_pending = lp->tx_ring_size - 1; - ering->rx_max_pending = RX_MAX_RING_SIZE - 1; - ering->rx_pending = lp->rx_ring_size - 1; + ering->tx_max_pending = TX_MAX_RING_SIZE; + ering->tx_pending = lp->tx_ring_size; + ering->rx_max_pending = RX_MAX_RING_SIZE; + ering->rx_pending = lp->rx_ring_size; } static int pcnet32_set_ringparam(struct net_device *dev,