Commit graph

7 commits

Author SHA1 Message Date
Joachim Eastwood
c867b55eb4 net/ethernet: remove useless is_valid_ether_addr from drivers ndo_open
If ndo_validate_addr is set to the generic eth_validate_addr
function there is no point in calling is_valid_ether_addr
from driver ndo_open if ndo_open is not used elsewhere in
the driver.

With this change is_valid_ether_addr will be called from the
generic eth_validate_addr function. So there should be no change
in the actual behavior.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-19 19:01:18 -05:00
Wei Yongjun
1f7c9ae7a0 w5300: using eth_hw_addr_random() for random MAC and set device flag
Using eth_hw_addr_random() to generate a random Ethernet address
(MAC) to be used by a net device and set addr_assign_type.
Not need to duplicating its implementation.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-24 13:30:27 -04:00
Joe Perches
7efd26d0db ethernet: Use eth_random_addr
Convert the existing uses of random_ether_addr to
the new eth_random_addr.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-16 22:38:27 -07:00
Mike Sinkovsky
77577bf932 net: WIZnet drivers: fix possible NULL dereference
This fixes possible null dereference in probe() function: when both
.mac_addr and .link_gpio are unknown, dev.platform_data may be NULL

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mike Sinkovsky <msink@permonline.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13 13:34:12 -04:00
Geert Uytterhoeven
64d176fce1 wiznet: Add missing #include <linux/irq.h>
m68k/allmodconfig:

drivers/net/ethernet/wiznet/w5100.c: In function ‘w5100_hw_probe’:
drivers/net/ethernet/wiznet/w5100.c:680: error: ‘IRQ_TYPE_LEVEL_LOW’ undeclared (first use in this function)
drivers/net/ethernet/wiznet/w5300.c: In function ‘w5300_hw_probe’:
drivers/net/ethernet/wiznet/w5300.c:594: error: ‘IRQ_TYPE_LEVEL_LOW’ undeclared (first use in this function)

Include <linux/irq.h>, which provides the declaration for IRQ_TYPE_LEVEL_LOW.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-12 15:45:29 -04:00
Mike Sinkovsky
376b16f409 drivers/net: Remove CONFIG_WIZNET_TX_FLOW option
This option was there for debugging race conditions,
just remove it, and assume TX_FLOW is always enabled.

Signed-off-by: Mike Sinkovsky <msink@permonline.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-12 15:45:29 -04:00
Mike Sinkovsky
9899b81e7c Ethernet driver for the WIZnet W5300 chip
Based on original driver from chip manufacturer, but nearly full rewite.
Tested and used in production with Blackfin BF531 embedded processor.

Signed-off-by: Mike Sinkovsky <msink@permonline.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-05 01:43:02 -04:00