diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-15 08:52:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-16 05:20:06 -0400 |
commit | 7a4762abf20531fc8d0bdbe132bc63181b8bebe8 (patch) | |
tree | e85700e9429c56bd4fd12ef73caf3c3ffe02178b /drivers/net | |
parent | eb9bdaee550e4a56592ae12171b0be6de8fc9d17 (diff) |
bmac: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bmac.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 44d015f70d1c..9578a3dfac01 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -1247,6 +1247,16 @@ static const struct ethtool_ops bmac_ethtool_ops = { | |||
1247 | .get_link = ethtool_op_get_link, | 1247 | .get_link = ethtool_op_get_link, |
1248 | }; | 1248 | }; |
1249 | 1249 | ||
1250 | static const struct net_device_ops bmac_netdev_ops = { | ||
1251 | .ndo_open = bmac_open, | ||
1252 | .ndo_stop = bmac_close, | ||
1253 | .ndo_start_xmit = bmac_output, | ||
1254 | .ndo_set_multicast_list = bmac_set_multicast, | ||
1255 | .ndo_set_mac_address = bmac_set_address, | ||
1256 | .ndo_change_mtu = eth_change_mtu, | ||
1257 | .ndo_validate_addr = eth_validate_addr, | ||
1258 | }; | ||
1259 | |||
1250 | static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match) | 1260 | static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match) |
1251 | { | 1261 | { |
1252 | int j, rev, ret; | 1262 | int j, rev, ret; |
@@ -1308,12 +1318,8 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i | |||
1308 | bmac_enable_and_reset_chip(dev); | 1318 | bmac_enable_and_reset_chip(dev); |
1309 | bmwrite(dev, INTDISABLE, DisableAll); | 1319 | bmwrite(dev, INTDISABLE, DisableAll); |
1310 | 1320 | ||
1311 | dev->open = bmac_open; | 1321 | dev->netdev_ops = &bmac_netdev_ops; |
1312 | dev->stop = bmac_close; | ||
1313 | dev->ethtool_ops = &bmac_ethtool_ops; | 1322 | dev->ethtool_ops = &bmac_ethtool_ops; |
1314 | dev->hard_start_xmit = bmac_output; | ||
1315 | dev->set_multicast_list = bmac_set_multicast; | ||
1316 | dev->set_mac_address = bmac_set_address; | ||
1317 | 1323 | ||
1318 | bmac_get_station_address(dev, addr); | 1324 | bmac_get_station_address(dev, addr); |
1319 | if (bmac_verify_checksum(dev) != 0) | 1325 | if (bmac_verify_checksum(dev) != 0) |