* [PATCH] PS3: gelic: convert to net_device_ops
@ 2009-01-16 4:57 Masakazu Mokuno
2009-01-16 6:07 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Masakazu Mokuno @ 2009-01-16 4:57 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, Geoff Levand
Convert the gelic driver to net_device_ops
Signed-off-by: Masakazu Mokuno <mokuno@sm•sony.co.jp>
---
drivers/net/ps3_gelic_net.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -1403,6 +1403,18 @@ void gelic_net_tx_timeout(struct net_dev
atomic_dec(&card->tx_timeout_task_counter);
}
+static const struct net_device_ops gelic_netdevice_ops = {
+ .ndo_open = gelic_net_open,
+ .ndo_stop = gelic_net_stop,
+ .ndo_start_xmit = gelic_net_xmit,
+ .ndo_set_multicast_list = gelic_net_set_multi,
+ .ndo_change_mtu = gelic_net_change_mtu,
+ .ndo_tx_timeout = gelic_net_tx_timeout,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = gelic_net_poll_controller,
+#endif
+};
+
/**
* gelic_ether_setup_netdev_ops - initialization of net_device operations
* @netdev: net_device structure
@@ -1412,21 +1424,12 @@ void gelic_net_tx_timeout(struct net_dev
static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
struct napi_struct *napi)
{
- netdev->open = &gelic_net_open;
- netdev->stop = &gelic_net_stop;
- netdev->hard_start_xmit = &gelic_net_xmit;
- netdev->set_multicast_list = &gelic_net_set_multi;
- netdev->change_mtu = &gelic_net_change_mtu;
- /* tx watchdog */
- netdev->tx_timeout = &gelic_net_tx_timeout;
netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT;
/* NAPI */
netif_napi_add(netdev, napi,
gelic_net_poll, GELIC_NET_NAPI_WEIGHT);
netdev->ethtool_ops = &gelic_ether_ethtool_ops;
-#ifdef CONFIG_NET_POLL_CONTROLLER
- netdev->poll_controller = gelic_net_poll_controller;
-#endif
+ netdev->netdev_ops = &gelic_netdevice_ops;
}
/**
--
Masakazu Mokuno
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PS3: gelic: convert to net_device_ops
2009-01-16 4:57 [PATCH] PS3: gelic: convert to net_device_ops Masakazu Mokuno
@ 2009-01-16 6:07 ` Stephen Hemminger
2009-01-16 7:09 ` Masakazu Mokuno
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2009-01-16 6:07 UTC (permalink / raw)
To: Masakazu Mokuno; +Cc: jgarzik, netdev, Geoff Levand
On Fri, 16 Jan 2009 13:57:15 +0900
Masakazu Mokuno <mokuno@sm•sony.co.jp> wrote:
> Convert the gelic driver to net_device_ops
>
> Signed-off-by: Masakazu Mokuno <mokuno@sm•sony.co.jp>
> ---
> drivers/net/ps3_gelic_net.c | 23 +++++++++++++----------
> 1 file changed, 13 insertions(+), 10 deletions(-)
>
> --- a/drivers/net/ps3_gelic_net.c
> +++ b/drivers/net/ps3_gelic_net.c
> @@ -1403,6 +1403,18 @@ void gelic_net_tx_timeout(struct net_dev
> atomic_dec(&card->tx_timeout_task_counter);
> }
>
> +static const struct net_device_ops gelic_netdevice_ops = {
> + .ndo_open = gelic_net_open,
> + .ndo_stop = gelic_net_stop,
> + .ndo_start_xmit = gelic_net_xmit,
> + .ndo_set_multicast_list = gelic_net_set_multi,
> + .ndo_change_mtu = gelic_net_change_mtu,
> + .ndo_tx_timeout = gelic_net_tx_timeout,
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> + .ndo_poll_controller = gelic_net_poll_controller,
> +#endif
>
You probably want to add:
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PS3: gelic: convert to net_device_ops
2009-01-16 6:07 ` Stephen Hemminger
@ 2009-01-16 7:09 ` Masakazu Mokuno
0 siblings, 0 replies; 3+ messages in thread
From: Masakazu Mokuno @ 2009-01-16 7:09 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: jgarzik, netdev, Geoff Levand
On Thu, 15 Jan 2009 22:07:08 -0800
Stephen Hemminger <shemminger@vyatta•com> wrote:
> On Fri, 16 Jan 2009 13:57:15 +0900
> Masakazu Mokuno <mokuno@sm•sony.co.jp> wrote:
>
> > Convert the gelic driver to net_device_ops
> >
> > Signed-off-by: Masakazu Mokuno <mokuno@sm•sony.co.jp>
> > ---
> > drivers/net/ps3_gelic_net.c | 23 +++++++++++++----------
> > 1 file changed, 13 insertions(+), 10 deletions(-)
> >
> > --- a/drivers/net/ps3_gelic_net.c
> > +++ b/drivers/net/ps3_gelic_net.c
> > @@ -1403,6 +1403,18 @@ void gelic_net_tx_timeout(struct net_dev
> > atomic_dec(&card->tx_timeout_task_counter);
> > }
> >
> > +static const struct net_device_ops gelic_netdevice_ops = {
> > + .ndo_open = gelic_net_open,
> > + .ndo_stop = gelic_net_stop,
> > + .ndo_start_xmit = gelic_net_xmit,
> > + .ndo_set_multicast_list = gelic_net_set_multi,
> > + .ndo_change_mtu = gelic_net_change_mtu,
> > + .ndo_tx_timeout = gelic_net_tx_timeout,
> > +#ifdef CONFIG_NET_POLL_CONTROLLER
> > + .ndo_poll_controller = gelic_net_poll_controller,
> > +#endif
> >
>
> You probably want to add:
> .ndo_change_mtu = eth_change_mtu,
> .ndo_set_mac_address = eth_mac_addr,
> .ndo_validate_addr = eth_validate_addr,
Thanks!
I'll respin.
--
Masakazu Mokuno
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-16 7:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 4:57 [PATCH] PS3: gelic: convert to net_device_ops Masakazu Mokuno
2009-01-16 6:07 ` Stephen Hemminger
2009-01-16 7:09 ` Masakazu Mokuno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox