提交 ebf84eaa 编写于 作者: A Alexander Beregalov 提交者: David S. Miller

sh_eth: convert to net_device_ops

Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7e4fdcb9
...@@ -1188,6 +1188,19 @@ static int sh_mdio_init(struct net_device *ndev, int id) ...@@ -1188,6 +1188,19 @@ static int sh_mdio_init(struct net_device *ndev, int id)
return ret; return ret;
} }
static const struct net_device_ops sh_eth_netdev_ops = {
.ndo_open = sh_eth_open,
.ndo_stop = sh_eth_close,
.ndo_start_xmit = sh_eth_start_xmit,
.ndo_get_stats = sh_eth_get_stats,
.ndo_set_multicast_list = sh_eth_set_multicast_list,
.ndo_tx_timeout = sh_eth_tx_timeout,
.ndo_do_ioctl = sh_eth_do_ioctl,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = eth_change_mtu,
};
static int sh_eth_drv_probe(struct platform_device *pdev) static int sh_eth_drv_probe(struct platform_device *pdev)
{ {
int ret, i, devno = 0; int ret, i, devno = 0;
...@@ -1240,13 +1253,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev) ...@@ -1240,13 +1253,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
mdp->edmac_endian = pd->edmac_endian; mdp->edmac_endian = pd->edmac_endian;
/* set function */ /* set function */
ndev->open = sh_eth_open; ndev->netdev_ops = &sh_eth_netdev_ops;
ndev->hard_start_xmit = sh_eth_start_xmit;
ndev->stop = sh_eth_close;
ndev->get_stats = sh_eth_get_stats;
ndev->set_multicast_list = sh_eth_set_multicast_list;
ndev->do_ioctl = sh_eth_do_ioctl;
ndev->tx_timeout = sh_eth_tx_timeout;
ndev->watchdog_timeo = TX_TIMEOUT; ndev->watchdog_timeo = TX_TIMEOUT;
mdp->post_rx = POST_RX >> (devno << 1); mdp->post_rx = POST_RX >> (devno << 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册