lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Dec 2007 23:35:41 +0100
From:	Francois Romieu <romieu@...zoreil.com>
To:	Florian Fainelli <florian.fainelli@...ecomint.eu>
Cc:	jeff@...zik.org, Andrew Morton <akpm@...ux-foundation.org>,
	Sten Wang <sten.wang@....com.tw>, netdev@...r.kernel.org
Subject: Re: [PATCH] r6040 various cleanups

Florian Fainelli <florian.fainelli@...ecomint.eu> :
[r6040 changes]
> - remove unused private structure members
> - functions to allocate/free TX and RX buffers
> - recover from transmit timeout
> - use netdev_alloc_skb instead of dev_alloc_skb
> - do not use a private stats structure to store statistics
> - break each TX/RX error to a separate line for better reading
> - better control of the timer
> - clean the IRQ handler
> - fix typos and spelling mistakes in the driver

Thanks, I have split it in parts. The serie should be available shortly at:

git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6.git r6040

Please note that:
1. TIMER_WUT has been removed as it was not used any more
2. I have kept the difference below. Was the patch really supposed to update
   the same error counter twice ?

diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 19184e4..ff72c51 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -518,7 +519,9 @@ static int r6040_rx(struct net_device *dev, int limit)
 		if (err & 0x0020)
 			dev->stats.rx_over_errors++;
 		/* Received packet with too long or short */
-		if (err & (0x0010 | 0x0008))
+		if (err & 0x0010)
+			dev->stats.rx_length_errors++;
+		if (err & 0x0008)
 			dev->stats.rx_length_errors++;
 		/* Received packet with CRC errors */
 		if (err & 0x0004) {
@@ -579,7 +582,9 @@ static void r6040_tx(struct net_device *dev)
 
 		if (err & 0x0200)
 			dev->stats.rx_fifo_errors++;
-		if (err & (0x2000 | 0x4000))
+		if (err & 0x2000)
+			dev->stats.tx_carrier_errors++;
+		if (err & 0x4000)
 			dev->stats.tx_carrier_errors++;
 
 		if (descptr->status & 0x8000)

-- 
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists