提交 1cc5920f 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

strip: convert to net_device_ops

Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1964e0de
...@@ -2477,6 +2477,16 @@ static const struct header_ops strip_header_ops = { ...@@ -2477,6 +2477,16 @@ static const struct header_ops strip_header_ops = {
.rebuild = strip_rebuild_header, .rebuild = strip_rebuild_header,
}; };
static const struct net_device_ops strip_netdev_ops = {
.ndo_open = strip_open_low,
.ndo_stop = strip_close_low,
.ndo_start_xmit = strip_xmit,
.ndo_set_mac_address = strip_set_mac_address,
.ndo_get_stats = strip_get_stats,
.ndo_change_mtu = strip_change_mtu,
};
/* /*
* This routine is called by DDI when the * This routine is called by DDI when the
* (dynamically assigned) device is registered * (dynamically assigned) device is registered
...@@ -2503,18 +2513,8 @@ static void strip_dev_setup(struct net_device *dev) ...@@ -2503,18 +2513,8 @@ static void strip_dev_setup(struct net_device *dev)
dev->dev_addr[0] = 0; dev->dev_addr[0] = 0;
dev->addr_len = sizeof(MetricomAddress); dev->addr_len = sizeof(MetricomAddress);
/* dev->header_ops = &strip_header_ops,
* Pointers to interface service routines. dev->netdev_ops = &strip_netdev_ops;
*/
dev->open = strip_open_low;
dev->stop = strip_close_low;
dev->hard_start_xmit = strip_xmit;
dev->header_ops = &strip_header_ops;
dev->set_mac_address = strip_set_mac_address;
dev->get_stats = strip_get_stats;
dev->change_mtu = strip_change_mtu;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册