Commit Graph

6 Commits (ca7a8e85262e93065b2a49dfb96a24d4a534a049)

Author SHA1 Message Date
Eric Dumazet 1ae5dc342a net: trans_start cleanups
Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Drivers can avoid one cache miss
(on dev->trans_start) in their start_xmit() handler.

Exceptions are NETIF_F_LLTX drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-10 05:01:31 -07:00
Eric Dumazet b05b7d9563 net: remove redundant code
eth_type_trans(skb, netdev) does the "skb->dev = netdev;"
initialization, we can remove it from various network drivers.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-30 23:51:10 -07:00
Joe Perches 8e95a2026f drivers/net: Move && and || to end of previous line
Only files where David Miller is the primary git-signer.
wireless, wimax, ixgbe, etc are not modified.

Compile tested x86 allyesconfig only
Not all files compiled (not x86 compatible)

Added a few > 80 column lines, which I ignored.
Existing checkpatch complaints ignored.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03 13:18:01 -08:00
Joe Perches a0607fd3a2 drivers/net: request_irq - Remove unnecessary leading & from second arg
Not as fancy as coccinelle.  Checkpatch errors ignored.
Compile tested allyesconfig x86, not all files compiled.

grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \
	perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\
done

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-18 23:29:17 -08:00
roel kluin 54706d9905 s6gmac: Read buffer overflow
Check whether index is within bounds before testing the element.
In the last iteration i is PHY_MAX_ADDR. the condition
`!(p = pd->mii.bus->phy_map[PHY_MAX_ADDR])' is undefined and may
evaluate to false, which leads to a dereference of this invalid
phy_map in the phy_connect() below.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-02 12:20:40 -07:00
Oskar Schirmer 8b0215aa5b s6gmac: xtensa s6000 on-chip ethernet driver
The s6000 on-chip MAC supports 10/100/1000Mbit and is connected to an
external PHY via MII or RGMII interface.

[jw@emlix.com: don't use device->bus_id directly]
Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Daniel Glockner <dg@emlix.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Johannes Weiner <jw@emlix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Zankel <chris@zankel.net>
2009-06-22 02:37:34 -07:00