ethertap can use alloc_etherdev
Subsystems (2)
PATCH 1/1 ethertap can use alloc_etherdev
Can use alloc_etherdev, don't need to call ether_setup. Found by viro.
drivers/net/ethertap.c +1 -2
@@ -72,8 +72,7 @@struct net_device *dev;int err = -ENOMEM ; - dev =alloc_netdev (sizeof (struct net_local ),"tap%d" , - ether_setup); + dev =alloc_etherdev (sizeof (struct net_local ));if (!dev) goto out;
drivers/net/ethertap.c line 75
Quoted 13 lines · Stephen Hemminger
Can use
alloc_etherdev, don't need to callether_setup. Found by viro.diff -Nru
a/drivers/net/ethertap.cb/drivers/net/ethertap.cdrivers/net/ethertap.c +1
-2@@ -72,8 +72,7 @@struct net_device *dev;int err = -ENOMEM ; - dev =alloc_netdev (sizeof (struct net_local ),"tap%d" , - ether_setup); + dev =alloc_etherdev (sizeof (struct net_local ));
Um? This clearly changes the device's interface name, which alloc_etherdev() not ether_setup() assigns.
Jeff
Quoted 11 lines · On Tue, 11 Nov 2003 18:52:48 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 10 lines · Stephen Hemminger
Can use
alloc_etherdev, don't need to callether_setup. Found by viro.diff -Nru
a/drivers/net/ethertap.cb/drivers/net/ethertap.cdrivers/net/ethertap.c +0
-0@@ -72,8 +72,7 @@struct net_device *dev;int err = -ENOMEM ;
Quoted 8 lines
drivers/net/ethertap.c line 75
Quoted 3 lines
drivers/net/ethertap.c +1
-2- dev =alloc_netdev (sizeof (struct net_local ),"tap%d" , - ether_setup); + dev =alloc_etherdev (sizeof (struct net_local ));Um? This clearly changes the device's interface name, which
alloc_etherdev()notether_setup()assigns.
It forces it already several lines later and it hasn't registered yet.
if (!dev) goto out; SET_MODULE_OWNER(dev); sprintf(dev->name, "tap%d", unit); dev->base_addr = unit + NETLINK_TAPBASE;
Signature · 4 lines
Stephen Hemminger <[email protected]> Open Source Development Lab http://developer.osdl.org :-) Ignorance never settles a question
Quoted 1 line · Stephen Hemminger
It forces it already several lines later and it hasn't registered yet.
OK. I applied all but this patch and another one that didn't apply cleanly. Grab the latest net-drivers-2.5-exp patch I just posted, and resend against that...
Jeff