Message ID | 20090411173019.GA16999@orion |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Alexander Beregalov <a.beregalov@gmail.com> Date: Sat, 11 Apr 2009 21:30:19 +0400 > Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2009/4/14 David Miller <davem@davemloft.net>: > From: Alexander Beregalov <a.beregalov@gmail.com> > Date: Sat, 11 Apr 2009 21:30:19 +0400 > >> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> > > Applied. Thanks David. It seems build should not fail with !CONFIG_COMPAT_NET_DEV_OPS anymore. Perhaps it can be changed to "default n" in next release (-next and 2.6.31) ? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Alexander Beregalov <a.beregalov@gmail.com> Date: Tue, 14 Apr 2009 03:12:27 +0400 > 2009/4/14 David Miller <davem@davemloft.net>: >> From: Alexander Beregalov <a.beregalov@gmail.com> >> Date: Sat, 11 Apr 2009 21:30:19 +0400 >> >>> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> >> >> Applied. > > Thanks David. > > It seems build should not fail with !CONFIG_COMPAT_NET_DEV_OPS anymore. > Perhaps it can be changed to "default n" in next release (-next and 2.6.31) ? I think we probably do that, sure. I'll try to remember to do this next time I merge net-2.6 into net-next-2.6 And after a few weeks of -next exposure I think we can remove the option and protected code entirely. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/xtsonic.c b/drivers/net/xtsonic.c index a12a721..5a4ad15 100644 --- a/drivers/net/xtsonic.c +++ b/drivers/net/xtsonic.c @@ -108,6 +108,18 @@ static int xtsonic_close(struct net_device *dev) return err; } +static const struct net_device_ops xtsonic_netdev_ops = { + .ndo_open = xtsonic_open, + .ndo_stop = xtsonic_close, + .ndo_start_xmit = sonic_send_packet, + .ndo_get_stats = sonic_get_stats, + .ndo_set_multicast_list = sonic_multicast_list, + .ndo_tx_timeout = sonic_tx_timeout, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; + static int __init sonic_probe1(struct net_device *dev) { static unsigned version_printed = 0; @@ -205,12 +217,7 @@ static int __init sonic_probe1(struct net_device *dev) lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS * SONIC_BUS_SCALE(lp->dma_bitmode)); - dev->open = xtsonic_open; - dev->stop = xtsonic_close; - dev->hard_start_xmit = sonic_send_packet; - dev->get_stats = sonic_get_stats; - dev->set_multicast_list = &sonic_multicast_list; - dev->tx_timeout = sonic_tx_timeout; + dev->netdev_ops = &xtsonic_netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; /*
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> --- drivers/net/xtsonic.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html