aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose/rose_dev.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 08:01:06 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:02:04 -0500
commit3170c6568776a58e1eeec8ff949a65f5cf5d7ceb (patch)
treedb01d1b65a75c6a4f53dca6b47f6abb7898ed4cb /net/rose/rose_dev.c
parentd289d120b46d9b6c68448b1d1c6d3edb94cdbde6 (diff)
rose: convert to network_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rose/rose_dev.c')
-rw-r--r--net/rose/rose_dev.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c
index ddb566707184..7dcf2569613b 100644
--- a/net/rose/rose_dev.c
+++ b/net/rose/rose_dev.c
@@ -149,18 +149,22 @@ static const struct header_ops rose_header_ops = {
149 .rebuild= rose_rebuild_header, 149 .rebuild= rose_rebuild_header,
150}; 150};
151 151
152static const struct net_device_ops rose_netdev_ops = {
153 .ndo_open = rose_open,
154 .ndo_stop = rose_close,
155 .ndo_start_xmit = rose_xmit,
156 .ndo_set_mac_address = rose_set_mac_address,
157};
158
152void rose_setup(struct net_device *dev) 159void rose_setup(struct net_device *dev)
153{ 160{
154 dev->mtu = ROSE_MAX_PACKET_SIZE - 2; 161 dev->mtu = ROSE_MAX_PACKET_SIZE - 2;
155 dev->hard_start_xmit = rose_xmit; 162 dev->netdev_ops = &rose_netdev_ops;
156 dev->open = rose_open;
157 dev->stop = rose_close;
158 163
159 dev->header_ops = &rose_header_ops; 164 dev->header_ops = &rose_header_ops;
160 dev->hard_header_len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN; 165 dev->hard_header_len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN;
161 dev->addr_len = ROSE_ADDR_LEN; 166 dev->addr_len = ROSE_ADDR_LEN;
162 dev->type = ARPHRD_ROSE; 167 dev->type = ARPHRD_ROSE;
163 dev->set_mac_address = rose_set_mac_address;
164 168
165 /* New-style flags. */ 169 /* New-style flags. */
166 dev->flags = IFF_NOARP; 170 dev->flags = IFF_NOARP;