aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 21:10:49 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 21:10:49 -0500
commit403413e50d6fc88dada28bf41262a3d0e3627827 (patch)
tree91fb973b9825d70cf921cf93149ee083bb88dd27 /drivers
parent3a1a27fa46f6c3ce39fe02b73df6d8d4648d1679 (diff)
b44: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/b44.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 0e7470a201f0..6926ebedfdc9 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2108,6 +2108,22 @@ static int __devinit b44_get_invariants(struct b44 *bp)
2108 return err; 2108 return err;
2109} 2109}
2110 2110
2111static const struct net_device_ops b44_netdev_ops = {
2112 .ndo_open = b44_open,
2113 .ndo_stop = b44_close,
2114 .ndo_start_xmit = b44_start_xmit,
2115 .ndo_get_stats = b44_get_stats,
2116 .ndo_set_multicast_list = b44_set_rx_mode,
2117 .ndo_set_mac_address = b44_set_mac_addr,
2118 .ndo_validate_addr = eth_validate_addr,
2119 .ndo_do_ioctl = b44_ioctl,
2120 .ndo_tx_timeout = b44_tx_timeout,
2121 .ndo_change_mtu = b44_change_mtu,
2122#ifdef CONFIG_NET_POLL_CONTROLLER
2123 .ndo_poll_controller = b44_poll_controller,
2124#endif
2125};
2126
2111static int __devinit b44_init_one(struct ssb_device *sdev, 2127static int __devinit b44_init_one(struct ssb_device *sdev,
2112 const struct ssb_device_id *ent) 2128 const struct ssb_device_id *ent)
2113{ 2129{
@@ -2145,20 +2161,9 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
2145 bp->rx_pending = B44_DEF_RX_RING_PENDING; 2161 bp->rx_pending = B44_DEF_RX_RING_PENDING;
2146 bp->tx_pending = B44_DEF_TX_RING_PENDING; 2162 bp->tx_pending = B44_DEF_TX_RING_PENDING;
2147 2163
2148 dev->open = b44_open; 2164 dev->netdev_ops = &b44_netdev_ops;
2149 dev->stop = b44_close;
2150 dev->hard_start_xmit = b44_start_xmit;
2151 dev->get_stats = b44_get_stats;
2152 dev->set_multicast_list = b44_set_rx_mode;
2153 dev->set_mac_address = b44_set_mac_addr;
2154 dev->do_ioctl = b44_ioctl;
2155 dev->tx_timeout = b44_tx_timeout;
2156 netif_napi_add(dev, &bp->napi, b44_poll, 64); 2165 netif_napi_add(dev, &bp->napi, b44_poll, 64);
2157 dev->watchdog_timeo = B44_TX_TIMEOUT; 2166 dev->watchdog_timeo = B44_TX_TIMEOUT;
2158#ifdef CONFIG_NET_POLL_CONTROLLER
2159 dev->poll_controller = b44_poll_controller;
2160#endif
2161 dev->change_mtu = b44_change_mtu;
2162 dev->irq = sdev->irq; 2167 dev->irq = sdev->irq;
2163 SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); 2168 SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);
2164 2169