linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] orinoco: convert to struct net_device_ops
@ 2009-01-21 17:46 Andrey Borzenkov
  2009-01-21 22:12 ` [Orinoco-devel] " Pavel Roskin
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2009-01-21 17:46 UTC (permalink / raw)
  To: orinoco-devel, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 2164 bytes --]

Subject: [PATCH] orinoco: convert to struct net_device_ops
From: Andrey Borzenkov <arvidjaar@mail.ru>

No functional changes; use new kernel interface for netdev methods.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>

---

 drivers/net/wireless/orinoco/orinoco.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)


diff --git a/drivers/net/wireless/orinoco/orinoco.c 
b/drivers/net/wireless/orinoco/orinoco.c
index 39eab39..d1207d0 100644
--- a/drivers/net/wireless/orinoco/orinoco.c
+++ b/drivers/net/wireless/orinoco/orinoco.c
@@ -3582,6 +3582,17 @@ static int orinoco_init(struct net_device *dev)
 	return err;
 }
 
+static const struct net_device_ops orinoco_netdev_ops = {
+	.ndo_init		= orinoco_init,
+	.ndo_open		= orinoco_open,
+	.ndo_stop		= orinoco_stop,
+	.ndo_start_xmit		= orinoco_xmit,
+	.ndo_set_multicast_list	= orinoco_set_multicast_list,
+	.ndo_change_mtu		= orinoco_change_mtu,
+	.ndo_tx_timeout		= orinoco_tx_timeout,
+	.ndo_get_stats		= orinoco_get_stats,
+};
+
 struct net_device
 *alloc_orinocodev(int sizeof_card,
 		  struct device *device,
@@ -3604,27 +3615,20 @@ struct net_device
 	priv->dev = device;
 
 	/* Setup / override net_device fields */
-	dev->init = orinoco_init;
-	dev->hard_start_xmit = orinoco_xmit;
-	dev->tx_timeout = orinoco_tx_timeout;
+	dev->netdev_ops = &orinoco_netdev_ops;
 	dev->watchdog_timeo = HZ; /* 1 second timeout */
-	dev->get_stats = orinoco_get_stats;
 	dev->ethtool_ops = &orinoco_ethtool_ops;
 	dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def;
 #ifdef WIRELESS_SPY
 	priv->wireless_data.spy_data = &priv->spy_data;
 	dev->wireless_data = &priv->wireless_data;
 #endif
-	dev->change_mtu = orinoco_change_mtu;
-	dev->set_multicast_list = orinoco_set_multicast_list;
 	/* we use the default eth_mac_addr for setting the MAC addr */
 
 	/* Reserve space in skb for the SNAP header */
 	dev->hard_header_len += ENCAPS_OVERHEAD;
 
 	/* Set up default callbacks */
-	dev->open = orinoco_open;
-	dev->stop = orinoco_stop;
 	priv->hard_reset = hard_reset;
 	priv->stop_fw = stop_fw;
 


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Orinoco-devel] [PATCH] orinoco: convert to struct net_device_ops
  2009-01-21 17:46 [PATCH] orinoco: convert to struct net_device_ops Andrey Borzenkov
@ 2009-01-21 22:12 ` Pavel Roskin
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Roskin @ 2009-01-21 22:12 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: orinoco-devel, linux-wireless

On Wed, 2009-01-21 at 20:46 +0300, Andrey Borzenkov wrote:
> Subject: [PATCH] orinoco: convert to struct net_device_ops
> From: Andrey Borzenkov <arvidjaar@mail.ru>
> 
> No functional changes; use new kernel interface for netdev methods.
> 
> Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>

Signed-off-by: Pavel Roskin <proski@gnu.org>

Verified by undefining CONFIG_COMPAT_NET_DEV_OPS in netdevice.h

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-21 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 17:46 [PATCH] orinoco: convert to struct net_device_ops Andrey Borzenkov
2009-01-21 22:12 ` [Orinoco-devel] " Pavel Roskin

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).