linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: [PATCH 59/77] airo: convert to net_device_ops
Date: Fri, 20 Mar 2009 22:36:26 -0700	[thread overview]
Message-ID: <20090321053717.048069302@vyatta.com> (raw)
In-Reply-To: 20090321053527.316395697@vyatta.com

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/wireless/airo.c	2009-03-20 22:14:19.396839469 -0700
+++ b/drivers/net/wireless/airo.c	2009-03-20 22:25:53.106714188 -0700
@@ -2646,17 +2646,21 @@ static const struct header_ops airo_head
 	.parse = wll_header_parse,
 };
 
+static const struct net_device_ops airo11_netdev_ops = {
+	.ndo_open 		= airo_open,
+	.ndo_stop 		= airo_close,
+	.ndo_start_xmit 	= airo_start_xmit11,
+	.ndo_get_stats 		= airo_get_stats,
+	.ndo_set_mac_address	= airo_set_mac_address,
+	.ndo_do_ioctl		= airo_ioctl,
+	.ndo_change_mtu		= airo_change_mtu,
+};
+
 static void wifi_setup(struct net_device *dev)
 {
+	dev->netdev_ops = &airo11_netdev_ops;
 	dev->header_ops = &airo_header_ops;
-	dev->hard_start_xmit = &airo_start_xmit11;
-	dev->get_stats = &airo_get_stats;
-	dev->set_mac_address = &airo_set_mac_address;
-	dev->do_ioctl = &airo_ioctl;
 	dev->wireless_handlers = &airo_handler_def;
-	dev->change_mtu = &airo_change_mtu;
-	dev->open = &airo_open;
-	dev->stop = &airo_close;
 
 	dev->type               = ARPHRD_IEEE80211;
 	dev->hard_header_len    = ETH_HLEN;
@@ -2739,6 +2743,33 @@ static void airo_networks_initialize(str
 			      &ai->network_free_list);
 }
 
+static const struct net_device_ops airo_netdev_ops = {
+	.ndo_open		= airo_open,
+	.ndo_stop		= airo_close,
+	.ndo_start_xmit		= airo_start_xmit,
+	.ndo_get_stats		= airo_get_stats,
+	.ndo_set_multicast_list	= airo_set_multicast_list,
+	.ndo_set_mac_address	= airo_set_mac_address,
+	.ndo_do_ioctl		= airo_ioctl,
+	.ndo_change_mtu		= airo_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
+static const struct net_device_ops mpi_netdev_ops = {
+	.ndo_open		= airo_open,
+	.ndo_stop		= airo_close,
+	.ndo_start_xmit		= mpi_start_xmit,
+	.ndo_get_stats		= airo_get_stats,
+	.ndo_set_multicast_list	= airo_set_multicast_list,
+	.ndo_set_mac_address	= airo_set_mac_address,
+	.ndo_do_ioctl		= airo_ioctl,
+	.ndo_change_mtu		= airo_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
+
 static struct net_device *_init_airo_card( unsigned short irq, int port,
 					   int is_pcmcia, struct pci_dev *pci,
 					   struct device *dmdev )
@@ -2776,22 +2807,16 @@ static struct net_device *_init_airo_car
 		goto err_out_free;
 	airo_networks_initialize (ai);
 
+	skb_queue_head_init (&ai->txq);
+
 	/* The Airo-specific entries in the device structure. */
-	if (test_bit(FLAG_MPI,&ai->flags)) {
-		skb_queue_head_init (&ai->txq);
-		dev->hard_start_xmit = &mpi_start_xmit;
-	} else
-		dev->hard_start_xmit = &airo_start_xmit;
-	dev->get_stats = &airo_get_stats;
-	dev->set_multicast_list = &airo_set_multicast_list;
-	dev->set_mac_address = &airo_set_mac_address;
-	dev->do_ioctl = &airo_ioctl;
+	if (test_bit(FLAG_MPI,&ai->flags))
+		dev->netdev_ops = &mpi_netdev_ops;
+	else
+		dev->netdev_ops = &airo_netdev_ops;
 	dev->wireless_handlers = &airo_handler_def;
 	ai->wireless_data.spy_data = &ai->spy_data;
 	dev->wireless_data = &ai->wireless_data;
-	dev->change_mtu = &airo_change_mtu;
-	dev->open = &airo_open;
-	dev->stop = &airo_close;
 	dev->irq = irq;
 	dev->base_addr = port;
 

-- 


  parent reply	other threads:[~2009-03-21  5:48 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090321053527.316395697@vyatta.com>
2009-03-21  5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:47   ` David Miller
2009-03-21  5:36 ` [PATCH 55/77] netwave: convert to net_device_ops Stephen Hemminger
2009-03-22  5:48   ` David Miller
2009-03-21  5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
2009-03-22  5:47   ` David Miller
2009-03-21  5:36 ` [PATCH 57/77] wavelan: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:47   ` David Miller
2009-03-21  5:36 ` [PATCH 58/77] wavelan: convert to net_device_ops Stephen Hemminger
2009-03-22  5:47   ` David Miller
2009-03-21  5:36 ` Stephen Hemminger [this message]
2009-03-22  5:48   ` [PATCH 59/77] airo: " David Miller
2009-03-21  5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
2009-03-22  5:48   ` David Miller
2009-03-21  5:36 ` [PATCH 61/77] raylan: " Stephen Hemminger
2009-03-22  5:53   ` David Miller
2009-03-21  5:36 ` [PATCH 64/77] zd1201: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:53   ` David Miller
2009-03-21  5:36 ` [PATCH 65/77] zd1201: convert to net_device_ops Stephen Hemminger
2009-03-22  5:53   ` David Miller
2009-03-21  5:36 ` [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats Stephen Hemminger
2009-03-21 11:08   ` Johannes Berg
2009-03-22  5:49     ` David Miller
2009-03-22  5:53   ` David Miller
2009-03-21  5:36 ` [PATCH 67/77] prism54: convert to net_device_ops Stephen Hemminger
2009-03-22  5:53   ` David Miller
2009-03-21  5:36 ` [PATCH 68/77] prism54: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:53   ` David Miller
2009-03-21  5:36 ` [PATCH 69/77] libertas: " Stephen Hemminger
2009-03-22  5:54   ` David Miller
2009-03-21  5:36 ` [PATCH 70/77] libertas: convert to net_device_ops Stephen Hemminger
2009-03-22  5:54   ` David Miller
2009-03-21  5:36 ` [PATCH 71/77] ipw2x00: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:56   ` David Miller
2009-03-21  5:36 ` [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops Stephen Hemminger
2009-03-22  5:56   ` David Miller
2009-03-21  5:36 ` [PATCH 73/77] ipw2100: convert to net_device_ops Stephen Hemminger
2009-03-22  5:57   ` David Miller
2009-03-21  5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
2009-03-22  5:57   ` David Miller
2009-03-21  5:36 ` [PATCH 75/77] hostap: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:57   ` David Miller
2009-03-21  5:36 ` [PATCH 76/77] hostap: convert to net_device_ops Stephen Hemminger
2009-03-22  5:57   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090321053717.048069302@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).