* [PATCH 1/10] Staging: at76: convert to netdev_ops
@ 2009-03-29 15:23 Alexander Beregalov
2009-03-29 20:49 ` David Miller
2009-04-05 0:50 ` Alexander Beregalov
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Beregalov @ 2009-03-29 15:23 UTC (permalink / raw)
To: gregkh, linux-kernel, netdev
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/staging/at76_usb/at76_usb.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c
index 6f6e36a..c8af9a8 100644
--- a/drivers/staging/at76_usb/at76_usb.c
+++ b/drivers/staging/at76_usb/at76_usb.c
@@ -5259,6 +5259,18 @@ static int at76_alloc_urbs(struct at76_priv *priv,
return 0;
}
+static const struct net_device_ops at76_netdev_ops = {
+ .ndo_open = at76_open,
+ .ndo_stop = at76_stop,
+ .ndo_get_stats = at76_get_stats,
+ .ndo_start_xmit = at76_tx,
+ .ndo_tx_timeout = at76_tx_timeout,
+ .ndo_set_multicast_list = at76_set_multicast,
+ .ndo_set_mac_address = at76_set_mac_address,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_change_mtu = eth_change_mtu,
+};
+
/* Register network device and initialize the hardware */
static int at76_init_new_device(struct at76_priv *priv,
struct usb_interface *interface)
@@ -5303,21 +5315,15 @@ static int at76_init_new_device(struct at76_priv *priv,
priv->scan_mode = SCAN_TYPE_ACTIVE;
netdev->flags &= ~IFF_MULTICAST; /* not yet or never */
- netdev->open = at76_open;
- netdev->stop = at76_stop;
- netdev->get_stats = at76_get_stats;
+ netdev->netdev_ops = &at76_netdev_ops;
netdev->ethtool_ops = &at76_ethtool_ops;
/* Add pointers to enable iwspy support. */
priv->wireless_data.spy_data = &priv->spy_data;
netdev->wireless_data = &priv->wireless_data;
- netdev->hard_start_xmit = at76_tx;
- netdev->tx_timeout = at76_tx_timeout;
netdev->watchdog_timeo = 2 * HZ;
netdev->wireless_handlers = &at76_handler_def;
- netdev->set_multicast_list = at76_set_multicast;
- netdev->set_mac_address = at76_set_mac_address;
dev_alloc_name(netdev, "wlan%d");
ret = register_netdev(priv->netdev);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/10] Staging: at76: convert to netdev_ops
2009-03-29 15:23 [PATCH 1/10] Staging: at76: convert to netdev_ops Alexander Beregalov
@ 2009-03-29 20:49 ` David Miller
2009-04-05 0:50 ` Alexander Beregalov
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2009-03-29 20:49 UTC (permalink / raw)
To: a.beregalov; +Cc: gregkh, linux-kernel, netdev
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Sun, 29 Mar 2009 19:23:34 +0400
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/10] Staging: at76: convert to netdev_ops
2009-03-29 15:23 [PATCH 1/10] Staging: at76: convert to netdev_ops Alexander Beregalov
2009-03-29 20:49 ` David Miller
@ 2009-04-05 0:50 ` Alexander Beregalov
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Beregalov @ 2009-04-05 0:50 UTC (permalink / raw)
To: gregkh, linux-kernel, netdev
2009/3/29 Alexander Beregalov <a.beregalov@gmail.com>:
>
>
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Greg, these patches fix build failures when CONFIG_COMPAT_NET_DEV_OPS
is not set.
I think they should be in 2.6.30 also.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-05 0:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 15:23 [PATCH 1/10] Staging: at76: convert to netdev_ops Alexander Beregalov
2009-03-29 20:49 ` David Miller
2009-04-05 0:50 ` Alexander Beregalov
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).