summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 13:01:38 +0000
committerDavid S. Miller <davem@davemloft.net>2009-01-21 14:02:39 -0800
commit3f75f7482f7687b8ffe9e0ddad560797a9f9ad6e (patch)
tree0f0a29d0e2fc6eaaf0ff6a63cbeb4d9ae600ed79
parent3c94acb7ee343e49075c8f3c72c1920633fc230c (diff)
downloadblackbird-op-linux-3f75f7482f7687b8ffe9e0ddad560797a9f9ad6e.tar.gz
blackbird-op-linux-3f75f7482f7687b8ffe9e0ddad560797a9f9ad6e.zip
yam: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/hamradio/yam.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index be280871e9ac..e2b0a19203ac 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -1044,6 +1044,14 @@ static int yam_set_mac_address(struct net_device *dev, void *addr)
/* --------------------------------------------------------------------- */
+static const struct net_device_ops yam_netdev_ops = {
+ .ndo_open = yam_open,
+ .ndo_stop = yam_close,
+ .ndo_start_xmit = yam_send_packet,
+ .ndo_do_ioctl = yam_ioctl,
+ .ndo_set_mac_address = yam_set_mac_address,
+};
+
static void yam_setup(struct net_device *dev)
{
struct yam_port *yp = netdev_priv(dev);
@@ -1064,18 +1072,11 @@ static void yam_setup(struct net_device *dev)
dev->base_addr = yp->iobase;
dev->irq = yp->irq;
- dev->open = yam_open;
- dev->stop = yam_close;
- dev->do_ioctl = yam_ioctl;
- dev->hard_start_xmit = yam_send_packet;
- dev->get_stats = yam_get_stats;
-
skb_queue_head_init(&yp->send_queue);
+ dev->netdev_ops = &yam_netdev_ops;
dev->header_ops = &ax25_header_ops;
- dev->set_mac_address = yam_set_mac_address;
-
dev->type = ARPHRD_AX25;
dev->hard_header_len = AX25_MAX_HEADER_LEN;
dev->mtu = AX25_MTU;
OpenPOWER on IntegriCloud