aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-11 03:40:49 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-13 18:16:25 -0400
commitebf84eaa927be41a440fd4c8f81e1844922bc0b2 (patch)
tree89147d1e733a2a8494f6db57a29e827b9f66aae9 /drivers/net
parent7e4fdcb99cd578c800fb7d6c298950a2938f9ca6 (diff)
sh_eth: 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/sh_eth.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 7b1882765a0c..3ab28bb00c12 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -1188,6 +1188,19 @@ out:
1188 return ret; 1188 return ret;
1189} 1189}
1190 1190
1191static const struct net_device_ops sh_eth_netdev_ops = {
1192 .ndo_open = sh_eth_open,
1193 .ndo_stop = sh_eth_close,
1194 .ndo_start_xmit = sh_eth_start_xmit,
1195 .ndo_get_stats = sh_eth_get_stats,
1196 .ndo_set_multicast_list = sh_eth_set_multicast_list,
1197 .ndo_tx_timeout = sh_eth_tx_timeout,
1198 .ndo_do_ioctl = sh_eth_do_ioctl,
1199 .ndo_validate_addr = eth_validate_addr,
1200 .ndo_set_mac_address = eth_mac_addr,
1201 .ndo_change_mtu = eth_change_mtu,
1202};
1203
1191static int sh_eth_drv_probe(struct platform_device *pdev) 1204static int sh_eth_drv_probe(struct platform_device *pdev)
1192{ 1205{
1193 int ret, i, devno = 0; 1206 int ret, i, devno = 0;
@@ -1240,13 +1253,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
1240 mdp->edmac_endian = pd->edmac_endian; 1253 mdp->edmac_endian = pd->edmac_endian;
1241 1254
1242 /* set function */ 1255 /* set function */
1243 ndev->open = sh_eth_open; 1256 ndev->netdev_ops = &sh_eth_netdev_ops;
1244 ndev->hard_start_xmit = sh_eth_start_xmit;
1245 ndev->stop = sh_eth_close;
1246 ndev->get_stats = sh_eth_get_stats;
1247 ndev->set_multicast_list = sh_eth_set_multicast_list;
1248 ndev->do_ioctl = sh_eth_do_ioctl;
1249 ndev->tx_timeout = sh_eth_tx_timeout;
1250 ndev->watchdog_timeo = TX_TIMEOUT; 1257 ndev->watchdog_timeo = TX_TIMEOUT;
1251 1258
1252 mdp->post_rx = POST_RX >> (devno << 1); 1259 mdp->post_rx = POST_RX >> (devno << 1);