]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
gianfar: Create net device with carrier down
authorTrent Piepho <tpiepho@freescale.com>
Thu, 2 Oct 2008 11:12:24 +0000 (11:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Oct 2008 00:03:12 +0000 (17:03 -0700)
commitd3eab82b554eeb51f038ac327b6c68c6afdee978
tree741ad313ae6a23434677ae037ab48964739ceae4
parentc3efab8ed4755e26962704731322bafdf5022f98
gianfar: Create net device with carrier down

The device's carrier status is controlled via the functions
netif_carrier_on() and netif_carrier_off().  These set or clear a bit
indicating the carrier (aka lower level link) is down, and if the state
changed, they fire off a routing netlink event.

Add a call to netif_carrier_off() before register_netdev() so that the
newly created device will be set to carrier down.  Then when the carrier
comes up for the first time, a netlink event will be generated, as the
carrier changed from down to up.  Otherwise the initial carrier up will
appear to be changing the status from up to up, and so no event is
generated since that's not a change.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gianfar.c