netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/77] Convert most of the rest of the devices to net_device_ops
@ 2009-03-21  5:35 Stephen Hemminger
  2009-03-21  5:35 ` [PATCH 01/77] atm: convert mpc device to using netdev_ops Stephen Hemminger
                   ` (76 more replies)
  0 siblings, 77 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

This patch series against net-next-2.6 fixes most of the remaining
network devices to use net_device_ops. ALL ARE COMPILE TESTED ONLY.

-- 


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

* [PATCH 01/77] atm: convert mpc device to using netdev_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21 11:44   ` Chas Williams (CONTRACTOR)
  2009-03-22  2:34   ` David Miller
  2009-03-21  5:35 ` [PATCH 02/77] atm: cconvert clip driver to net_device_ops Stephen Hemminger
                   ` (75 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, chas; +Cc: netdev

[-- Attachment #1: atm-mpc.patch --]
[-- Type: text/plain, Size: 3264 bytes --]

This converts the mpc device to using new netdevice_ops.
Compile tested only, needs more than usual review since
device was swaping pointers around etc.

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

---
 net/atm/mpc.c |   32 ++++++++++++++------------------
 net/atm/mpc.h |    5 ++++-
 2 files changed, 18 insertions(+), 19 deletions(-)

--- a/net/atm/mpc.c	2009-03-19 22:40:30.534964257 -0700
+++ b/net/atm/mpc.c	2009-03-19 22:42:40.038902168 -0700
@@ -286,33 +286,32 @@ static void start_mpc(struct mpoa_client
 {
 
 	dprintk("mpoa: (%s) start_mpc:\n", mpc->dev->name);
-	if (dev->hard_start_xmit == NULL) {
-		printk("mpoa: (%s) start_mpc: dev->hard_start_xmit == NULL, not starting\n",
-		       dev->name);
-		return;
+	if (!dev->netdev_ops)
+		printk("mpoa: (%s) start_mpc  not starting\n", dev->name);
+	else {
+		mpc->old_ops = dev->netdev_ops;
+		mpc->new_ops = *mpc->old_ops;
+		mpc->new_ops.ndo_start_xmit = mpc_send_packet;
+		dev->netdev_ops = &mpc->new_ops;
 	}
-	mpc->old_hard_start_xmit = dev->hard_start_xmit;
-	dev->hard_start_xmit = mpc_send_packet;
-
-	return;
 }
 
 static void stop_mpc(struct mpoa_client *mpc)
 {
-
+	struct net_device *dev = mpc->dev;
 	dprintk("mpoa: (%s) stop_mpc:", mpc->dev->name);
 
 	/* Lets not nullify lec device's dev->hard_start_xmit */
-	if (mpc->dev->hard_start_xmit != mpc_send_packet) {
+	if (dev->netdev_ops != &mpc->new_ops) {
 		dprintk(" mpc already stopped, not fatal\n");
 		return;
 	}
 	dprintk("\n");
-	mpc->dev->hard_start_xmit = mpc->old_hard_start_xmit;
-	mpc->old_hard_start_xmit = NULL;
-	/* close_shortcuts(mpc);    ??? FIXME */
 
-	return;
+	dev->netdev_ops = mpc->old_ops;
+	mpc->old_ops = NULL;
+
+	/* close_shortcuts(mpc);    ??? FIXME */
 }
 
 static const char *mpoa_device_type_string(char type) __attribute__ ((unused));
@@ -531,7 +530,6 @@ static int send_via_shortcut(struct sk_b
  */
 static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev)
 {
-	int retval;
 	struct mpoa_client *mpc;
 	struct ethhdr *eth;
 	int i = 0;
@@ -561,9 +559,7 @@ static int mpc_send_packet(struct sk_buf
 	}
 
  non_ip:
-	retval = mpc->old_hard_start_xmit(skb,dev);
-
-	return retval;
+	return mpc->old_ops->ndo_start_xmit(skb,dev);
 }
 
 static int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg)
--- a/net/atm/mpc.h	2009-03-19 22:40:30.528964315 -0700
+++ b/net/atm/mpc.h	2009-03-19 22:42:40.038902168 -0700
@@ -15,7 +15,7 @@ struct mpoa_client {
 	struct mpoa_client *next;
 	struct net_device *dev;      /* lec in question                     */
 	int dev_num;                 /* e.g. 2 for lec2                     */
-	int (*old_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev);
+
 	struct atm_vcc *mpoad_vcc;   /* control channel to mpoad            */
 	uint8_t mps_ctrl_addr[ATM_ESA_LEN];  /* MPS control ATM address     */
 	uint8_t our_ctrl_addr[ATM_ESA_LEN];  /* MPC's control ATM address   */
@@ -31,6 +31,9 @@ struct mpoa_client {
 	uint8_t *mps_macs;           /* array of MPS MAC addresses, >=1     */
 	int number_of_mps_macs;      /* number of the above MAC addresses   */
 	struct mpc_parameters parameters;  /* parameters for this client    */
+
+	const struct net_device_ops *old_ops;
+	struct net_device_ops new_ops;
 };
 
 

-- 


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

* [PATCH 02/77] atm: cconvert clip driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
  2009-03-21  5:35 ` [PATCH 01/77] atm: convert mpc device to using netdev_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` David Miller
  2009-03-21  5:35 ` [ofa-general] [PATCH 03/77] infiniband: convert c2 " Stephen Hemminger
                   ` (74 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, chas; +Cc: netdev

[-- Attachment #1: atm-clip.patch --]
[-- Type: text/plain, Size: 979 bytes --]

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

---
 net/atm/clip.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/net/atm/clip.c	2009-03-19 22:40:30.510964125 -0700
+++ b/net/atm/clip.c	2009-03-19 22:42:40.824964180 -0700
@@ -552,10 +552,13 @@ static int clip_setentry(struct atm_vcc 
 	return error;
 }
 
+static const struct net_device_ops clip_netdev_ops = {
+	.ndo_start_xmit = clip_start_xmit,
+};
+
 static void clip_setup(struct net_device *dev)
 {
-	dev->hard_start_xmit = clip_start_xmit;
-	/* sg_xmit ... */
+	dev->netdev_ops = &clip_netdev_ops;
 	dev->type = ARPHRD_ATM;
 	dev->hard_header_len = RFC1483LLC_LEN;
 	dev->mtu = RFC1626_MTU;
@@ -615,7 +618,7 @@ static int clip_device_event(struct noti
 	}
 
 	/* ignore non-CLIP devices */
-	if (dev->type != ARPHRD_ATM || dev->hard_start_xmit != clip_start_xmit)
+	if (dev->type != ARPHRD_ATM || dev->netdev_ops != &clip_netdev_ops)
 		return NOTIFY_DONE;
 
 	switch (event) {

-- 


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

* [ofa-general] [PATCH 03/77] infiniband: convert c2 to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
  2009-03-21  5:35 ` [PATCH 01/77] atm: convert mpc device to using netdev_ops Stephen Hemminger
  2009-03-21  5:35 ` [PATCH 02/77] atm: cconvert clip driver to net_device_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21 18:26   ` [ofa-general] " Steve Wise
                     ` (2 more replies)
  2009-03-21  5:35 ` [ofa-general] [PATCH 04/77] infiniband: convert nes driver " Stephen Hemminger
                   ` (73 subsequent siblings)
  76 siblings, 3 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, tom, swise; +Cc: netdev, general

[-- Attachment #1: infiniband-c2.patch --]
[-- Type: text/plain, Size: 5609 bytes --]

Convert this driver to new net_device_ops infrastructure.
Also use default net_device get-stats infrastructure

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

---
 drivers/infiniband/hw/amso1100/c2.c          |   41 ++++++++++++---------------
 drivers/infiniband/hw/amso1100/c2.h          |    2 -
 drivers/infiniband/hw/amso1100/c2_provider.c |   22 +++++++-------
 3 files changed, 30 insertions(+), 35 deletions(-)

--- a/drivers/infiniband/hw/amso1100/c2.c	2009-03-19 22:40:30.574963980 -0700
+++ b/drivers/infiniband/hw/amso1100/c2.c	2009-03-19 22:42:42.388718732 -0700
@@ -76,7 +76,6 @@ static irqreturn_t c2_interrupt(int irq,
 static void c2_tx_timeout(struct net_device *netdev);
 static int c2_change_mtu(struct net_device *netdev, int new_mtu);
 static void c2_reset(struct c2_port *c2_port);
-static struct net_device_stats *c2_get_stats(struct net_device *netdev);
 
 static struct pci_device_id c2_pci_table[] = {
 	{ PCI_DEVICE(0x18b8, 0xb001) },
@@ -349,7 +348,7 @@ static void c2_tx_clean(struct c2_port *
 					     elem->hw_desc + C2_TXP_ADDR);
 				__raw_writew((__force u16) cpu_to_be16(TXP_HTXD_DONE),
 					     elem->hw_desc + C2_TXP_FLAGS);
-				c2_port->netstats.tx_dropped++;
+				c2_port->netdev->stats.tx_dropped++;
 				break;
 			} else {
 				__raw_writew(0,
@@ -457,7 +456,7 @@ static void c2_rx_error(struct c2_port *
 		     elem->hw_desc + C2_RXP_FLAGS);
 
 	pr_debug("packet dropped\n");
-	c2_port->netstats.rx_dropped++;
+	c2_port->netdev->stats.rx_dropped++;
 }
 
 static void c2_rx_interrupt(struct net_device *netdev)
@@ -532,8 +531,8 @@ static void c2_rx_interrupt(struct net_d
 		netif_rx(skb);
 
 		netdev->last_rx = jiffies;
-		c2_port->netstats.rx_packets++;
-		c2_port->netstats.rx_bytes += buflen;
+		netdev->stats.rx_packets++;
+		netdev->stats.rx_bytes += buflen;
 	}
 
 	/* Save where we left off */
@@ -797,8 +796,8 @@ static int c2_xmit_frame(struct sk_buff 
 	__raw_writew((__force u16) cpu_to_be16(TXP_HTXD_READY),
 		     elem->hw_desc + C2_TXP_FLAGS);
 
-	c2_port->netstats.tx_packets++;
-	c2_port->netstats.tx_bytes += maplen;
+	netdev->stats.tx_packets++;
+	netdev->stats.tx_bytes += maplen;
 
 	/* Loop thru additional data fragments and queue them */
 	if (skb_shinfo(skb)->nr_frags) {
@@ -823,8 +822,8 @@ static int c2_xmit_frame(struct sk_buff 
 			__raw_writew((__force u16) cpu_to_be16(TXP_HTXD_READY),
 				     elem->hw_desc + C2_TXP_FLAGS);
 
-			c2_port->netstats.tx_packets++;
-			c2_port->netstats.tx_bytes += maplen;
+			netdev->stats.tx_packets++;
+			netdev->stats.tx_bytes += maplen;
 		}
 	}
 
@@ -845,13 +844,6 @@ static int c2_xmit_frame(struct sk_buff 
 	return NETDEV_TX_OK;
 }
 
-static struct net_device_stats *c2_get_stats(struct net_device *netdev)
-{
-	struct c2_port *c2_port = netdev_priv(netdev);
-
-	return &c2_port->netstats;
-}
-
 static void c2_tx_timeout(struct net_device *netdev)
 {
 	struct c2_port *c2_port = netdev_priv(netdev);
@@ -880,6 +872,16 @@ static int c2_change_mtu(struct net_devi
 	return ret;
 }
 
+static const struct net_device_ops c2_netdev = {
+	.ndo_open 		= c2_up,
+	.ndo_stop 		= c2_down,
+	.ndo_start_xmit		= c2_xmit_frame,
+	.ndo_tx_timeout		= c2_tx_timeout,
+	.ndo_change_mtu		= c2_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /* Initialize network device */
 static struct net_device *c2_devinit(struct c2_dev *c2dev,
 				     void __iomem * mmio_addr)
@@ -894,12 +896,7 @@ static struct net_device *c2_devinit(str
 
 	SET_NETDEV_DEV(netdev, &c2dev->pcidev->dev);
 
-	netdev->open = c2_up;
-	netdev->stop = c2_down;
-	netdev->hard_start_xmit = c2_xmit_frame;
-	netdev->get_stats = c2_get_stats;
-	netdev->tx_timeout = c2_tx_timeout;
-	netdev->change_mtu = c2_change_mtu;
+	netdev->netdev_ops = &c2_netdev;
 	netdev->watchdog_timeo = C2_TX_TIMEOUT;
 	netdev->irq = c2dev->pcidev->irq;
 
--- a/drivers/infiniband/hw/amso1100/c2.h	2009-03-19 22:40:30.587964264 -0700
+++ b/drivers/infiniband/hw/amso1100/c2.h	2009-03-19 22:42:42.389902290 -0700
@@ -369,8 +369,6 @@ struct c2_port {
 	unsigned long mem_size;
 
 	u32 rx_buf_size;
-
-	struct net_device_stats netstats;
 };
 
 /*
--- a/drivers/infiniband/hw/amso1100/c2_provider.c	2009-03-19 22:40:30.579963953 -0700
+++ b/drivers/infiniband/hw/amso1100/c2_provider.c	2009-03-19 22:42:42.389902290 -0700
@@ -708,26 +708,27 @@ static int c2_pseudo_xmit_frame(struct s
 
 static int c2_pseudo_change_mtu(struct net_device *netdev, int new_mtu)
 {
-	int ret = 0;
-
 	if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU)
 		return -EINVAL;
 
 	netdev->mtu = new_mtu;
 
 	/* TODO: Tell rnic about new rmda interface mtu */
-	return ret;
+	return 0;
 }
 
+static const struct net_device_ops c2_pseudo_netdev_ops = {
+	.ndo_open 		= c2_pseudo_up,
+	.ndo_stop 		= c2_pseudo_down,
+	.ndo_start_xmit 	= c2_pseudo_xmit_frame,
+	.ndo_change_mtu 	= c2_pseudo_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static void setup(struct net_device *netdev)
 {
-	netdev->open = c2_pseudo_up;
-	netdev->stop = c2_pseudo_down;
-	netdev->hard_start_xmit = c2_pseudo_xmit_frame;
-	netdev->get_stats = NULL;
-	netdev->tx_timeout = NULL;
-	netdev->set_mac_address = NULL;
-	netdev->change_mtu = c2_pseudo_change_mtu;
+	netdev->netdev_ops = &c2_pseudo_netdev_ops;
+
 	netdev->watchdog_timeo = 0;
 	netdev->type = ARPHRD_ETHER;
 	netdev->mtu = 1500;
@@ -735,7 +736,6 @@ static void setup(struct net_device *net
 	netdev->addr_len = ETH_ALEN;
 	netdev->tx_queue_len = 0;
 	netdev->flags |= IFF_NOARP;
-	return;
 }
 
 static struct net_device *c2_pseudo_netdev_init(struct c2_dev *c2dev)

-- 

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

* [ofa-general] [PATCH 04/77] infiniband: convert nes driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (2 preceding siblings ...)
  2009-03-21  5:35 ` [ofa-general] [PATCH 03/77] infiniband: convert c2 " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` David Miller
  2009-03-21  5:35 ` [ofa-general] [PATCH 05/77] infiniband: convert ipoib " Stephen Hemminger
                   ` (72 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, faisal.latif, chien.tin.tung; +Cc: netdev, general

[-- Attachment #1: inifiband-nes.patch --]
[-- Type: text/plain, Size: 2541 bytes --]

Also, removed unnecessary memset() sinc alloc_netdev returns
zeroed memory.

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

---
 drivers/infiniband/hw/nes/nes_nic.c |   27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

--- a/drivers/infiniband/hw/nes/nes_nic.c	2009-03-19 22:40:30.556964185 -0700
+++ b/drivers/infiniband/hw/nes/nes_nic.c	2009-03-19 22:42:43.317902045 -0700
@@ -1568,6 +1568,19 @@ static void nes_netdev_vlan_rx_register(
 	spin_unlock_irqrestore(&nesadapter->phy_lock, flags);
 }
 
+static const struct net_device_ops nes_netdev_ops = {
+	.ndo_open 		= nes_netdev_open,
+	.ndo_stop		= nes_netdev_stop,
+	.ndo_start_xmit 	= nes_netdev_start_xmit,
+	.ndo_get_stats		= nes_netdev_get_stats,
+	.ndo_tx_timeout 	= nes_netdev_tx_timeout,
+	.ndo_set_mac_address	= nes_netdev_set_mac_address,
+	.ndo_set_multicast_list = nes_netdev_set_multicast_list,
+	.ndo_change_mtu		= nes_netdev_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_vlan_rx_register 	= nes_netdev_vlan_rx_register,
+};
 
 /**
  * nes_netdev_init - initialize network device
@@ -1593,17 +1606,6 @@ struct net_device *nes_netdev_init(struc
 
 	SET_NETDEV_DEV(netdev, &nesdev->pcidev->dev);
 
-	nesvnic = netdev_priv(netdev);
-	memset(nesvnic, 0, sizeof(*nesvnic));
-
-	netdev->open = nes_netdev_open;
-	netdev->stop = nes_netdev_stop;
-	netdev->hard_start_xmit = nes_netdev_start_xmit;
-	netdev->get_stats = nes_netdev_get_stats;
-	netdev->tx_timeout = nes_netdev_tx_timeout;
-	netdev->set_mac_address = nes_netdev_set_mac_address;
-	netdev->set_multicast_list = nes_netdev_set_multicast_list;
-	netdev->change_mtu = nes_netdev_change_mtu;
 	netdev->watchdog_timeo = NES_TX_TIMEOUT;
 	netdev->irq = nesdev->pcidev->irq;
 	netdev->mtu = ETH_DATA_LEN;
@@ -1611,14 +1613,15 @@ struct net_device *nes_netdev_init(struc
 	netdev->addr_len = ETH_ALEN;
 	netdev->type = ARPHRD_ETHER;
 	netdev->features = NETIF_F_HIGHDMA;
+	netdev->netdev_ops = &nes_netdev_ops;
 	netdev->ethtool_ops = &nes_ethtool_ops;
 	netif_napi_add(netdev, &nesvnic->napi, nes_netdev_poll, 128);
 	nes_debug(NES_DBG_INIT, "Enabling VLAN Insert/Delete.\n");
 	netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
-	netdev->vlan_rx_register = nes_netdev_vlan_rx_register;
 	netdev->features |= NETIF_F_LLTX;
 
 	/* Fill in the port structure */
+	nesvnic = netdev_priv(netdev);
 	nesvnic->netdev = netdev;
 	nesvnic->nesdev = nesdev;
 	nesvnic->msg_enable = netif_msg_init(debug, default_msg);

-- 

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

* [ofa-general] [PATCH 05/77] infiniband: convert ipoib to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (3 preceding siblings ...)
  2009-03-21  5:35 ` [ofa-general] [PATCH 04/77] infiniband: convert nes driver " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` [ofa-general] " David Miller
  2009-03-21  5:35 ` [PATCH 06/77] irda: net_device_ops ioctl fix Stephen Hemminger
                   ` (71 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, rolandd, sean.hefty, hal.rosenstock; +Cc: netdev, general

[-- Attachment #1: ipoib.patch --]
[-- Type: text/plain, Size: 1310 bytes --]

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

---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c	2009-03-19 22:40:30.490964092 -0700
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c	2009-03-19 22:42:44.247652266 -0700
@@ -1016,18 +1016,22 @@ static void ipoib_lro_setup(struct ipoib
 	priv->lro.lro_mgr.ip_summed_aggr = CHECKSUM_UNNECESSARY;
 }
 
+static const struct net_device_ops ipoib_netdev_ops = {
+	.ndo_open		 = ipoib_open,
+	.ndo_stop		 = ipoib_stop,
+	.ndo_change_mtu		 = ipoib_change_mtu,
+	.ndo_start_xmit	 	 = ipoib_start_xmit,
+	.ndo_tx_timeout		 = ipoib_timeout,
+	.ndo_set_multicast_list	 = ipoib_set_mcast_list,
+	.ndo_neigh_setup	 = ipoib_neigh_setup_dev,
+};
+
 static void ipoib_setup(struct net_device *dev)
 {
 	struct ipoib_dev_priv *priv = netdev_priv(dev);
 
-	dev->open		 = ipoib_open;
-	dev->stop		 = ipoib_stop;
-	dev->change_mtu		 = ipoib_change_mtu;
-	dev->hard_start_xmit	 = ipoib_start_xmit;
-	dev->tx_timeout		 = ipoib_timeout;
+	dev->netdev_ops		 = &ipoib_netdev_ops;
 	dev->header_ops		 = &ipoib_header_ops;
-	dev->set_multicast_list	 = ipoib_set_mcast_list;
-	dev->neigh_setup	 = ipoib_neigh_setup_dev;
 
 	ipoib_set_ethtool_ops(dev);
 

-- 

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

* [PATCH 06/77] irda: net_device_ops ioctl fix
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (4 preceding siblings ...)
  2009-03-21  5:35 ` [ofa-general] [PATCH 05/77] infiniband: convert ipoib " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` David Miller
                     ` (2 more replies)
  2009-03-21  5:35 ` [PATCH 07/77] irlan: convert to net_device_ops Stephen Hemminger
                   ` (70 subsequent siblings)
  76 siblings, 3 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda.patch --]
[-- Type: text/plain, Size: 798 bytes --]

Need to reference net_device_ops not old pointer.

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


---
 net/irda/irda_device.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/net/irda/irda_device.c	2009-03-19 22:40:30.469964248 -0700
+++ b/net/irda/irda_device.c	2009-03-19 22:42:44.867089916 -0700
@@ -149,13 +149,14 @@ int irda_device_is_receiving(struct net_
 
 	IRDA_DEBUG(2, "%s()\n", __func__);
 
-	if (!dev->do_ioctl) {
+	if (!dev->netdev_ops->ndo_do_ioctl) {
 		IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
 			   __func__);
 		return -1;
 	}
 
-	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCGRECEIVING);
+	ret = (dev->netdev_ops->ndo_do_ioctl)(dev, (struct ifreq *) &req,
+					      SIOCGRECEIVING);
 	if (ret < 0)
 		return ret;
 

-- 


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

* [PATCH 07/77] irlan: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (5 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 06/77] irda: net_device_ops ioctl fix Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` David Miller
  2009-03-23 11:33   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 08/77] irda: convert irda_usb " Stephen Hemminger
                   ` (69 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irlan.patch --]
[-- Type: text/plain, Size: 1500 bytes --]

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

---
 net/irda/irlan/irlan_eth.c |   19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

--- a/net/irda/irlan/irlan_eth.c	2009-03-19 22:40:30.449963919 -0700
+++ b/net/irda/irlan/irlan_eth.c	2009-03-19 22:42:45.749902310 -0700
@@ -45,6 +45,16 @@ static int  irlan_eth_xmit(struct sk_buf
 static void irlan_eth_set_multicast_list( struct net_device *dev);
 static struct net_device_stats *irlan_eth_get_stats(struct net_device *dev);
 
+static const struct net_device_ops irlan_eth_netdev_ops = {
+	.ndo_open               = irlan_eth_open,
+	.ndo_stop               = irlan_eth_close,
+	.ndo_start_xmit    	= irlan_eth_xmit,
+	.ndo_get_stats	        = irlan_eth_get_stats,
+	.ndo_set_multicast_list = irlan_eth_set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /*
  * Function irlan_eth_setup (dev)
  *
@@ -53,14 +63,11 @@ static struct net_device_stats *irlan_et
  */
 static void irlan_eth_setup(struct net_device *dev)
 {
-	dev->open               = irlan_eth_open;
-	dev->stop               = irlan_eth_close;
-	dev->hard_start_xmit    = irlan_eth_xmit;
-	dev->get_stats	        = irlan_eth_get_stats;
-	dev->set_multicast_list = irlan_eth_set_multicast_list;
+	ether_setup(dev);
+
+	dev->netdev_ops		= &irlan_eth_netdev_ops;
 	dev->destructor		= free_netdev;
 
-	ether_setup(dev);
 
 	/*
 	 * Lets do all queueing in IrTTP instead of this device driver.

-- 


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

* [PATCH 08/77] irda: convert irda_usb to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (6 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 07/77] irlan: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` David Miller
  2009-03-23 11:34   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 09/77] irda: convert mcs driver " Stephen Hemminger
                   ` (68 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-usb.patch --]
[-- Type: text/plain, Size: 1456 bytes --]

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


---
 drivers/net/irda/irda-usb.c |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

--- a/drivers/net/irda/irda-usb.c	2009-03-19 22:40:30.429651929 -0700
+++ b/drivers/net/irda/irda-usb.c	2009-03-19 22:42:46.433089198 -0700
@@ -1401,6 +1401,14 @@ static inline void irda_usb_init_qos(str
 }
 
 /*------------------------------------------------------------------*/
+static const struct net_device_ops irda_usb_netdev_ops = {
+	.ndo_open       = irda_usb_net_open,
+	.ndo_stop       = irda_usb_net_close,
+	.ndo_do_ioctl   = irda_usb_net_ioctl,
+	.ndo_start_xmit = irda_usb_hard_xmit,
+	.ndo_tx_timeout	= irda_usb_net_timeout,
+};
+
 /*
  * Initialise the network side of the irda-usb instance
  * Called when a new USB instance is registered in irda_usb_probe()
@@ -1411,15 +1419,9 @@ static inline int irda_usb_open(struct i
 
 	IRDA_DEBUG(1, "%s()\n", __func__);
 
-	irda_usb_init_qos(self);
+	netdev->netdev_ops = &irda_usb_netdev_ops;
 
-	/* Override the network functions we need to use */
-	netdev->hard_start_xmit = irda_usb_hard_xmit;
-	netdev->tx_timeout	= irda_usb_net_timeout;
-	netdev->watchdog_timeo  = 250*HZ/1000;	/* 250 ms > USB timeout */
-	netdev->open            = irda_usb_net_open;
-	netdev->stop            = irda_usb_net_close;
-	netdev->do_ioctl        = irda_usb_net_ioctl;
+	irda_usb_init_qos(self);
 
 	return register_netdev(netdev);
 }

-- 


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

* [PATCH 09/77] irda: convert mcs driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (7 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 08/77] irda: convert irda_usb " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` David Miller
  2009-03-23 11:34   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 10/77] stir4200: convert " Stephen Hemminger
                   ` (67 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-msc7780.patch --]
[-- Type: text/plain, Size: 1147 bytes --]

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

---
 drivers/net/irda/mcs7780.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

--- a/drivers/net/irda/mcs7780.c	2009-03-19 22:40:30.408964174 -0700
+++ b/drivers/net/irda/mcs7780.c	2009-03-19 22:42:47.157714010 -0700
@@ -873,6 +873,13 @@ static int mcs_hard_xmit(struct sk_buff 
 	return ret;
 }
 
+static const struct net_device_ops mcs_netdev_ops = {
+	.ndo_open = mcs_net_open,
+	.ndo_stop = mcs_net_close,
+	.ndo_start_xmit = mcs_hard_xmit,
+	.ndo_do_ioctl = mcs_net_ioctl,
+};
+
 /*
  * This function is called by the USB subsystem for each new device in the
  * system.  Need to verify the device and if it is, then start handling it.
@@ -919,11 +926,7 @@ static int mcs_probe(struct usb_interfac
 	/* Speed change work initialisation*/
 	INIT_WORK(&mcs->work, mcs_speed_work);
 
-	/* Override the network functions we need to use */
-	ndev->hard_start_xmit = mcs_hard_xmit;
-	ndev->open = mcs_net_open;
-	ndev->stop = mcs_net_close;
-	ndev->do_ioctl = mcs_net_ioctl;
+	ndev->netdev_ops = &mcs_netdev_ops;
 
 	if (!intf->cur_altsetting)
 		goto error2;

-- 


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

* [PATCH 10/77] stir4200: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (8 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 09/77] irda: convert mcs driver " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:34   ` David Miller
  2009-03-23 11:34   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 11/77] irda: convert w83977af_ir " Stephen Hemminger
                   ` (66 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-stir.patch --]
[-- Type: text/plain, Size: 1037 bytes --]

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

--- a/drivers/net/irda/stir4200.c	2009-03-19 22:40:30.388964511 -0700
+++ b/drivers/net/irda/stir4200.c	2009-03-19 22:42:47.828091113 -0700
@@ -1007,6 +1007,13 @@ static int stir_net_ioctl(struct net_dev
 	return ret;
 }
 
+static const struct net_device_ops stir_netdev_ops = {
+	.ndo_open       = stir_net_open,
+	.ndo_stop       = stir_net_close,
+	.ndo_start_xmit = stir_hard_xmit,
+	.ndo_do_ioctl   = stir_net_ioctl,
+};
+
 /*
  * This routine is called by the USB subsystem for each new device
  * in the system. We need to check if the device is ours, and in
@@ -1054,10 +1061,7 @@ static int stir_probe(struct usb_interfa
 	irda_qos_bits_to_value(&stir->qos);
 
 	/* Override the network functions we need to use */
-	net->hard_start_xmit = stir_hard_xmit;
-	net->open            = stir_net_open;
-	net->stop            = stir_net_close;
-	net->do_ioctl        = stir_net_ioctl;
+	net->netdev_ops = &stir_netdev_ops;
 
 	ret = register_netdev(net);
 	if (ret != 0)

-- 


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

* [PATCH 11/77] irda: convert w83977af_ir to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (9 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 10/77] stir4200: convert " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 12/77] irda: convert nsc_ircc driver " Stephen Hemminger
                   ` (65 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-w.patch --]
[-- Type: text/plain, Size: 1000 bytes --]

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

--- a/drivers/net/irda/w83977af_ir.c	2009-03-19 22:40:30.367964328 -0700
+++ b/drivers/net/irda/w83977af_ir.c	2009-03-19 22:42:48.582901908 -0700
@@ -140,6 +140,13 @@ static void __exit w83977af_cleanup(void
 	}
 }
 
+static const struct net_device_ops w83977_netdev_ops = {
+	.ndo_open       = w83977af_net_open,
+	.ndo_stop       = w83977af_net_close,
+	.ndo_start_xmit = w83977af_hard_xmit,
+	.ndo_do_ioctl   = w83977af_net_ioctl,
+};
+
 /*
  * Function w83977af_open (iobase, irq)
  *
@@ -231,11 +238,7 @@ static int w83977af_open(int i, unsigned
 	self->rx_buff.data = self->rx_buff.head;
 	self->netdev = dev;
 
-	/* Override the network functions we need to use */
-	dev->hard_start_xmit = w83977af_hard_xmit;
-	dev->open            = w83977af_net_open;
-	dev->stop            = w83977af_net_close;
-	dev->do_ioctl        = w83977af_net_ioctl;
+	dev->netdev_ops	= &w83977_netdev_ops;
 
 	err = register_netdev(dev);
 	if (err) {

-- 


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

* [PATCH 12/77] irda: convert nsc_ircc driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (10 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 11/77] irda: convert w83977af_ir " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 13/77] irda: convert ali " Stephen Hemminger
                   ` (64 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-nsc.patch --]
[-- Type: text/plain, Size: 1720 bytes --]

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

--- a/drivers/net/irda/nsc-ircc.c	2009-03-19 22:40:30.326964540 -0700
+++ b/drivers/net/irda/nsc-ircc.c	2009-03-19 22:42:49.228901973 -0700
@@ -331,6 +331,20 @@ static void __exit nsc_ircc_cleanup(void
 	pnp_registered = 0;
 }
 
+static const struct net_device_ops nsc_ircc_sir_ops = {
+	.ndo_open       = nsc_ircc_net_open,
+	.ndo_stop       = nsc_ircc_net_close,
+	.ndo_start_xmit = nsc_ircc_hard_xmit_sir,
+	.ndo_do_ioctl   = nsc_ircc_net_ioctl,
+};
+
+static const struct net_device_ops nsc_ircc_fir_ops = {
+	.ndo_open       = nsc_ircc_net_open,
+	.ndo_stop       = nsc_ircc_net_close,
+	.ndo_start_xmit = nsc_ircc_hard_xmit_fir,
+	.ndo_do_ioctl   = nsc_ircc_net_ioctl,
+};
+
 /*
  * Function nsc_ircc_open (iobase, irq)
  *
@@ -441,10 +455,7 @@ static int __init nsc_ircc_open(chipio_t
 	self->tx_fifo.tail = self->tx_buff.head;
 
 	/* Override the network functions we need to use */
-	dev->hard_start_xmit = nsc_ircc_hard_xmit_sir;
-	dev->open            = nsc_ircc_net_open;
-	dev->stop            = nsc_ircc_net_close;
-	dev->do_ioctl        = nsc_ircc_net_ioctl;
+	dev->netdev_ops = &nsc_ircc_sir_ops;
 
 	err = register_netdev(dev);
 	if (err) {
@@ -1320,12 +1331,12 @@ static __u8 nsc_ircc_change_speed(struct
 	switch_bank(iobase, BANK0); 
 	if (speed > 115200) {
 		/* Install FIR xmit handler */
-		dev->hard_start_xmit = nsc_ircc_hard_xmit_fir;
+		dev->netdev_ops = &nsc_ircc_fir_ops;
 		ier = IER_SFIF_IE;
 		nsc_ircc_dma_receive(self);
 	} else {
 		/* Install SIR xmit handler */
-		dev->hard_start_xmit = nsc_ircc_hard_xmit_sir;
+		dev->netdev_ops = &nsc_ircc_sir_ops;
 		ier = IER_RXHDL_IE;
 	}
 	/* Set our current interrupt mask */

-- 


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

* [PATCH 13/77] irda: convert ali driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (11 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 12/77] irda: convert nsc_ircc driver " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 14/77] irda: convert vlsi " Stephen Hemminger
                   ` (63 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-ali.patch --]
[-- Type: text/plain, Size: 1972 bytes --]

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

---
 drivers/net/irda/ali-ircc.c |   23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

--- a/drivers/net/irda/ali-ircc.c	2009-03-19 22:40:30.305965477 -0700
+++ b/drivers/net/irda/ali-ircc.c	2009-03-19 22:42:49.992901415 -0700
@@ -259,6 +259,20 @@ static void __exit ali_ircc_cleanup(void
 	IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
 }
 
+static const struct net_device_ops ali_ircc_sir_ops = {
+	.ndo_open       = ali_ircc_net_open,
+	.ndo_stop       = ali_ircc_net_close,
+	.ndo_start_xmit = ali_ircc_sir_hard_xmit,
+	.ndo_do_ioctl   = ali_ircc_net_ioctl,
+};
+
+static const struct net_device_ops ali_ircc_fir_ops = {
+	.ndo_open       = ali_ircc_net_open,
+	.ndo_stop       = ali_ircc_net_close,
+	.ndo_start_xmit = ali_ircc_fir_hard_xmit,
+	.ndo_do_ioctl   = ali_ircc_net_ioctl,
+};
+
 /*
  * Function ali_ircc_open (int i, chipio_t *inf)
  *
@@ -361,10 +375,7 @@ static int ali_ircc_open(int i, chipio_t
 	self->tx_fifo.tail = self->tx_buff.head;
 
 	/* Override the network functions we need to use */
-	dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
-	dev->open            = ali_ircc_net_open;
-	dev->stop            = ali_ircc_net_close;
-	dev->do_ioctl        = ali_ircc_net_ioctl;
+	dev->netdev_ops = &ali_ircc_sir_ops;
 
 	err = register_netdev(dev);
 	if (err) {
@@ -974,7 +985,7 @@ static void ali_ircc_change_speed(struct
 		ali_ircc_fir_change_speed(self, baud);			
 		
 		/* Install FIR xmit handler*/
-		dev->hard_start_xmit = ali_ircc_fir_hard_xmit;		
+		dev->netdev_ops = &ali_ircc_fir_ops;
 				
 		/* Enable Interuupt */
 		self->ier = IER_EOM; // benjamin 2000/11/20 07:24PM					
@@ -988,7 +999,7 @@ static void ali_ircc_change_speed(struct
 		ali_ircc_sir_change_speed(self, baud);
 				
 		/* Install SIR xmit handler*/
-		dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
+		dev->netdev_ops = &ali_ircc_sir_ops;
 	}
 	
 		

-- 


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

* [PATCH 14/77] irda: convert vlsi driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (12 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 13/77] irda: convert ali " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 15/77] irda: convert smsc " Stephen Hemminger
                   ` (62 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-vlsi.patch --]
[-- Type: text/plain, Size: 1220 bytes --]

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


---
 drivers/net/irda/vlsi_ir.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

--- a/drivers/net/irda/vlsi_ir.c	2009-03-19 22:40:30.270902366 -0700
+++ b/drivers/net/irda/vlsi_ir.c	2009-03-19 22:42:50.764027628 -0700
@@ -1573,6 +1573,14 @@ static int vlsi_close(struct net_device 
 	return 0;
 }
 
+static const struct net_device_ops vlsi_netdev_ops = {
+	.ndo_open       = vlsi_open,
+	.ndo_stop       = vlsi_close,
+	.ndo_start_xmit = vlsi_hard_start_xmit,
+	.ndo_do_ioctl   = vlsi_ioctl,
+	.ndo_tx_timeout = vlsi_tx_timeout,
+};
+
 static int vlsi_irda_init(struct net_device *ndev)
 {
 	vlsi_irda_dev_t *idev = netdev_priv(ndev);
@@ -1608,11 +1616,7 @@ static int vlsi_irda_init(struct net_dev
 	ndev->flags |= IFF_PORTSEL | IFF_AUTOMEDIA;
 	ndev->if_port = IF_PORT_UNKNOWN;
  
-	ndev->open	      = vlsi_open;
-	ndev->stop	      = vlsi_close;
-	ndev->hard_start_xmit = vlsi_hard_start_xmit;
-	ndev->do_ioctl	      = vlsi_ioctl;
-	ndev->tx_timeout      = vlsi_tx_timeout;
+	ndev->netdev_ops = &vlsi_netdev_ops;
 	ndev->watchdog_timeo  = 500*HZ/1000;	/* max. allowed turn time for IrLAP */
 
 	SET_NETDEV_DEV(ndev, &pdev->dev);

-- 


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

* [PATCH 15/77] irda: convert smsc driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (13 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 14/77] irda: convert vlsi " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:36   ` David Miller
  2009-03-23 11:36   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 16/77] irda: convert via-ircc " Stephen Hemminger
                   ` (61 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-smsc.patch --]
[-- Type: text/plain, Size: 2137 bytes --]

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


---
 drivers/net/irda/smsc-ircc2.c |   33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

--- a/drivers/net/irda/smsc-ircc2.c	2009-03-20 12:00:24.525964199 -0700
+++ b/drivers/net/irda/smsc-ircc2.c	2009-03-20 12:04:46.972777223 -0700
@@ -486,6 +486,26 @@ static int __init smsc_ircc_init(void)
 	return ret;
 }
 
+static int smsc_ircc_net_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct smsc_ircc_cb *self = netdev_priv(dev);
+
+	if (self->io.speed > 115200)
+		return 	smsc_ircc_hard_xmit_fir(skb, dev);
+	else
+		return 	smsc_ircc_hard_xmit_sir(skb, dev);
+}
+
+static const struct net_device_ops smsc_ircc_netdev_ops = {
+	.ndo_open       = smsc_ircc_net_open,
+	.ndo_stop       = smsc_ircc_net_close,
+	.ndo_do_ioctl   = smsc_ircc_net_ioctl,
+	.ndo_start_xmit = smsc_ircc_net_xmit,
+#if SMSC_IRCC2_C_NET_TIMEOUT
+	.ndo_tx_timeout	= smsc_ircc_timeout,
+#endif
+};
+
 /*
  * Function smsc_ircc_open (firbase, sirbase, dma, irq)
  *
@@ -519,14 +539,10 @@ static int __init smsc_ircc_open(unsigne
 		goto err_out1;
 	}
 
-	dev->hard_start_xmit = smsc_ircc_hard_xmit_sir;
 #if SMSC_IRCC2_C_NET_TIMEOUT
-	dev->tx_timeout	     = smsc_ircc_timeout;
 	dev->watchdog_timeo  = HZ * 2;  /* Allow enough time for speed change */
 #endif
-	dev->open            = smsc_ircc_net_open;
-	dev->stop            = smsc_ircc_net_close;
-	dev->do_ioctl        = smsc_ircc_net_ioctl;
+	dev->netdev_ops = &smsc_ircc_netdev_ops;
 
 	self = netdev_priv(dev);
 	self->netdev = dev;
@@ -995,9 +1011,6 @@ static void smsc_ircc_fir_start(struct s
 
 	/* Reset everything */
 
-	/* Install FIR transmit handler */
-	dev->hard_start_xmit = smsc_ircc_hard_xmit_fir;
-
 	/* Clear FIFO */
 	outb(inb(fir_base + IRCC_LCR_A) | IRCC_LCR_A_FIFO_RESET, fir_base + IRCC_LCR_A);
 
@@ -1894,7 +1907,6 @@ static void smsc_ircc_sir_start(struct s
 	IRDA_ASSERT(self != NULL, return;);
 	dev = self->netdev;
 	IRDA_ASSERT(dev != NULL, return;);
-	dev->hard_start_xmit = &smsc_ircc_hard_xmit_sir;
 
 	fir_base = self->io.fir_base;
 	sir_base = self->io.sir_base;

-- 


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

* [PATCH 16/77] irda: convert via-ircc to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (14 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 15/77] irda: convert smsc " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:36   ` David Miller
  2009-03-23 11:36   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 17/77] irda: convert sir device " Stephen Hemminger
                   ` (60 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-via.patch --]
[-- Type: text/plain, Size: 1705 bytes --]

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


---
 drivers/net/irda/via-ircc.c |   22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

--- a/drivers/net/irda/via-ircc.c	2009-03-19 22:44:21.282901713 -0700
+++ b/drivers/net/irda/via-ircc.c	2009-03-19 22:46:36.823964988 -0700
@@ -310,6 +310,19 @@ static void __exit via_ircc_cleanup(void
 	pci_unregister_driver (&via_driver); 
 }
 
+static const struct net_device_ops via_ircc_sir_ops = {
+	.ndo_start_xmit = via_ircc_hard_xmit_sir,
+	.ndo_open = via_ircc_net_open,
+	.ndo_stop = via_ircc_net_close,
+	.ndo_do_ioctl = via_ircc_net_ioctl,
+};
+static const struct net_device_ops via_ircc_fir_ops = {
+	.ndo_start_xmit = via_ircc_hard_xmit_fir,
+	.ndo_open = via_ircc_net_open,
+	.ndo_stop = via_ircc_net_close,
+	.ndo_do_ioctl = via_ircc_net_ioctl,
+};
+
 /*
  * Function via_ircc_open (iobase, irq)
  *
@@ -428,10 +441,7 @@ static __devinit int via_ircc_open(int i
 	self->tx_fifo.tail = self->tx_buff.head;
 
 	/* Override the network functions we need to use */
-	dev->hard_start_xmit = via_ircc_hard_xmit_sir;
-	dev->open = via_ircc_net_open;
-	dev->stop = via_ircc_net_close;
-	dev->do_ioctl = via_ircc_net_ioctl;
+	dev->netdev_ops = &via_ircc_sir_ops;
 
 	err = register_netdev(dev);
 	if (err)
@@ -798,11 +808,11 @@ static void via_ircc_change_speed(struct
 
 	if (speed > 115200) {
 		/* Install FIR xmit handler */
-		dev->hard_start_xmit = via_ircc_hard_xmit_fir;
+		dev->netdev_ops = &via_ircc_fir_ops;
 		via_ircc_dma_receive(self);
 	} else {
 		/* Install SIR xmit handler */
-		dev->hard_start_xmit = via_ircc_hard_xmit_sir;
+		dev->netdev_ops = &via_ircc_sir_ops;
 	}
 	netif_wake_queue(dev);
 }

-- 


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

* [PATCH 17/77] irda: convert sir device to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (15 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 16/77] irda: convert via-ircc " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:36   ` David Miller
  2009-03-23 11:36   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 18/77] irda: convert kignsun " Stephen Hemminger
                   ` (59 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-sir.patch --]
[-- Type: text/plain, Size: 1002 bytes --]

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


--- a/drivers/net/irda/sir_dev.c	2009-03-19 22:52:52.826089334 -0700
+++ b/drivers/net/irda/sir_dev.c	2009-03-19 23:09:32.268774083 -0700
@@ -865,6 +865,12 @@ out:
 	return 0;
 }
 
+static const struct net_device_ops sirdev_ops = {
+	.ndo_start_xmit	= sirdev_hard_xmit,
+	.ndo_open	= sirdev_open,
+	.ndo_stop	= sirdev_close,
+	.ndo_do_ioctl	= sirdev_ioctl,
+};
 /* ----------------------------------------------------------------------------- */
 
 struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name)
@@ -908,10 +914,7 @@ struct sir_dev * sirdev_get_instance(con
 	dev->netdev = ndev;
 
 	/* Override the network functions we need to use */
-	ndev->hard_start_xmit = sirdev_hard_xmit;
-	ndev->open = sirdev_open;
-	ndev->stop = sirdev_close;
-	ndev->do_ioctl = sirdev_ioctl;
+	ndev->netdev_ops = &sirdev_ops;
 
 	if (register_netdev(ndev)) {
 		IRDA_ERROR("%s(), register_netdev() failed!\n", __func__);

-- 


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

* [PATCH 18/77] irda: convert kignsun device to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (16 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 17/77] irda: convert sir device " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:37   ` David Miller
  2009-03-23 11:37   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 19/77] irda: convert ksdazzle " Stephen Hemminger
                   ` (58 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: kingsun.patch --]
[-- Type: text/plain, Size: 1007 bytes --]

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

--- a/drivers/net/irda/kingsun-sir.c	2009-03-19 22:49:39.434901885 -0700
+++ b/drivers/net/irda/kingsun-sir.c	2009-03-19 22:52:44.909902552 -0700
@@ -418,6 +418,12 @@ static int kingsun_net_ioctl(struct net_
 	return ret;
 }
 
+static const struct net_device_ops kingsun_ops = {
+	.ndo_start_xmit = kingsun_hard_xmit,
+	.ndo_open            = kingsun_net_open,
+	.ndo_stop            = kingsun_net_close,
+	.ndo_do_ioctl        = kingsun_net_ioctl,
+};
 
 /*
  * This routine is called by the USB subsystem for each new device
@@ -520,10 +526,7 @@ static int kingsun_probe(struct usb_inte
 	irda_qos_bits_to_value(&kingsun->qos);
 
 	/* Override the network functions we need to use */
-	net->hard_start_xmit = kingsun_hard_xmit;
-	net->open            = kingsun_net_open;
-	net->stop            = kingsun_net_close;
-	net->do_ioctl        = kingsun_net_ioctl;
+	net->netdev_ops = &kingsun_ops;
 
 	ret = register_netdev(net);
 	if (ret != 0)

-- 


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

* [PATCH 19/77] irda: convert ksdazzle device to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (17 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 18/77] irda: convert kignsun " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:37   ` David Miller
  2009-03-23 11:37   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 20/77] irda: convert ks959 " Stephen Hemminger
                   ` (57 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: ksdazzle.patch --]
[-- Type: text/plain, Size: 1027 bytes --]

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

--- a/drivers/net/irda/ksdazzle-sir.c	2009-03-19 22:52:37.149901612 -0700
+++ b/drivers/net/irda/ksdazzle-sir.c	2009-03-19 23:08:49.416839813 -0700
@@ -562,6 +562,13 @@ static int ksdazzle_net_ioctl(struct net
 	return ret;
 }
 
+static const struct net_device_ops ksdazzle_ops = {
+	.ndo_start_xmit	= ksdazzle_hard_xmit,
+	.ndo_open	= ksdazzle_net_open,
+	.ndo_stop	= ksdazzle_net_close,
+	.ndo_do_ioctl	= ksdazzle_net_ioctl,
+};
+
 /*
  * This routine is called by the USB subsystem for each new device
  * in the system. We need to check if the device is ours, and in
@@ -684,10 +691,7 @@ static int ksdazzle_probe(struct usb_int
 	irda_qos_bits_to_value(&kingsun->qos);
 
 	/* Override the network functions we need to use */
-	net->hard_start_xmit = ksdazzle_hard_xmit;
-	net->open = ksdazzle_net_open;
-	net->stop = ksdazzle_net_close;
-	net->do_ioctl = ksdazzle_net_ioctl;
+	net->netdev_ops = &ksdazzle_ops;
 
 	ret = register_netdev(net);
 	if (ret != 0)

-- 


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

* [PATCH 20/77] irda: convert ks959 device to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (18 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 19/77] irda: convert ksdazzle " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:37   ` David Miller
  2009-03-23 11:37   ` Samuel Ortiz
  2009-03-21  5:35 ` [PATCH 21/77] usbnet: convert catc to internal net_device_stats Stephen Hemminger
                   ` (56 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, samuel; +Cc: netdev

[-- Attachment #1: irda-ks959.patch --]
[-- Type: text/plain, Size: 989 bytes --]

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

--- a/drivers/net/irda/ks959-sir.c	2009-03-19 23:10:00.793089980 -0700
+++ b/drivers/net/irda/ks959-sir.c	2009-03-19 23:11:27.344651666 -0700
@@ -668,6 +668,12 @@ static int ks959_net_ioctl(struct net_de
 	return ret;
 }
 
+static const struct net_device_ops ks959_ops = {
+	.ndo_start_xmit	= ks959_hard_xmit,
+	.ndo_open	= ks959_net_open,
+	.ndo_stop	= ks959_net_close,
+	.ndo_do_ioctl	= ks959_net_ioctl,
+};
 /*
  * This routine is called by the USB subsystem for each new device
  * in the system. We need to check if the device is ours, and in
@@ -780,10 +786,7 @@ static int ks959_probe(struct usb_interf
 	irda_qos_bits_to_value(&kingsun->qos);
 
 	/* Override the network functions we need to use */
-	net->hard_start_xmit = ks959_hard_xmit;
-	net->open = ks959_net_open;
-	net->stop = ks959_net_close;
-	net->do_ioctl = ks959_net_ioctl;
+	net->netdev_ops = &ks959_ops;
 
 	ret = register_netdev(net);
 	if (ret != 0)

-- 


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

* [PATCH 21/77] usbnet: convert catc to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (19 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 20/77] irda: convert ks959 " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-22  2:45   ` David Miller
  2009-03-21  5:35 ` [PATCH 22/77] usbnet: convert catc device to net_device_ops Stephen Hemminger
                   ` (55 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-catc-stats.patch --]
[-- Type: text/plain, Size: 3381 bytes --]

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

--- a/drivers/net/usb/catc.c	2009-03-20 12:09:50.229089806 -0700
+++ b/drivers/net/usb/catc.c	2009-03-20 12:10:10.851651580 -0700
@@ -163,7 +163,6 @@ struct catc {
 	struct net_device *netdev;
 	struct usb_device *usbdev;
 
-	struct net_device_stats stats;
 	unsigned long flags;
 
 	unsigned int tx_ptr, tx_idx;
@@ -245,8 +244,8 @@ static void catc_rx_done(struct urb *urb
 		if(!catc->is_f5u011) {
 			pkt_len = le16_to_cpup((__le16*)pkt_start);
 			if (pkt_len > urb->actual_length) {
-				catc->stats.rx_length_errors++;
-				catc->stats.rx_errors++;
+				catc->netdev->stats.rx_length_errors++;
+				catc->netdev->stats.rx_errors++;
 				break;
 			}
 		} else {
@@ -262,8 +261,8 @@ static void catc_rx_done(struct urb *urb
 		skb->protocol = eth_type_trans(skb, catc->netdev);
 		netif_rx(skb);
 
-		catc->stats.rx_packets++;
-		catc->stats.rx_bytes += pkt_len;
+		catc->netdev->stats.rx_packets++;
+		catc->netdev->stats.rx_bytes += pkt_len;
 
 		/* F5U011 only does one packet per RX */
 		if (catc->is_f5u011)
@@ -386,7 +385,7 @@ static void catc_tx_done(struct urb *urb
 		dbg("Tx Reset.");
 		urb->status = 0;
 		catc->netdev->trans_start = jiffies;
-		catc->stats.tx_errors++;
+		catc->netdev->stats.tx_errors++;
 		clear_bit(TX_RUNNING, &catc->flags);
 		netif_wake_queue(catc->netdev);
 		return;
@@ -412,7 +411,7 @@ static void catc_tx_done(struct urb *urb
 	spin_unlock_irqrestore(&catc->tx_lock, flags);
 }
 
-static int catc_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static int catc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
 	struct catc *catc = netdev_priv(netdev);
 	unsigned long flags;
@@ -443,8 +442,8 @@ static int catc_hard_start_xmit(struct s
 	spin_unlock_irqrestore(&catc->tx_lock, flags);
 
 	if (r >= 0) {
-		catc->stats.tx_bytes += skb->len;
-		catc->stats.tx_packets++;
+		catc->netdev->stats.tx_bytes += skb->len;
+		catc->netdev->stats.tx_packets++;
 	}
 
 	dev_kfree_skb(skb);
@@ -588,15 +587,15 @@ static void catc_stats_done(struct catc 
 	switch (index) {
 		case TxSingleColl:
 		case TxMultiColl:
-			catc->stats.collisions += data - last;
+			catc->netdev->stats.collisions += data - last;
 			break;
 		case TxExcessColl:
-			catc->stats.tx_aborted_errors += data - last;
-			catc->stats.tx_errors += data - last;
+			catc->netdev->stats.tx_aborted_errors += data - last;
+			catc->netdev->stats.tx_errors += data - last;
 			break;
 		case RxFramErr:
-			catc->stats.rx_frame_errors += data - last;
-			catc->stats.rx_errors += data - last;
+			catc->netdev->stats.rx_frame_errors += data - last;
+			catc->netdev->stats.rx_errors += data - last;
 			break;
 	}
 
@@ -614,12 +613,6 @@ static void catc_stats_timer(unsigned lo
 	mod_timer(&catc->timer, jiffies + STATS_UPDATE);
 }
 
-static struct net_device_stats *catc_get_stats(struct net_device *netdev)
-{
-	struct catc *catc = netdev_priv(netdev);
-	return &catc->stats;
-}
-
 /*
  * Receive modes. Broadcast, Multicast, Promisc.
  */
@@ -777,7 +770,6 @@ static int catc_probe(struct usb_interfa
 	netdev->open = catc_open;
 	netdev->hard_start_xmit = catc_hard_start_xmit;
 	netdev->stop = catc_stop;
-	netdev->get_stats = catc_get_stats;
 	netdev->tx_timeout = catc_tx_timeout;
 	netdev->watchdog_timeo = TX_TIMEOUT;
 	netdev->set_multicast_list = catc_set_multicast_list;

-- 


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

* [PATCH 22/77] usbnet: convert catc device to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (20 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 21/77] usbnet: convert catc to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:01   ` David Brownell
                     ` (2 more replies)
  2009-03-21  5:35 ` [PATCH 23/77] usbnet: convert to internal net_device stats Stephen Hemminger
                   ` (54 subsequent siblings)
  76 siblings, 3 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-catc.patch --]
[-- Type: text/plain, Size: 1111 bytes --]

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

--- a/drivers/net/usb/catc.c	2009-03-20 12:10:10.851651580 -0700
+++ b/drivers/net/usb/catc.c	2009-03-20 12:10:23.060839265 -0700
@@ -743,6 +743,18 @@ static int catc_stop(struct net_device *
 	return 0;
 }
 
+static const struct net_device_ops catc_netdev_ops = {
+	.ndo_open		= catc_open,
+	.ndo_stop		= catc_stop,
+	.ndo_start_xmit		= catc_start_xmit,
+
+	.ndo_tx_timeout		= catc_tx_timeout,
+	.ndo_set_multicast_list = catc_set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /*
  * USB probe, disconnect.
  */
@@ -767,12 +779,8 @@ static int catc_probe(struct usb_interfa
 
 	catc = netdev_priv(netdev);
 
-	netdev->open = catc_open;
-	netdev->hard_start_xmit = catc_hard_start_xmit;
-	netdev->stop = catc_stop;
-	netdev->tx_timeout = catc_tx_timeout;
+	netdev->netdev_ops = &catc_netdev_ops;
 	netdev->watchdog_timeo = TX_TIMEOUT;
-	netdev->set_multicast_list = catc_set_multicast_list;
 	SET_ETHTOOL_OPS(netdev, &ops);
 
 	catc->usbdev = usbdev;

-- 


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

* [PATCH 23/77] usbnet: convert to internal net_device stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (21 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 22/77] usbnet: convert catc device to net_device_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:01   ` David Brownell
  2009-03-22  2:45   ` David Miller
  2009-03-21  5:35 ` [PATCH 24/77] usbnet: convert rtl driver to net_device_ops Stephen Hemminger
                   ` (53 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-rtl-stats.patch --]
[-- Type: text/plain, Size: 2776 bytes --]

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

--- a/drivers/net/usb/rtl8150.c	2009-03-20 12:11:35.825901868 -0700
+++ b/drivers/net/usb/rtl8150.c	2009-03-20 12:12:47.085715442 -0700
@@ -155,7 +155,6 @@ struct rtl8150 {
 	unsigned long flags;
 	struct usb_device *udev;
 	struct tasklet_struct tl;
-	struct net_device_stats stats;
 	struct net_device *netdev;
 	struct urb *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
 	struct sk_buff *tx_skb, *rx_skb;
@@ -463,8 +462,8 @@ static void read_bulk_callback(struct ur
 	skb_put(dev->rx_skb, pkt_len);
 	dev->rx_skb->protocol = eth_type_trans(dev->rx_skb, netdev);
 	netif_rx(dev->rx_skb);
-	dev->stats.rx_packets++;
-	dev->stats.rx_bytes += pkt_len;
+	netdev->stats.rx_packets++;
+	netdev->stats.rx_bytes += pkt_len;
 
 	spin_lock(&dev->rx_pool_lock);
 	skb = pull_skb(dev);
@@ -573,13 +572,13 @@ static void intr_callback(struct urb *ur
 
 	d = urb->transfer_buffer;
 	if (d[0] & TSR_ERRORS) {
-		dev->stats.tx_errors++;
+		dev->netdev->stats.tx_errors++;
 		if (d[INT_TSR] & (TSR_ECOL | TSR_JBR))
-			dev->stats.tx_aborted_errors++;
+			dev->netdev->stats.tx_aborted_errors++;
 		if (d[INT_TSR] & TSR_LCOL)
-			dev->stats.tx_window_errors++;
+			dev->netdev->stats.tx_window_errors++;
 		if (d[INT_TSR] & TSR_LOSS_CRS)
-			dev->stats.tx_carrier_errors++;
+			dev->netdev->stats.tx_carrier_errors++;
 	}
 	/* Report link status changes to the network stack */
 	if ((d[INT_MSR] & MSR_LINK) == 0) {
@@ -697,17 +696,12 @@ static void disable_net_traffic(rtl8150_
 	set_registers(dev, CR, 1, &cr);
 }
 
-static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev)
-{
-	return &((rtl8150_t *)netdev_priv(dev))->stats;
-}
-
 static void rtl8150_tx_timeout(struct net_device *netdev)
 {
 	rtl8150_t *dev = netdev_priv(netdev);
 	dev_warn(&netdev->dev, "Tx timeout.\n");
 	usb_unlink_urb(dev->tx_urb);
-	dev->stats.tx_errors++;
+	netdev->stats.tx_errors++;
 }
 
 static void rtl8150_set_multicast(struct net_device *netdev)
@@ -747,12 +741,12 @@ static int rtl8150_start_xmit(struct sk_
 			netif_device_detach(dev->netdev);
 		else {
 			dev_warn(&netdev->dev, "failed tx_urb %d\n", res);
-			dev->stats.tx_errors++;
+			netdev->stats.tx_errors++;
 			netif_start_queue(netdev);
 		}
 	} else {
-		dev->stats.tx_packets++;
-		dev->stats.tx_bytes += skb->len;
+		netdev->stats.tx_packets++;
+		netdev->stats.tx_bytes += skb->len;
 		netdev->trans_start = jiffies;
 	}
 
@@ -931,7 +925,7 @@ static int rtl8150_probe(struct usb_inte
 	netdev->hard_start_xmit = rtl8150_start_xmit;
 	netdev->set_multicast_list = rtl8150_set_multicast;
 	netdev->set_mac_address = rtl8150_set_mac_address;
-	netdev->get_stats = rtl8150_netdev_stats;
+
 	SET_ETHTOOL_OPS(netdev, &ops);
 	dev->intr_interval = 100;	/* 100ms */
 

-- 


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

* [PATCH 24/77] usbnet: convert rtl driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (22 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 23/77] usbnet: convert to internal net_device stats Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:03   ` David Brownell
  2009-03-22  2:45   ` David Miller
  2009-03-21  5:35 ` [PATCH 25/77] usbnet: convert hso " Stephen Hemminger
                   ` (52 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-rtl.patch --]
[-- Type: text/plain, Size: 1371 bytes --]

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

--- a/drivers/net/usb/rtl8150.c	2009-03-20 12:12:47.085715442 -0700
+++ b/drivers/net/usb/rtl8150.c	2009-03-20 12:13:41.757841762 -0700
@@ -891,6 +891,19 @@ static int rtl8150_ioctl(struct net_devi
 	return res;
 }
 
+static const struct net_device_ops rtl8150_netdev_ops = {
+	.ndo_open		= rtl8150_open,
+	.ndo_stop		= rtl8150_close,
+	.ndo_do_ioctl		= rtl8150_ioctl,
+	.ndo_start_xmit		= rtl8150_start_xmit,
+	.ndo_tx_timeout 	= rtl8150_tx_timeout,
+	.ndo_set_multicast_list = rtl8150_set_multicast,
+	.ndo_set_mac_address	= rtl8150_set_mac_address,
+
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static int rtl8150_probe(struct usb_interface *intf,
 			 const struct usb_device_id *id)
 {
@@ -917,15 +930,8 @@ static int rtl8150_probe(struct usb_inte
 	
 	dev->udev = udev;
 	dev->netdev = netdev;
-	netdev->open = rtl8150_open;
-	netdev->stop = rtl8150_close;
-	netdev->do_ioctl = rtl8150_ioctl;
+	netdev->netdev_ops = &rtl8150_netdev_ops;
 	netdev->watchdog_timeo = RTL8150_TX_TIMEOUT;
-	netdev->tx_timeout = rtl8150_tx_timeout;
-	netdev->hard_start_xmit = rtl8150_start_xmit;
-	netdev->set_multicast_list = rtl8150_set_multicast;
-	netdev->set_mac_address = rtl8150_set_mac_address;
-
 	SET_ETHTOOL_OPS(netdev, &ops);
 	dev->intr_interval = 100;	/* 100ms */
 

-- 


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

* [PATCH 25/77] usbnet: convert hso driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (23 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 24/77] usbnet: convert rtl driver to net_device_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:08   ` David Brownell
  2009-03-22  2:45   ` David Miller
  2009-03-21  5:35 ` [PATCH 26/77] usbnet: convert to internal net_device_stats Stephen Hemminger
                   ` (51 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-hso.patch --]
[-- Type: text/plain, Size: 1032 bytes --]

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

--- a/drivers/net/usb/hso.c	2009-03-09 08:23:41.851308905 -0700
+++ b/drivers/net/usb/hso.c	2009-03-20 08:35:11.089026883 -0700
@@ -2428,6 +2428,13 @@ static void hso_free_net_device(struct h
 	kfree(hso_dev);
 }
 
+static const struct net_device_ops hso_netdev_ops = {
+	.ndo_open	= hso_net_open,
+	.ndo_stop	= hso_net_close,
+	.ndo_start_xmit = hso_net_start_xmit,
+	.ndo_tx_timeout = hso_net_tx_timeout,
+};
+
 /* initialize the network interface */
 static void hso_net_init(struct net_device *net)
 {
@@ -2436,10 +2443,7 @@ static void hso_net_init(struct net_devi
 	D1("sizeof hso_net is %d", (int)sizeof(*hso_net));
 
 	/* fill in the other fields */
-	net->open = hso_net_open;
-	net->stop = hso_net_close;
-	net->hard_start_xmit = hso_net_start_xmit;
-	net->tx_timeout = hso_net_tx_timeout;
+	net->netdev_ops = &hso_netdev_ops;
 	net->watchdog_timeo = HSO_NET_TX_TIMEOUT;
 	net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
 	net->type = ARPHRD_NONE;

-- 


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

* [PATCH 26/77] usbnet: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (24 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 25/77] usbnet: convert hso " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:09   ` David Brownell
  2009-03-22  2:46   ` David Miller
  2009-03-21  5:35 ` [PATCH 27/77] usbnet: support net_device_ops Stephen Hemminger
                   ` (50 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usbnet-stats.patch --]
[-- Type: text/plain, Size: 1014 bytes --]

Default handler for net_device_stats already does same thing.

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


--- a/drivers/net/usb/usbnet.c	2009-03-20 09:38:00.950964064 -0700
+++ b/drivers/net/usb/usbnet.c	2009-03-20 09:38:46.383715245 -0700
@@ -249,14 +249,6 @@ static int usbnet_change_mtu (struct net
 
 /*-------------------------------------------------------------------------*/
 
-static struct net_device_stats *usbnet_get_stats (struct net_device *net)
-{
-	struct usbnet	*dev = netdev_priv(net);
-	return &dev->stats;
-}
-
-/*-------------------------------------------------------------------------*/
-
 /* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from
  * completion callbacks.  2.5 should have fixed those bugs...
  */
@@ -1180,7 +1172,6 @@ usbnet_probe (struct usb_interface *udev
 #endif
 
 	net->change_mtu = usbnet_change_mtu;
-	net->get_stats = usbnet_get_stats;
 	net->hard_start_xmit = usbnet_start_xmit;
 	net->open = usbnet_open;
 	net->stop = usbnet_stop;

-- 


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

* [PATCH 27/77] usbnet: support net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (25 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 26/77] usbnet: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:11   ` David Brownell
  2009-03-22  2:46   ` David Miller
  2009-03-21  5:35 ` [PATCH 28/77] usbnet: convert asix driver to net_device_ops Stephen Hemminger
                   ` (49 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usbnet-ops.patch --]
[-- Type: text/plain, Size: 4525 bytes --]

Use net_device_ops for usbnet device, and export for use
by other derived drivers.

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

---
 drivers/net/usb/usbnet.c   |   31 +++++++++++++++++++++++--------
 include/linux/usb/usbnet.h |    5 +++++
 2 files changed, 28 insertions(+), 8 deletions(-)

--- a/drivers/net/usb/usbnet.c	2009-03-20 09:39:11.001839596 -0700
+++ b/drivers/net/usb/usbnet.c	2009-03-20 09:57:37.178776906 -0700
@@ -223,7 +223,7 @@ EXPORT_SYMBOL_GPL(usbnet_skb_return);
  *
  *-------------------------------------------------------------------------*/
 
-static int usbnet_change_mtu (struct net_device *net, int new_mtu)
+int usbnet_change_mtu (struct net_device *net, int new_mtu)
 {
 	struct usbnet	*dev = netdev_priv(net);
 	int		ll_mtu = new_mtu + net->hard_header_len;
@@ -246,6 +246,7 @@ static int usbnet_change_mtu (struct net
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(usbnet_change_mtu);
 
 /*-------------------------------------------------------------------------*/
 
@@ -540,7 +541,7 @@ EXPORT_SYMBOL_GPL(usbnet_unlink_rx_urbs)
 
 // precondition: never called in_interrupt
 
-static int usbnet_stop (struct net_device *net)
+int usbnet_stop (struct net_device *net)
 {
 	struct usbnet		*dev = netdev_priv(net);
 	int			temp;
@@ -584,6 +585,7 @@ static int usbnet_stop (struct net_devic
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(usbnet_stop);
 
 /*-------------------------------------------------------------------------*/
 
@@ -591,7 +593,7 @@ static int usbnet_stop (struct net_devic
 
 // precondition: never called in_interrupt
 
-static int usbnet_open (struct net_device *net)
+int usbnet_open (struct net_device *net)
 {
 	struct usbnet		*dev = netdev_priv(net);
 	int			retval;
@@ -666,6 +668,7 @@ done:
 done_nopm:
 	return retval;
 }
+EXPORT_SYMBOL_GPL(usbnet_open);
 
 /*-------------------------------------------------------------------------*/
 
@@ -900,7 +903,7 @@ static void tx_complete (struct urb *urb
 
 /*-------------------------------------------------------------------------*/
 
-static void usbnet_tx_timeout (struct net_device *net)
+void usbnet_tx_timeout (struct net_device *net)
 {
 	struct usbnet		*dev = netdev_priv(net);
 
@@ -909,10 +912,11 @@ static void usbnet_tx_timeout (struct ne
 
 	// FIXME: device recovery -- reset?
 }
+EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
 
 /*-------------------------------------------------------------------------*/
 
-static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
+int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
 {
 	struct usbnet		*dev = netdev_priv(net);
 	int			length;
@@ -995,7 +999,7 @@ drop:
 	}
 	return retval;
 }
-
+EXPORT_SYMBOL_GPL(usbnet_start_xmit);
 
 /*-------------------------------------------------------------------------*/
 
@@ -1102,6 +1106,15 @@ void usbnet_disconnect (struct usb_inter
 }
 EXPORT_SYMBOL_GPL(usbnet_disconnect);
 
+static const struct net_device_ops usbnet_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_change_mtu		= usbnet_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
 
 /*-------------------------------------------------------------------------*/
 
@@ -1171,12 +1184,14 @@ usbnet_probe (struct usb_interface *udev
 		net->features |= NETIF_F_HIGHDMA;
 #endif
 
-	net->change_mtu = usbnet_change_mtu;
+	net->netdev_ops = &usbnet_netdev_ops;
+#ifdef CONFIG_COMPAT_NET_DEV_OPS
 	net->hard_start_xmit = usbnet_start_xmit;
 	net->open = usbnet_open;
 	net->stop = usbnet_stop;
-	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
 	net->tx_timeout = usbnet_tx_timeout;
+#endif
+	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
 	net->ethtool_ops = &usbnet_ethtool_ops;
 
 	// allow device-specific bind/init procedures
--- a/include/linux/usb/usbnet.h	2009-03-20 09:54:30.657965414 -0700
+++ b/include/linux/usb/usbnet.h	2009-03-20 09:57:31.417699745 -0700
@@ -176,6 +176,11 @@ struct skb_data {	/* skb->cb is one of t
 	size_t			length;
 };
 
+extern int usbnet_open (struct net_device *net);
+extern int usbnet_stop (struct net_device *net);
+extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net);
+extern void usbnet_tx_timeout (struct net_device *net);
+extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
 
 extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *);
 extern void usbnet_defer_kevent (struct usbnet *, int);

-- 


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

* [PATCH 28/77] usbnet: convert asix driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (26 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 27/77] usbnet: support net_device_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:12   ` David Brownell
  2009-03-22  2:46   ` David Miller
  2009-03-21  5:35 ` [PATCH 29/77] usbnet: convert dms9601 " Stephen Hemminger
                   ` (48 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-asix.patch --]
[-- Type: text/plain, Size: 3462 bytes --]

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

--- a/drivers/net/usb/asix.c	2009-03-20 12:11:35.724901593 -0700
+++ b/drivers/net/usb/asix.c	2009-03-20 12:15:35.937027165 -0700
@@ -807,6 +807,18 @@ static int ax88172_link_reset(struct usb
 	return 0;
 }
 
+static const struct net_device_ops ax88172_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_change_mtu		= usbnet_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_do_ioctl		= asix_ioctl,
+	.ndo_set_multicast_list = ax88172_set_multicast,
+};
+
 static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf)
 {
 	int ret = 0;
@@ -846,9 +858,8 @@ static int ax88172_bind(struct usbnet *d
 	dev->mii.phy_id_mask = 0x3f;
 	dev->mii.reg_num_mask = 0x1f;
 	dev->mii.phy_id = asix_get_phy_addr(dev);
-	dev->net->do_ioctl = asix_ioctl;
 
-	dev->net->set_multicast_list = ax88172_set_multicast;
+	dev->net->netdev_ops = &ax88172_netdev_ops;
 	dev->net->ethtool_ops = &ax88172_ethtool_ops;
 
 	asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
@@ -898,6 +909,18 @@ static int ax88772_link_reset(struct usb
 	return 0;
 }
 
+static const struct net_device_ops ax88772_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_change_mtu		= usbnet_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_do_ioctl		= asix_ioctl,
+	.ndo_set_multicast_list = asix_set_multicast,
+};
+
 static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
 {
 	int ret, embd_phy;
@@ -962,7 +985,6 @@ static int ax88772_bind(struct usbnet *d
 	dev->mii.mdio_write = asix_mdio_write;
 	dev->mii.phy_id_mask = 0x1f;
 	dev->mii.reg_num_mask = 0x1f;
-	dev->net->do_ioctl = asix_ioctl;
 	dev->mii.phy_id = asix_get_phy_addr(dev);
 
 	phyid = asix_get_phyid(dev);
@@ -978,7 +1000,7 @@ static int ax88772_bind(struct usbnet *d
 
 	msleep(150);
 
-	dev->net->set_multicast_list = asix_set_multicast;
+	dev->net->netdev_ops = &ax88772_netdev_ops;
 	dev->net->ethtool_ops = &ax88772_ethtool_ops;
 
 	asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
@@ -1181,6 +1203,18 @@ static int ax88178_change_mtu(struct net
 	return 0;
 }
 
+static const struct net_device_ops ax88178_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_set_multicast_list = asix_set_multicast,
+	.ndo_do_ioctl 		= asix_ioctl,
+	.ndo_change_mtu 	= ax88178_change_mtu,
+};
+
 static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf)
 {
 	struct asix_data *data = (struct asix_data *)&dev->data;
@@ -1247,11 +1281,10 @@ static int ax88178_bind(struct usbnet *d
 	dev->mii.phy_id_mask = 0x1f;
 	dev->mii.reg_num_mask = 0xff;
 	dev->mii.supports_gmii = 1;
-	dev->net->do_ioctl = asix_ioctl;
 	dev->mii.phy_id = asix_get_phy_addr(dev);
-	dev->net->set_multicast_list = asix_set_multicast;
+
+	dev->net->netdev_ops = &ax88178_netdev_ops;
 	dev->net->ethtool_ops = &ax88178_ethtool_ops;
-	dev->net->change_mtu = &ax88178_change_mtu;
 
 	phyid = asix_get_phyid(dev);
 	dbg("PHYID=0x%08x", phyid);

-- 


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

* [PATCH 29/77] usbnet: convert dms9601 driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (27 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 28/77] usbnet: convert asix driver to net_device_ops Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:14   ` David Brownell
  2009-03-22  3:00   ` David Miller
  2009-03-21  5:35 ` [PATCH 30/77] usbnet: convert msc7830 " Stephen Hemminger
                   ` (47 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-dm9601.patch --]
[-- Type: text/plain, Size: 1211 bytes --]

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

--- a/drivers/net/usb/dm9601.c	2009-03-20 12:11:35.703901588 -0700
+++ b/drivers/net/usb/dm9601.c	2009-03-20 12:16:05.744902076 -0700
@@ -419,6 +419,18 @@ static int dm9601_set_mac_address(struct
 	return 0;
 }
 
+static const struct net_device_ops dm9601_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_change_mtu		= usbnet_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_do_ioctl 		= dm9601_ioctl,
+	.ndo_set_multicast_list = dm9601_set_multicast,
+	.ndo_set_mac_address	= dm9601_set_mac_address,
+};
+
 static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
 {
 	int ret;
@@ -428,9 +440,7 @@ static int dm9601_bind(struct usbnet *de
 	if (ret)
 		goto out;
 
-	dev->net->do_ioctl = dm9601_ioctl;
-	dev->net->set_multicast_list = dm9601_set_multicast;
-	dev->net->set_mac_address = dm9601_set_mac_address;
+	dev->net->netdev_ops = &dm9601_netdev_ops;
 	dev->net->ethtool_ops = &dm9601_ethtool_ops;
 	dev->net->hard_header_len += DM_TX_OVERHEAD;
 	dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;

-- 


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

* [PATCH 30/77] usbnet: convert msc7830 driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (28 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 29/77] usbnet: convert dms9601 " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:19   ` David Brownell
  2009-03-22  3:00   ` David Miller
  2009-03-21  5:35 ` [PATCH 31/77] usbnet: convert sms95xx " Stephen Hemminger
                   ` (46 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-msc7830.patch --]
[-- Type: text/plain, Size: 1238 bytes --]

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

--- a/drivers/net/usb/mcs7830.c	2009-03-20 12:11:35.680902515 -0700
+++ b/drivers/net/usb/mcs7830.c	2009-03-20 12:16:27.334776706 -0700
@@ -486,6 +486,18 @@ static int mcs7830_set_mac_address(struc
 	return 0;
 }
 
+static const struct net_device_ops mcs7830_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_change_mtu		= usbnet_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_do_ioctl 		= mcs7830_ioctl,
+	.ndo_set_multicast_list = mcs7830_set_multicast,
+	.ndo_set_mac_address	 = mcs7830_set_mac_address,
+};
+
 static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev)
 {
 	struct net_device *net = dev->net;
@@ -495,11 +507,9 @@ static int mcs7830_bind(struct usbnet *d
 	if (ret)
 		goto out;
 
-	net->do_ioctl = mcs7830_ioctl;
 	net->ethtool_ops = &mcs7830_ethtool_ops;
-	net->set_multicast_list = mcs7830_set_multicast;
+	net->netdev_ops = &mcs7830_netdev_ops;
 	mcs7830_set_multicast(net);
-	net->set_mac_address = mcs7830_set_mac_address;
 
 	/* reserve space for the status byte on rx */
 	dev->rx_urb_size = ETH_FRAME_LEN + 1;

-- 


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

* [PATCH 31/77] usbnet: convert sms95xx driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (29 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 30/77] usbnet: convert msc7830 " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:20   ` David Brownell
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:35 ` [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats Stephen Hemminger
                   ` (45 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: usb-smsc95.patch --]
[-- Type: text/plain, Size: 1224 bytes --]

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

--- a/drivers/net/usb/smsc95xx.c	2009-03-20 12:11:35.646901516 -0700
+++ b/drivers/net/usb/smsc95xx.c	2009-03-20 12:16:51.582901740 -0700
@@ -1008,6 +1008,18 @@ static int smsc95xx_reset(struct usbnet 
 	return 0;
 }
 
+static const struct net_device_ops smsc95xx_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_change_mtu		= usbnet_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_do_ioctl 		= smsc95xx_ioctl,
+	.ndo_set_multicast_list = smsc95xx_set_multicast,
+};
+
 static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
 {
 	struct smsc95xx_priv *pdata = NULL;
@@ -1038,9 +1050,8 @@ static int smsc95xx_bind(struct usbnet *
 	/* Init all registers */
 	ret = smsc95xx_reset(dev);
 
-	dev->net->do_ioctl = smsc95xx_ioctl;
+	dev->net->netdev_ops = &smsc95xx_netdev_ops;
 	dev->net->ethtool_ops = &smsc95xx_ethtool_ops;
-	dev->net->set_multicast_list = smsc95xx_set_multicast;
 	dev->net->flags |= IFF_MULTICAST;
 	dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD;
 	return 0;

-- 


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

* [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (30 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 31/77] usbnet: convert sms95xx " Stephen Hemminger
@ 2009-03-21  5:35 ` Stephen Hemminger
  2009-03-21  9:22   ` David Brownell
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 33/77] usbnet: convert rndis driver to net_device_ops Stephen Hemminger
                   ` (44 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:35 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: rndis.patch --]
[-- Type: text/plain, Size: 927 bytes --]

dev_get_stats() handles all issues with net_device_ops

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

---
 drivers/usb/gadget/rndis.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

--- a/drivers/usb/gadget/rndis.c	2009-03-20 12:18:22.054027493 -0700
+++ b/drivers/usb/gadget/rndis.c	2009-03-20 12:18:28.620714647 -0700
@@ -170,7 +170,7 @@ gen_ndis_query_resp (int configNr, u32 O
 	int			i, count;
 	rndis_query_cmplt_type	*resp;
 	struct net_device	*net;
-	struct net_device_stats	*stats;
+	const struct net_device_stats	*stats;
 
 	if (!r) return -ENOMEM;
 	resp = (rndis_query_cmplt_type *) r->buf;
@@ -193,10 +193,7 @@ gen_ndis_query_resp (int configNr, u32 O
 	resp->InformationBufferOffset = cpu_to_le32 (16);
 
 	net = rndis_per_dev_params[configNr].dev;
-	if (net->get_stats)
-		stats = net->get_stats(net);
-	else
-		stats = NULL;
+	stats = dev_get_stats(net);
 
 	switch (OID) {
 

-- 


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

* [PATCH 33/77] usbnet: convert rndis driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (31 preceding siblings ...)
  2009-03-21  5:35 ` [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-21  9:23   ` David Brownell
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 34/77] pcmcia: convert 3c589 " Stephen Hemminger
                   ` (43 subsequent siblings)
  76 siblings, 2 replies; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, dbrownell; +Cc: netdev

[-- Attachment #1: rndis-host.patch --]
[-- Type: text/plain, Size: 1068 bytes --]

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

--- a/drivers/net/usb/rndis_host.c	2009-03-20 12:18:22.041027638 -0700
+++ b/drivers/net/usb/rndis_host.c	2009-03-20 12:27:20.541841282 -0700
@@ -266,6 +266,16 @@ response_error:
 	return -EDOM;
 }
 
+/* same as usbnet_netdev_ops but MTU change not allowed */
+static const struct net_device_ops rndis_netdev_ops = {
+	.ndo_open		= usbnet_open,
+	.ndo_stop		= usbnet_stop,
+	.ndo_start_xmit		= usbnet_start_xmit,
+	.ndo_tx_timeout		= usbnet_tx_timeout,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 int
 generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
 {
@@ -327,7 +337,8 @@ generic_rndis_bind(struct usbnet *dev, s
 	dev->rx_urb_size &= ~(dev->maxpacket - 1);
 	u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size);
 
-	net->change_mtu = NULL;
+	net->netdev_ops = &rndis_netdev_ops;
+
 	retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE);
 	if (unlikely(retval < 0)) {
 		/* it might not even be an RNDIS device!! */

-- 


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

* [PATCH 34/77] pcmcia: convert 3c589 to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (32 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 33/77] usbnet: convert rndis driver to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 35/77] pcmcia: convert 3c574 " Stephen Hemminger
                   ` (42 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: 3c589.patch --]
[-- Type: text/plain, Size: 1520 bytes --]

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

--- a/drivers/net/pcmcia/3c589_cs.c	2009-03-20 15:23:42.903968610 -0700
+++ b/drivers/net/pcmcia/3c589_cs.c	2009-03-20 15:29:37.743901982 -0700
@@ -169,6 +169,19 @@ static void tc589_detach(struct pcmcia_d
 
 ======================================================================*/
 
+static const struct net_device_ops el3_netdev_ops = {
+	.ndo_open 		= el3_open,
+	.ndo_stop 		= el3_close,
+	.ndo_start_xmit		= el3_start_xmit,
+	.ndo_tx_timeout 	= el3_tx_timeout,
+	.ndo_set_config		= el3_config,
+	.ndo_get_stats		= el3_get_stats,
+	.ndo_set_multicast_list = set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static int tc589_probe(struct pcmcia_device *link)
 {
     struct el3_private *lp;
@@ -195,17 +208,9 @@ static int tc589_probe(struct pcmcia_dev
     link->conf.IntType = INT_MEMORY_AND_IO;
     link->conf.ConfigIndex = 1;
 
-    /* The EL3-specific entries in the device structure. */
-    dev->hard_start_xmit = &el3_start_xmit;
-    dev->set_config = &el3_config;
-    dev->get_stats = &el3_get_stats;
-    dev->set_multicast_list = &set_multicast_list;
-    dev->open = &el3_open;
-    dev->stop = &el3_close;
-#ifdef HAVE_TX_TIMEOUT
-    dev->tx_timeout = el3_tx_timeout;
+    dev->netdev_ops = &el3_netdev_ops;
     dev->watchdog_timeo = TX_TIMEOUT;
-#endif
+
     SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
 
     return tc589_config(link);

-- 


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

* [PATCH 35/77] pcmcia: convert 3c574 to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (33 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 34/77] pcmcia: convert 3c589 " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 36/77] pcmcia: convert fmvj18x driver to internal net_device_stats Stephen Hemminger
                   ` (41 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: 3c574.patch --]
[-- Type: text/plain, Size: 1463 bytes --]

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

--- a/drivers/net/pcmcia/3c574_cs.c	2009-03-20 15:26:57.576028131 -0700
+++ b/drivers/net/pcmcia/3c574_cs.c	2009-03-20 15:32:44.545902019 -0700
@@ -257,6 +257,18 @@ static void tc574_detach(struct pcmcia_d
 	local data structures for one device.  The device is registered
 	with Card Services.
 */
+static const struct net_device_ops el3_netdev_ops = {
+	.ndo_open 		= el3_open,
+	.ndo_stop 		= el3_close,
+	.ndo_start_xmit		= el3_start_xmit,
+	.ndo_tx_timeout 	= el3_tx_timeout,
+	.ndo_get_stats		= el3_get_stats,
+	.ndo_do_ioctl		= el3_ioctl,
+	.ndo_set_multicast_list = set_rx_mode,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
 
 static int tc574_probe(struct pcmcia_device *link)
 {
@@ -284,18 +296,9 @@ static int tc574_probe(struct pcmcia_dev
 	link->conf.IntType = INT_MEMORY_AND_IO;
 	link->conf.ConfigIndex = 1;
 
-	/* The EL3-specific entries in the device structure. */
-	dev->hard_start_xmit = &el3_start_xmit;
-	dev->get_stats = &el3_get_stats;
-	dev->do_ioctl = &el3_ioctl;
+	dev->netdev_ops = &el3_netdev_ops;
 	SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
-	dev->set_multicast_list = &set_rx_mode;
-	dev->open = &el3_open;
-	dev->stop = &el3_close;
-#ifdef HAVE_TX_TIMEOUT
-	dev->tx_timeout = el3_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
-#endif
 
 	return tc574_config(link);
 } /* tc574_attach */

-- 


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

* [PATCH 36/77] pcmcia: convert fmvj18x driver to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (34 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 35/77] pcmcia: convert 3c574 " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 37/77] pcmcia: convert fmvj18x driver to net_device_ops Stephen Hemminger
                   ` (40 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: fmv-stats.patch --]
[-- Type: text/plain, Size: 4545 bytes --]

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

--- a/drivers/net/pcmcia/fmvj18x_cs.c	2009-03-20 15:32:36.560777355 -0700
+++ b/drivers/net/pcmcia/fmvj18x_cs.c	2009-03-20 15:33:14.186903302 -0700
@@ -100,7 +100,6 @@ static int fjn_start_xmit(struct sk_buff
 static irqreturn_t fjn_interrupt(int irq, void *dev_id);
 static void fjn_rx(struct net_device *dev);
 static void fjn_reset(struct net_device *dev);
-static struct net_device_stats *fjn_get_stats(struct net_device *dev);
 static void set_rx_mode(struct net_device *dev);
 static void fjn_tx_timeout(struct net_device *dev);
 static const struct ethtool_ops netdev_ethtool_ops;
@@ -118,7 +117,6 @@ typedef enum { MBH10302, MBH10304, TDK, 
 typedef struct local_info_t {
 	struct pcmcia_device	*p_dev;
     dev_node_t node;
-    struct net_device_stats stats;
     long open_time;
     uint tx_started:1;
     uint tx_queue;
@@ -263,7 +261,6 @@ static int fmvj18x_probe(struct pcmcia_d
     /* The FMVJ18x specific entries in the device structure. */
     dev->hard_start_xmit = &fjn_start_xmit;
     dev->set_config = &fjn_config;
-    dev->get_stats = &fjn_get_stats;
     dev->set_multicast_list = &set_rx_mode;
     dev->open = &fjn_open;
     dev->stop = &fjn_close;
@@ -793,7 +790,7 @@ static irqreturn_t fjn_interrupt(int dum
 	fjn_rx(dev);
     }
     if (tx_stat & F_TMT_RDY) {
-	lp->stats.tx_packets += lp->sent ;
+	dev->stats.tx_packets += lp->sent ;
         lp->sent = 0 ;
 	if (lp->tx_queue) {
 	    outb(DO_TX | lp->tx_queue, ioaddr + TX_START);
@@ -840,7 +837,7 @@ static void fjn_tx_timeout(struct net_de
 	   htons(inw(ioaddr + 6)), htons(inw(ioaddr + 8)),
 	   htons(inw(ioaddr +10)), htons(inw(ioaddr +12)),
 	   htons(inw(ioaddr +14)));
-    lp->stats.tx_errors++;
+    dev->stats.tx_errors++;
     /* ToDo: We should try to restart the adaptor... */
     local_irq_disable();
     fjn_reset(dev);
@@ -880,7 +877,7 @@ static int fjn_start_xmit(struct sk_buff
 
 	DEBUG(4, "%s: Transmitting a packet of length %lu.\n",
 	      dev->name, (unsigned long)skb->len);
-	lp->stats.tx_bytes += skb->len;
+	dev->stats.tx_bytes += skb->len;
 
 	/* Disable both interrupts. */
 	outw(0x0000, ioaddr + TX_INTR);
@@ -1008,7 +1005,6 @@ static void fjn_reset(struct net_device 
 
 static void fjn_rx(struct net_device *dev)
 {
-    struct local_info_t *lp = netdev_priv(dev);
     unsigned int ioaddr = dev->base_addr;
     int boguscount = 10;	/* 5 -> 10: by agy 19940922 */
 
@@ -1027,11 +1023,11 @@ static void fjn_rx(struct net_device *de
 	}
 #endif
 	if ((status & 0xF0) != 0x20) {	/* There was an error. */
-	    lp->stats.rx_errors++;
-	    if (status & F_LEN_ERR) lp->stats.rx_length_errors++;
-	    if (status & F_ALG_ERR) lp->stats.rx_frame_errors++;
-	    if (status & F_CRC_ERR) lp->stats.rx_crc_errors++;
-	    if (status & F_OVR_FLO) lp->stats.rx_over_errors++;
+	    dev->stats.rx_errors++;
+	    if (status & F_LEN_ERR) dev->stats.rx_length_errors++;
+	    if (status & F_ALG_ERR) dev->stats.rx_frame_errors++;
+	    if (status & F_CRC_ERR) dev->stats.rx_crc_errors++;
+	    if (status & F_OVR_FLO) dev->stats.rx_over_errors++;
 	} else {
 	    u_short pkt_len = inw(ioaddr + DATAPORT);
 	    /* Malloc up new buffer. */
@@ -1041,7 +1037,7 @@ static void fjn_rx(struct net_device *de
 		printk(KERN_NOTICE "%s: The FMV-18x claimed a very "
 		       "large packet, size %d.\n", dev->name, pkt_len);
 		outb(F_SKP_PKT, ioaddr + RX_SKIP);
-		lp->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		break;
 	    }
 	    skb = dev_alloc_skb(pkt_len+2);
@@ -1049,7 +1045,7 @@ static void fjn_rx(struct net_device *de
 		printk(KERN_NOTICE "%s: Memory squeeze, dropping "
 		       "packet (len %d).\n", dev->name, pkt_len);
 		outb(F_SKP_PKT, ioaddr + RX_SKIP);
-		lp->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 		break;
 	    }
 
@@ -1070,8 +1066,8 @@ static void fjn_rx(struct net_device *de
 #endif
 
 	    netif_rx(skb);
-	    lp->stats.rx_packets++;
-	    lp->stats.rx_bytes += pkt_len;
+	    dev->stats.rx_packets++;
+	    dev->stats.rx_bytes += pkt_len;
 	}
 	if (--boguscount <= 0)
 	    break;
@@ -1191,14 +1187,6 @@ static int fjn_close(struct net_device *
 
 /*====================================================================*/
 
-static struct net_device_stats *fjn_get_stats(struct net_device *dev)
-{
-    local_info_t *lp = netdev_priv(dev);
-    return &lp->stats;
-} /* fjn_get_stats */
-
-/*====================================================================*/
-
 /*
   Set the multicast/promiscuous mode for this adaptor.
 */

-- 


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

* [PATCH 37/77] pcmcia: convert fmvj18x driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (35 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 36/77] pcmcia: convert fmvj18x driver to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 38/77] pcmcia: convert nmclan " Stephen Hemminger
                   ` (39 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: fmv-netops.patch --]
[-- Type: text/plain, Size: 1482 bytes --]

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

--- a/drivers/net/pcmcia/fmvj18x_cs.c	2009-03-20 15:33:28.183090032 -0700
+++ b/drivers/net/pcmcia/fmvj18x_cs.c	2009-03-20 15:35:39.076839897 -0700
@@ -227,6 +227,18 @@ typedef struct local_info_t {
 #define BANK_1U              0x24 /* bank 1 (CONFIG_1) */
 #define BANK_2U              0x28 /* bank 2 (CONFIG_1) */
 
+static const struct net_device_ops fjn_netdev_ops = {
+	.ndo_open 		= fjn_open,
+	.ndo_stop		= fjn_close,
+	.ndo_start_xmit 	= fjn_start_xmit,
+	.ndo_tx_timeout 	= fjn_tx_timeout,
+	.ndo_set_config 	= fjn_config,
+	.ndo_set_multicast_list = set_rx_mode,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static int fmvj18x_probe(struct pcmcia_device *link)
 {
     local_info_t *lp;
@@ -258,16 +270,9 @@ static int fmvj18x_probe(struct pcmcia_d
     link->conf.Attributes = CONF_ENABLE_IRQ;
     link->conf.IntType = INT_MEMORY_AND_IO;
 
-    /* The FMVJ18x specific entries in the device structure. */
-    dev->hard_start_xmit = &fjn_start_xmit;
-    dev->set_config = &fjn_config;
-    dev->set_multicast_list = &set_rx_mode;
-    dev->open = &fjn_open;
-    dev->stop = &fjn_close;
-#ifdef HAVE_TX_TIMEOUT
-    dev->tx_timeout = fjn_tx_timeout;
+    dev->netdev_ops = &fjn_netdev_ops;
     dev->watchdog_timeo = TX_TIMEOUT;
-#endif
+
     SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
 
     return fmvj18x_config(link);

-- 


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

* [PATCH 38/77] pcmcia: convert nmclan driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (36 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 37/77] pcmcia: convert fmvj18x driver to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 39/77] pcnet: convert " Stephen Hemminger
                   ` (38 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: nmclan-ops.patch --]
[-- Type: text/plain, Size: 1521 bytes --]

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

--- a/drivers/net/pcmcia/nmclan_cs.c	2009-03-20 15:37:15.711964534 -0700
+++ b/drivers/net/pcmcia/nmclan_cs.c	2009-03-20 15:39:12.895711532 -0700
@@ -436,6 +436,19 @@ static const struct ethtool_ops netdev_e
 
 static void nmclan_detach(struct pcmcia_device *p_dev);
 
+static const struct net_device_ops mace_netdev_ops = {
+	.ndo_open		= mace_open,
+	.ndo_stop		= mace_close,
+	.ndo_start_xmit		= mace_start_xmit,
+	.ndo_tx_timeout		= mace_tx_timeout,
+	.ndo_set_config		= mace_config,
+	.ndo_get_stats		= mace_get_stats,
+	.ndo_set_multicast_list	= set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /* ----------------------------------------------------------------------------
 nmclan_attach
 	Creates an "instance" of the driver, allocating local data
@@ -474,17 +487,9 @@ static int nmclan_probe(struct pcmcia_de
 
     lp->tx_free_frames=AM2150_MAX_TX_FRAMES;
 
-    dev->hard_start_xmit = &mace_start_xmit;
-    dev->set_config = &mace_config;
-    dev->get_stats = &mace_get_stats;
-    dev->set_multicast_list = &set_multicast_list;
+    dev->netdev_ops = &mace_netdev_ops;
     SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
-    dev->open = &mace_open;
-    dev->stop = &mace_close;
-#ifdef HAVE_TX_TIMEOUT
-    dev->tx_timeout = mace_tx_timeout;
     dev->watchdog_timeo = TX_TIMEOUT;
-#endif
 
     return nmclan_config(link);
 } /* nmclan_attach */

-- 


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

* [PATCH 39/77] pcnet: convert driver to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (37 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 38/77] pcmcia: convert nmclan " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  3:01   ` David Miller
  2009-03-21  5:36 ` [PATCH 40/77] xir2cps: convert to internal net_device stats Stephen Hemminger
                   ` (37 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: pcnet.patch --]
[-- Type: text/plain, Size: 2450 bytes --]

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

--- a/drivers/net/pcmcia/pcnet_cs.c	2009-03-20 15:39:43.604652177 -0700
+++ b/drivers/net/pcmcia/pcnet_cs.c	2009-03-20 15:55:15.727714742 -0700
@@ -39,6 +39,7 @@
 #include <linux/ethtool.h>
 #include <linux/netdevice.h>
 #include <linux/log2.h>
+#include <linux/etherdevice.h>
 #include "../8390.h"
 
 #include <pcmcia/cs_types.h>
@@ -233,6 +234,23 @@ static inline pcnet_dev_t *PRIV(struct n
 	return (pcnet_dev_t *)(p + sizeof(struct ei_device));
 }
 
+static const struct net_device_ops pcnet_netdev_ops = {
+	.ndo_open		= pcnet_open,
+	.ndo_stop		= pcnet_close,
+	.ndo_set_config		= set_config,
+	.ndo_start_xmit 	= ei_start_xmit,
+	.ndo_get_stats		= ei_get_stats,
+	.ndo_do_ioctl 		= ei_ioctl,
+	.ndo_set_multicast_list = ei_set_multicast_list,
+	.ndo_tx_timeout 	= ei_tx_timeout,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	.ndo_poll_controller 	= ei_poll,
+#endif
+};
+
 /*======================================================================
 
     pcnet_attach() creates an "instance" of the driver, allocating
@@ -260,9 +278,7 @@ static int pcnet_probe(struct pcmcia_dev
     link->conf.Attributes = CONF_ENABLE_IRQ;
     link->conf.IntType = INT_MEMORY_AND_IO;
 
-    dev->open = &pcnet_open;
-    dev->stop = &pcnet_close;
-    dev->set_config = &set_config;
+    dev->netdev_ops = &pcnet_netdev_ops;
 
     return pcnet_config(link);
 } /* pcnet_attach */
@@ -640,18 +656,12 @@ static int pcnet_config(struct pcmcia_de
 
     SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
 
-    if (info->flags & (IS_DL10019|IS_DL10022)) {
-	dev->do_ioctl = &ei_ioctl;
+    if (info->flags & (IS_DL10019|IS_DL10022))
 	mii_phy_probe(dev);
-    }
 
     link->dev_node = &info->node;
     SET_NETDEV_DEV(dev, &handle_to_dev(link));
 
-#ifdef CONFIG_NET_POLL_CONTROLLER
-    dev->poll_controller = ei_poll;
-#endif
-
     if (register_netdev(dev) != 0) {
 	printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
 	link->dev_node = NULL;
@@ -1183,6 +1193,10 @@ static int ei_ioctl(struct net_device *d
     pcnet_dev_t *info = PRIV(dev);
     u16 *data = (u16 *)&rq->ifr_ifru;
     unsigned int mii_addr = dev->base_addr + DLINK_GPIO;
+
+    if (!(info->flags & (IS_DL10019|IS_DL10022)))
+	return -EINVAL;
+
     switch (cmd) {
     case SIOCGMIIPHY:
 	data[0] = info->phy_id;

-- 


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

* [PATCH 40/77] xir2cps: convert to internal net_device stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (38 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 39/77] pcnet: convert " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  3:02   ` David Miller
  2009-03-21  5:36 ` [PATCH 41/77] xirc2ps: convert to net_device_ops Stephen Hemminger
                   ` (36 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: xirc2ps-stats.patch --]
[-- Type: text/plain, Size: 5018 bytes --]

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


--- a/drivers/net/pcmcia/xirc2ps_cs.c	2009-03-20 21:45:49.827651601 -0700
+++ b/drivers/net/pcmcia/xirc2ps_cs.c	2009-03-20 21:55:40.069839509 -0700
@@ -335,7 +335,7 @@ typedef struct local_info_t {
 	struct net_device	*dev;
 	struct pcmcia_device	*p_dev;
     dev_node_t node;
-    struct net_device_stats stats;
+
     int card_type;
     int probe_port;
     int silicon; /* silicon revision. 0=old CE2, 1=Scipper, 4=Mohawk */
@@ -355,7 +355,6 @@ typedef struct local_info_t {
 static int do_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static void xirc_tx_timeout(struct net_device *dev);
 static void xirc2ps_tx_timeout_task(struct work_struct *work);
-static struct net_device_stats *do_get_stats(struct net_device *dev);
 static void set_addresses(struct net_device *dev);
 static void set_multicast_list(struct net_device *dev);
 static int set_card_type(struct pcmcia_device *link, const void *s);
@@ -583,7 +582,6 @@ xirc2ps_probe(struct pcmcia_device *link
     /* Fill in card specific entries */
     dev->hard_start_xmit = &do_start_xmit;
     dev->set_config = &do_config;
-    dev->get_stats = &do_get_stats;
     dev->do_ioctl = &do_ioctl;
     SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
     dev->set_multicast_list = &set_multicast_list;
@@ -1172,7 +1170,7 @@ xirc2ps_interrupt(int irq, void *dev_id)
 	if (bytes_rcvd > maxrx_bytes && (rsr & PktRxOk)) {
 	    /* too many bytes received during this int, drop the rest of the
 	     * packets */
-	    lp->stats.rx_dropped++;
+	    dev->stats.rx_dropped++;
 	    DEBUG(2, "%s: RX drop, too much done\n", dev->name);
 	} else if (rsr & PktRxOk) {
 	    struct sk_buff *skb;
@@ -1186,7 +1184,7 @@ xirc2ps_interrupt(int irq, void *dev_id)
 	    if (!skb) {
 		printk(KNOT_XIRC "low memory, packet dropped (size=%u)\n",
 		       pktlen);
-		lp->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 	    } else { /* okay get the packet */
 		skb_reserve(skb, 2);
 		if (lp->silicon == 0 ) { /* work around a hardware bug */
@@ -1242,24 +1240,24 @@ xirc2ps_interrupt(int irq, void *dev_id)
 		}
 		skb->protocol = eth_type_trans(skb, dev);
 		netif_rx(skb);
-		lp->stats.rx_packets++;
-		lp->stats.rx_bytes += pktlen;
+		dev->stats.rx_packets++;
+		dev->stats.rx_bytes += pktlen;
 		if (!(rsr & PhyPkt))
-		    lp->stats.multicast++;
+		    dev->stats.multicast++;
 	    }
 	} else { /* bad packet */
 	    DEBUG(5, "rsr=%#02x\n", rsr);
 	}
 	if (rsr & PktTooLong) {
-	    lp->stats.rx_frame_errors++;
+	    dev->stats.rx_frame_errors++;
 	    DEBUG(3, "%s: Packet too long\n", dev->name);
 	}
 	if (rsr & CRCErr) {
-	    lp->stats.rx_crc_errors++;
+	    dev->stats.rx_crc_errors++;
 	    DEBUG(3, "%s: CRC error\n", dev->name);
 	}
 	if (rsr & AlignErr) {
-	    lp->stats.rx_fifo_errors++; /* okay ? */
+	    dev->stats.rx_fifo_errors++; /* okay ? */
 	    DEBUG(3, "%s: Alignment error\n", dev->name);
 	}
 
@@ -1270,7 +1268,7 @@ xirc2ps_interrupt(int irq, void *dev_id)
 	eth_status = GetByte(XIRCREG_ESR);
     }
     if (rx_status & 0x10) { /* Receive overrun */
-	lp->stats.rx_over_errors++;
+	dev->stats.rx_over_errors++;
 	PutByte(XIRCREG_CR, ClearRxOvrun);
 	DEBUG(3, "receive overrun cleared\n");
     }
@@ -1283,11 +1281,11 @@ xirc2ps_interrupt(int irq, void *dev_id)
 	nn = GetByte(XIRCREG0_PTR);
 	lp->last_ptr_value = nn;
 	if (nn < n) /* rollover */
-	    lp->stats.tx_packets += 256 - n;
+	    dev->stats.tx_packets += 256 - n;
 	else if (n == nn) { /* happens sometimes - don't know why */
 	    DEBUG(0, "PTR not changed?\n");
 	} else
-	    lp->stats.tx_packets += lp->last_ptr_value - n;
+	    dev->stats.tx_packets += lp->last_ptr_value - n;
 	netif_wake_queue(dev);
     }
     if (tx_status & 0x0002) {	/* Execessive collissions */
@@ -1295,7 +1293,7 @@ xirc2ps_interrupt(int irq, void *dev_id)
 	PutByte(XIRCREG_CR, RestartTx);  /* restart transmitter process */
     }
     if (tx_status & 0x0040)
-	lp->stats.tx_aborted_errors++;
+	dev->stats.tx_aborted_errors++;
 
     /* recalculate our work chunk so that we limit the duration of this
      * ISR to about 1/10 of a second.
@@ -1353,7 +1351,7 @@ static void
 xirc_tx_timeout(struct net_device *dev)
 {
     local_info_t *lp = netdev_priv(dev);
-    lp->stats.tx_errors++;
+    dev->stats.tx_errors++;
     printk(KERN_NOTICE "%s: transmit timed out\n", dev->name);
     schedule_work(&lp->tx_timeout_task);
 }
@@ -1409,20 +1407,11 @@ do_start_xmit(struct sk_buff *skb, struc
 
     dev_kfree_skb (skb);
     dev->trans_start = jiffies;
-    lp->stats.tx_bytes += pktlen;
+    dev->stats.tx_bytes += pktlen;
     netif_start_queue(dev);
     return 0;
 }
 
-static struct net_device_stats *
-do_get_stats(struct net_device *dev)
-{
-    local_info_t *lp = netdev_priv(dev);
-
-    /*	lp->stats.rx_missed_errors = GetByte(?) */
-    return &lp->stats;
-}
-
 /****************
  * Set all addresses: This first one is the individual address,
  * the next 9 addresses are taken from the multicast list and

-- 


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

* [PATCH 41/77] xirc2ps: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (39 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 40/77] xir2cps: convert to internal net_device stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:42   ` David Miller
  2009-03-21  5:36 ` [PATCH 42/77] smc91c92: convert to internal net_device_stats Stephen Hemminger
                   ` (35 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: xirc2ps.patch --]
[-- Type: text/plain, Size: 1630 bytes --]

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


--- a/drivers/net/pcmcia/xirc2ps_cs.c	2009-03-20 21:55:40.069839509 -0700
+++ b/drivers/net/pcmcia/xirc2ps_cs.c	2009-03-20 21:56:27.343715110 -0700
@@ -545,6 +545,19 @@ mii_wr(unsigned int ioaddr, u_char phyad
 
 /*============= Main bulk of functions	=========================*/
 
+static const struct net_device_ops netdev_ops = {
+	.ndo_open		= do_open,
+	.ndo_stop		= do_stop,
+	.ndo_start_xmit		= do_start_xmit,
+	.ndo_tx_timeout 	= xirc_tx_timeout,
+	.ndo_set_config		= do_config,
+	.ndo_do_ioctl		= do_ioctl,
+	.ndo_set_multicast_list	= set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /****************
  * xirc2ps_attach() creates an "instance" of the driver, allocating
  * local data structures for one device.  The device is registered
@@ -580,18 +593,10 @@ xirc2ps_probe(struct pcmcia_device *link
     link->irq.Instance = dev;
 
     /* Fill in card specific entries */
-    dev->hard_start_xmit = &do_start_xmit;
-    dev->set_config = &do_config;
-    dev->do_ioctl = &do_ioctl;
-    SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
-    dev->set_multicast_list = &set_multicast_list;
-    dev->open = &do_open;
-    dev->stop = &do_stop;
-#ifdef HAVE_TX_TIMEOUT
-    dev->tx_timeout = xirc_tx_timeout;
+    dev->netdev_ops = &netdev_ops;
+    dev->ethtool_ops = &netdev_ethtool_ops;
     dev->watchdog_timeo = TX_TIMEOUT;
     INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task);
-#endif
 
     return xirc2ps_config(link);
 } /* xirc2ps_attach */

-- 


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

* [PATCH 42/77] smc91c92: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (40 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 41/77] xirc2ps: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:42   ` David Miller
  2009-03-21  5:36 ` [PATCH 43/77] smc91c92: convert to net_device_ops Stephen Hemminger
                   ` (34 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: smc91c92-stats.patch --]
[-- Type: text/plain, Size: 6370 bytes --]

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

--- a/drivers/net/pcmcia/smc91c92_cs.c	2009-03-20 15:51:14.971779412 -0700
+++ b/drivers/net/pcmcia/smc91c92_cs.c	2009-03-20 16:00:43.876651664 -0700
@@ -108,7 +108,7 @@ struct smc_private {
     spinlock_t			lock;
     u_short			manfid;
     u_short			cardid;
-    struct net_device_stats	stats;
+
     dev_node_t			node;
     struct sk_buff		*saved_skb;
     int				packets_waiting;
@@ -289,7 +289,6 @@ static void smc_tx_timeout(struct net_de
 static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static irqreturn_t smc_interrupt(int irq, void *dev_id);
 static void smc_rx(struct net_device *dev);
-static struct net_device_stats *smc_get_stats(struct net_device *dev);
 static void set_rx_mode(struct net_device *dev);
 static int s9k_config(struct net_device *dev, struct ifmap *map);
 static void smc_set_xcvr(struct net_device *dev, int if_port);
@@ -337,7 +336,6 @@ static int smc91c92_probe(struct pcmcia_
 
     /* The SMC91c92-specific entries in the device structure. */
     dev->hard_start_xmit = &smc_start_xmit;
-    dev->get_stats = &smc_get_stats;
     dev->set_config = &s9k_config;
     dev->set_multicast_list = &set_rx_mode;
     dev->open = &smc_open;
@@ -1291,7 +1289,7 @@ static void smc_hardware_send_packet(str
 	return;
     }
 
-    smc->stats.tx_bytes += skb->len;
+    dev->stats.tx_bytes += skb->len;
     /* The card should use the just-allocated buffer. */
     outw(packet_no, ioaddr + PNR_ARR);
     /* point to the beginning of the packet */
@@ -1340,7 +1338,7 @@ static void smc_tx_timeout(struct net_de
     printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, "
 	   "Tx_status %2.2x status %4.4x.\n",
 	   dev->name, inw(ioaddr)&0xff, inw(ioaddr + 2));
-    smc->stats.tx_errors++;
+    dev->stats.tx_errors++;
     smc_reset(dev);
     dev->trans_start = jiffies;
     smc->saved_skb = NULL;
@@ -1362,7 +1360,7 @@ static int smc_start_xmit(struct sk_buff
 
     if (smc->saved_skb) {
 	/* THIS SHOULD NEVER HAPPEN. */
-	smc->stats.tx_aborted_errors++;
+	dev->stats.tx_aborted_errors++;
 	printk(KERN_DEBUG "%s: Internal error -- sent packet while busy.\n",
 	       dev->name);
 	return 1;
@@ -1375,7 +1373,7 @@ static int smc_start_xmit(struct sk_buff
 	printk(KERN_ERR "%s: Far too big packet error.\n", dev->name);
 	dev_kfree_skb (skb);
 	smc->saved_skb = NULL;
-	smc->stats.tx_dropped++;
+	dev->stats.tx_dropped++;
 	return 0;		/* Do not re-queue this packet. */
     }
     /* A packet is now waiting. */
@@ -1433,11 +1431,11 @@ static void smc_tx_err(struct net_device
 
     tx_status = inw(ioaddr + DATA_1);
 
-    smc->stats.tx_errors++;
-    if (tx_status & TS_LOSTCAR) smc->stats.tx_carrier_errors++;
-    if (tx_status & TS_LATCOL)  smc->stats.tx_window_errors++;
+    dev->stats.tx_errors++;
+    if (tx_status & TS_LOSTCAR) dev->stats.tx_carrier_errors++;
+    if (tx_status & TS_LATCOL)  dev->stats.tx_window_errors++;
     if (tx_status & TS_16COL) {
-	smc->stats.tx_aborted_errors++;
+	dev->stats.tx_aborted_errors++;
 	smc->tx_err++;
     }
 
@@ -1474,10 +1472,10 @@ static void smc_eph_irq(struct net_devic
     /* Could be a counter roll-over warning: update stats. */
     card_stats = inw(ioaddr + COUNTER);
     /* single collisions */
-    smc->stats.collisions += card_stats & 0xF;
+    dev->stats.collisions += card_stats & 0xF;
     card_stats >>= 4;
     /* multiple collisions */
-    smc->stats.collisions += card_stats & 0xF;
+    dev->stats.collisions += card_stats & 0xF;
 #if 0 		/* These are for when linux supports these statistics */
     card_stats >>= 4;			/* deferred */
     card_stats >>= 4;			/* excess deferred */
@@ -1551,7 +1549,7 @@ static irqreturn_t smc_interrupt(int irq
 	if (status & IM_TX_EMPTY_INT) {
 	    outw(IM_TX_EMPTY_INT, ioaddr + INTERRUPT);
 	    mask &= ~IM_TX_EMPTY_INT;
-	    smc->stats.tx_packets += smc->packets_waiting;
+	    dev->stats.tx_packets += smc->packets_waiting;
 	    smc->packets_waiting = 0;
 	}
 	if (status & IM_ALLOC_INT) {
@@ -1567,8 +1565,8 @@ static irqreturn_t smc_interrupt(int irq
 	    netif_wake_queue(dev);
 	}
 	if (status & IM_RX_OVRN_INT) {
-	    smc->stats.rx_errors++;
-	    smc->stats.rx_fifo_errors++;
+	    dev->stats.rx_errors++;
+	    dev->stats.rx_fifo_errors++;
 	    if (smc->duplex)
 		smc->rx_ovrn = 1; /* need MC_RESET outside smc_interrupt */
 	    outw(IM_RX_OVRN_INT, ioaddr + INTERRUPT);
@@ -1618,7 +1616,6 @@ irq_done:
 
 static void smc_rx(struct net_device *dev)
 {
-    struct smc_private *smc = netdev_priv(dev);
     unsigned int ioaddr = dev->base_addr;
     int rx_status;
     int packet_length;	/* Caution: not frame length, rather words
@@ -1649,7 +1646,7 @@ static void smc_rx(struct net_device *de
 	
 	if (skb == NULL) {
 	    DEBUG(1, "%s: Low memory, packet dropped.\n", dev->name);
-	    smc->stats.rx_dropped++;
+	    dev->stats.rx_dropped++;
 	    outw(MC_RELEASE, ioaddr + MMU_CMD);
 	    return;
 	}
@@ -1662,18 +1659,18 @@ static void smc_rx(struct net_device *de
 	
 	netif_rx(skb);
 	dev->last_rx = jiffies;
-	smc->stats.rx_packets++;
-	smc->stats.rx_bytes += packet_length;
+	dev->stats.rx_packets++;
+	dev->stats.rx_bytes += packet_length;
 	if (rx_status & RS_MULTICAST)
-	    smc->stats.multicast++;
+	    dev->stats.multicast++;
     } else {
 	/* error ... */
-	smc->stats.rx_errors++;
+	dev->stats.rx_errors++;
 	
-	if (rx_status & RS_ALGNERR)  smc->stats.rx_frame_errors++;
+	if (rx_status & RS_ALGNERR)  dev->stats.rx_frame_errors++;
 	if (rx_status & (RS_TOOSHORT | RS_TOOLONG))
-	    smc->stats.rx_length_errors++;
-	if (rx_status & RS_BADCRC)	smc->stats.rx_crc_errors++;
+	    dev->stats.rx_length_errors++;
+	if (rx_status & RS_BADCRC)	dev->stats.rx_crc_errors++;
     }
     /* Let the MMU free the memory of this packet. */
     outw(MC_RELEASE, ioaddr + MMU_CMD);
@@ -1681,15 +1678,6 @@ static void smc_rx(struct net_device *de
     return;
 }
 
-/*====================================================================*/
-
-static struct net_device_stats *smc_get_stats(struct net_device *dev)
-{
-    struct smc_private *smc = netdev_priv(dev);
-    /* Nothing to update - the 91c92 is a pretty primative chip. */
-    return &smc->stats;
-}
-
 /*======================================================================
 
     Calculate values for the hardware multicast filter hash table.

-- 


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

* [PATCH 43/77] smc91c92: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (41 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 42/77] smc91c92: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:42   ` David Miller
  2009-03-21  5:36 ` [PATCH 44/77] axnet: convert ot net_device_ops Stephen Hemminger
                   ` (33 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: smc91c92-ops.patch --]
[-- Type: text/plain, Size: 1700 bytes --]

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

---
 drivers/net/pcmcia/smc91c92_cs.c |   23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

--- a/drivers/net/pcmcia/smc91c92_cs.c	2009-03-20 16:07:00.765795319 -0700
+++ b/drivers/net/pcmcia/smc91c92_cs.c	2009-03-20 16:08:08.144027094 -0700
@@ -300,6 +300,19 @@ static void mdio_write(struct net_device
 static int smc_link_ok(struct net_device *dev);
 static const struct ethtool_ops ethtool_ops;
 
+static const struct net_device_ops smc_netdev_ops = {
+	.ndo_open		= smc_open,
+	.ndo_stop		= smc_close,
+	.ndo_start_xmit		= smc_start_xmit,
+	.ndo_tx_timeout 	= smc_tx_timeout,
+	.ndo_set_config 	= s9k_config,
+	.ndo_set_multicast_list = set_rx_mode,
+	.ndo_do_ioctl		= &smc_ioctl,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /*======================================================================
 
   smc91c92_attach() creates an "instance" of the driver, allocating
@@ -335,17 +348,9 @@ static int smc91c92_probe(struct pcmcia_
     link->conf.IntType = INT_MEMORY_AND_IO;
 
     /* The SMC91c92-specific entries in the device structure. */
-    dev->hard_start_xmit = &smc_start_xmit;
-    dev->set_config = &s9k_config;
-    dev->set_multicast_list = &set_rx_mode;
-    dev->open = &smc_open;
-    dev->stop = &smc_close;
-    dev->do_ioctl = &smc_ioctl;
+    dev->netdev_ops = &smc_netdev_ops;
     SET_ETHTOOL_OPS(dev, &ethtool_ops);
-#ifdef HAVE_TX_TIMEOUT
-    dev->tx_timeout = smc_tx_timeout;
     dev->watchdog_timeo = TX_TIMEOUT;
-#endif
 
     smc->mii_if.dev = dev;
     smc->mii_if.mdio_read = mdio_read;

-- 


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

* [PATCH 44/77] axnet: convert ot net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (42 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 43/77] smc91c92: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:42   ` David Miller
  2009-03-21  5:36 ` [PATCH 45/77] x25_asy: convert to internal net_device_stats Stephen Hemminger
                   ` (32 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: axnet.patch --]
[-- Type: text/plain, Size: 5032 bytes --]

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


--- a/drivers/net/pcmcia/axnet_cs.c	2009-03-20 16:06:45.275902397 -0700
+++ b/drivers/net/pcmcia/axnet_cs.c	2009-03-20 16:27:39.823027704 -0700
@@ -35,6 +35,7 @@
 #include <linux/spinlock.h>
 #include <linux/ethtool.h>
 #include <linux/netdevice.h>
+#include <linux/etherdevice.h>
 #include <linux/crc32.h>
 #include "../8390.h"
 
@@ -91,6 +92,10 @@ static void axnet_release(struct pcmcia_
 static int axnet_open(struct net_device *dev);
 static int axnet_close(struct net_device *dev);
 static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
+static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static struct net_device_stats *get_stats(struct net_device *dev);
+static void set_multicast_list(struct net_device *dev);
+static void axnet_tx_timeout(struct net_device *dev);
 static const struct ethtool_ops netdev_ethtool_ops;
 static irqreturn_t ei_irq_wrapper(int irq, void *dev_id);
 static void ei_watchdog(u_long arg);
@@ -108,7 +113,6 @@ static void block_output(struct net_devi
 
 static void axnet_detach(struct pcmcia_device *p_dev);
 
-static void axdev_setup(struct net_device *dev);
 static void AX88190_init(struct net_device *dev, int startp);
 static int ax_open(struct net_device *dev);
 static int ax_close(struct net_device *dev);
@@ -134,6 +138,19 @@ static inline axnet_dev_t *PRIV(struct n
 	return p;
 }
 
+static const struct net_device_ops axnet_netdev_ops = {
+	.ndo_open 		= axnet_open,
+	.ndo_stop		= axnet_close,
+	.ndo_do_ioctl		= axnet_ioctl,
+	.ndo_start_xmit		= axnet_start_xmit,
+	.ndo_tx_timeout		= axnet_tx_timeout,
+	.ndo_get_stats		= get_stats,
+	.ndo_set_multicast_list = set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /*======================================================================
 
     axnet_attach() creates an "instance" of the driver, allocating
@@ -146,15 +163,17 @@ static int axnet_probe(struct pcmcia_dev
 {
     axnet_dev_t *info;
     struct net_device *dev;
+    struct ei_device *ei_local;
 
     DEBUG(0, "axnet_attach()\n");
 
-    dev = alloc_netdev(sizeof(struct ei_device) + sizeof(axnet_dev_t),
-			"eth%d", axdev_setup);
-
+    dev = alloc_etherdev(sizeof(struct ei_device) + sizeof(axnet_dev_t));
     if (!dev)
 	return -ENOMEM;
 
+    ei_local = netdev_priv(dev);
+    spin_lock_init(&ei_local->page_lock);
+
     info = PRIV(dev);
     info->p_dev = link;
     link->priv = dev;
@@ -163,10 +182,10 @@ static int axnet_probe(struct pcmcia_dev
     link->conf.Attributes = CONF_ENABLE_IRQ;
     link->conf.IntType = INT_MEMORY_AND_IO;
 
-    dev->open = &axnet_open;
-    dev->stop = &axnet_close;
-    dev->do_ioctl = &axnet_ioctl;
+    dev->netdev_ops = &axnet_netdev_ops;
+
     SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
+    dev->watchdog_timeo = TX_TIMEOUT;
 
     return axnet_config(link);
 } /* axnet_attach */
@@ -905,14 +924,12 @@ int ei_debug = 1;
 /* Index to functions. */
 static void ei_tx_intr(struct net_device *dev);
 static void ei_tx_err(struct net_device *dev);
-static void axnet_tx_timeout(struct net_device *dev);
 static void ei_receive(struct net_device *dev);
 static void ei_rx_overrun(struct net_device *dev);
 
 /* Routines generic to NS8390-based boards. */
 static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
 								int start_page);
-static void set_multicast_list(struct net_device *dev);
 static void do_set_multicast_list(struct net_device *dev);
 
 /*
@@ -954,15 +971,6 @@ static int ax_open(struct net_device *de
 	unsigned long flags;
 	struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
 
-#ifdef HAVE_TX_TIMEOUT
-	/* The card I/O part of the driver (e.g. 3c503) can hook a Tx timeout
-	    wrapper that does e.g. media check & then calls axnet_tx_timeout. */
-	if (dev->tx_timeout == NULL)
-		 dev->tx_timeout = axnet_tx_timeout;
-	if (dev->watchdog_timeo <= 0)
-		 dev->watchdog_timeo = TX_TIMEOUT;
-#endif
-
 	/*
 	 *	Grab the page lock so we own the register set, then call
 	 *	the init function.
@@ -1701,30 +1709,6 @@ static void set_multicast_list(struct ne
 	spin_unlock_irqrestore(&dev_lock(dev), flags);
 }	
 
-/**
- * axdev_setup - init rest of 8390 device struct
- * @dev: network device structure to init
- *
- * Initialize the rest of the 8390 device structure.  Do NOT __init
- * this, as it is used by 8390 based modular drivers too.
- */
-
-static void axdev_setup(struct net_device *dev)
-{
-	struct ei_device *ei_local;
-	if (ei_debug > 1)
-		printk(version_8390);
-    
-	ei_local = (struct ei_device *)netdev_priv(dev);
-	spin_lock_init(&ei_local->page_lock);
-    
-	dev->hard_start_xmit = &axnet_start_xmit;
-	dev->get_stats	= get_stats;
-	dev->set_multicast_list = &set_multicast_list;
-
-	ether_setup(dev);
-}
-
 /* This page of functions should be 8390 generic */
 /* Follow National Semi's recommendations for initializing the "NIC". */
 

-- 


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

* [PATCH 45/77] x25_asy: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (43 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 44/77] axnet: convert ot net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:42   ` David Miller
  2009-03-21  5:36 ` [PATCH 46/77] x25_asy: convert to net_device_ops Stephen Hemminger
                   ` (31 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: x25_asy-stats.patch --]
[-- Type: text/plain, Size: 4078 bytes --]

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

--- a/drivers/net/wan/x25_asy.c	2009-03-20 16:27:33.651651895 -0700
+++ b/drivers/net/wan/x25_asy.c	2009-03-20 16:28:38.732839627 -0700
@@ -142,7 +142,7 @@ static int x25_asy_change_mtu(struct net
 			memcpy(sl->xbuff, sl->xhead, sl->xleft);
 		} else  {
 			sl->xleft = 0;
-			sl->stats.tx_dropped++;
+			dev->stats.tx_dropped++;
 		}
 	}
 	sl->xhead = sl->xbuff;
@@ -153,7 +153,7 @@ static int x25_asy_change_mtu(struct net
 			memcpy(sl->rbuff, rbuff, sl->rcount);
 		} else  {
 			sl->rcount = 0;
-			sl->stats.rx_over_errors++;
+			dev->stats.rx_over_errors++;
 			set_bit(SLF_ERROR, &sl->flags);
 		}
 	}
@@ -188,18 +188,19 @@ static inline void x25_asy_unlock(struct
 
 static void x25_asy_bump(struct x25_asy *sl)
 {
+	struct net_device *dev = sl->dev;
 	struct sk_buff *skb;
 	int count;
 	int err;
 
 	count = sl->rcount;
-	sl->stats.rx_bytes += count;
+	dev->stats.rx_bytes += count;
 
 	skb = dev_alloc_skb(count+1);
 	if (skb == NULL) {
 		printk(KERN_WARNING "%s: memory squeeze, dropping packet.\n",
 			sl->dev->name);
-		sl->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 		return;
 	}
 	skb_push(skb, 1);	/* LAPB internal control */
@@ -211,7 +212,7 @@ static void x25_asy_bump(struct x25_asy 
 		printk(KERN_DEBUG "x25_asy: data received err - %d\n", err);
 	} else {
 		netif_rx(skb);
-		sl->stats.rx_packets++;
+		dev->stats.rx_packets++;
 	}
 }
 
@@ -226,7 +227,7 @@ static void x25_asy_encaps(struct x25_as
 		len = mtu;
 		printk(KERN_DEBUG "%s: truncating oversized transmit packet!\n",
 					sl->dev->name);
-		sl->stats.tx_dropped++;
+		sl->dev->stats.tx_dropped++;
 		x25_asy_unlock(sl);
 		return;
 	}
@@ -266,7 +267,7 @@ static void x25_asy_write_wakeup(struct 
 	if (sl->xleft <= 0) {
 		/* Now serial buffer is almost free & we can start
 		 * transmission of another packet */
-		sl->stats.tx_packets++;
+		sl->dev->stats.tx_packets++;
 		clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
 		x25_asy_unlock(sl);
 		return;
@@ -383,7 +384,7 @@ static void x25_asy_data_transmit(struct
 	/* We were not busy, so we are now... :-) */
 	if (skb != NULL) {
 		x25_asy_lock(sl);
-		sl->stats.tx_bytes += skb->len;
+		dev->stats.tx_bytes += skb->len;
 		x25_asy_encaps(sl, skb->data, skb->len);
 		dev_kfree_skb(skb);
 	}
@@ -533,7 +534,7 @@ static void x25_asy_receive_buf(struct t
 	while (count--) {
 		if (fp && *fp++) {
 			if (!test_and_set_bit(SLF_ERROR, &sl->flags))
-				sl->stats.rx_errors++;
+				sl->dev->stats.rx_errors++;
 			cp++;
 			continue;
 		}
@@ -608,14 +609,6 @@ static void x25_asy_close_tty(struct tty
 	x25_asy_free(sl);
 }
 
-
-static struct net_device_stats *x25_asy_get_stats(struct net_device *dev)
-{
-	struct x25_asy *sl = netdev_priv(dev);
-	return &sl->stats;
-}
-
-
  /************************************************************************
   *			STANDARD X.25 ENCAPSULATION		  	 *
   ************************************************************************/
@@ -682,7 +675,7 @@ static void x25_asy_unesc(struct x25_asy
 			sl->rbuff[sl->rcount++] = s;
 			return;
 		}
-		sl->stats.rx_over_errors++;
+		sl->dev->stats.rx_over_errors++;
 		set_bit(SLF_ERROR, &sl->flags);
 	}
 }
@@ -739,7 +732,6 @@ static void x25_asy_setup(struct net_dev
 	dev->watchdog_timeo	= HZ*20;
 	dev->open		= x25_asy_open_dev;
 	dev->stop		= x25_asy_close;
-	dev->get_stats	        = x25_asy_get_stats;
 	dev->change_mtu		= x25_asy_change_mtu;
 	dev->hard_header_len	= 0;
 	dev->addr_len		= 0;
--- a/drivers/net/wan/x25_asy.h	2009-03-20 16:27:33.644652790 -0700
+++ b/drivers/net/wan/x25_asy.h	2009-03-20 16:27:44.598964747 -0700
@@ -28,10 +28,6 @@ struct x25_asy {
   unsigned char		*xbuff;		/* transmitter buffer		*/
   unsigned char         *xhead;         /* pointer to next byte to XMIT */
   int                   xleft;          /* bytes left in XMIT queue     */
-
-  /* X.25 interface statistics. */
-  struct net_device_stats stats;
-
   int                   buffsize;       /* Max buffers sizes            */
 
   unsigned long		flags;		/* Flag values/ mode etc	*/

-- 


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

* [PATCH 46/77] x25_asy: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (44 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 45/77] x25_asy: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:43   ` David Miller
  2009-03-21  5:36 ` [PATCH 47/77] dlci: convert to internal net_device_stats Stephen Hemminger
                   ` (30 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: x25_asy-ops.patch --]
[-- Type: text/plain, Size: 1163 bytes --]

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

---
 drivers/net/wan/x25_asy.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

--- a/drivers/net/wan/x25_asy.c	2009-03-20 22:03:55.785902240 -0700
+++ b/drivers/net/wan/x25_asy.c	2009-03-20 22:03:57.377902450 -0700
@@ -712,6 +712,14 @@ static int x25_asy_open_dev(struct net_d
 	return 0;
 }
 
+static const struct net_device_ops x25_asy_netdev_ops = {
+	.ndo_open	= x25_asy_open_dev,
+	.ndo_stop	= x25_asy_close,
+	.ndo_start_xmit	= x25_asy_xmit,
+	.ndo_tx_timeout	= x25_asy_timeout,
+	.ndo_change_mtu	= x25_asy_change_mtu,
+};
+
 /* Initialise the X.25 driver.  Called by the device init code */
 static void x25_asy_setup(struct net_device *dev)
 {
@@ -727,12 +735,8 @@ static void x25_asy_setup(struct net_dev
 	 */
 
 	dev->mtu		= SL_MTU;
-	dev->hard_start_xmit	= x25_asy_xmit;
-	dev->tx_timeout		= x25_asy_timeout;
+	dev->netdev_ops		= &x25_asy_netdev_ops;
 	dev->watchdog_timeo	= HZ*20;
-	dev->open		= x25_asy_open_dev;
-	dev->stop		= x25_asy_close;
-	dev->change_mtu		= x25_asy_change_mtu;
 	dev->hard_header_len	= 0;
 	dev->addr_len		= 0;
 	dev->type		= ARPHRD_X25;

-- 


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

* [PATCH 47/77] dlci: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (45 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 46/77] x25_asy: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:43   ` David Miller
  2009-03-21  5:36 ` [PATCH 48/77] dlci: convert to net_device_ops Stephen Hemminger
                   ` (29 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: dlci-stats.patch --]
[-- Type: text/plain, Size: 3098 bytes --]

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


--- a/drivers/net/wan/dlci.c	2009-03-20 16:19:40.708965461 -0700
+++ b/drivers/net/wan/dlci.c	2009-03-20 16:20:03.615714775 -0700
@@ -114,7 +114,7 @@ static void dlci_receive(struct sk_buff 
 	if (!pskb_may_pull(skb, sizeof(*hdr))) {
 		printk(KERN_NOTICE "%s: invalid data no header\n",
 		       dev->name);
-		dlp->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		kfree_skb(skb);
 		return;
 	}
@@ -127,7 +127,7 @@ static void dlci_receive(struct sk_buff 
 	if (hdr->control != FRAD_I_UI)
 	{
 		printk(KERN_NOTICE "%s: Invalid header flag 0x%02X.\n", dev->name, hdr->control);
-		dlp->stats.rx_errors++;
+		dev->stats.rx_errors++;
 	}
 	else
 		switch(hdr->IP_NLPID)
@@ -136,14 +136,14 @@ static void dlci_receive(struct sk_buff 
 				if (hdr->NLPID != FRAD_P_SNAP)
 				{
 					printk(KERN_NOTICE "%s: Unsupported NLPID 0x%02X.\n", dev->name, hdr->NLPID);
-					dlp->stats.rx_errors++;
+					dev->stats.rx_errors++;
 					break;
 				}
 	 
 				if (hdr->OUI[0] + hdr->OUI[1] + hdr->OUI[2] != 0)
 				{
 					printk(KERN_NOTICE "%s: Unsupported organizationally unique identifier 0x%02X-%02X-%02X.\n", dev->name, hdr->OUI[0], hdr->OUI[1], hdr->OUI[2]);
-					dlp->stats.rx_errors++;
+					dev->stats.rx_errors++;
 					break;
 				}
 
@@ -164,12 +164,12 @@ static void dlci_receive(struct sk_buff 
 			case FRAD_P_Q933:
 			case FRAD_P_CLNP:
 				printk(KERN_NOTICE "%s: Unsupported NLPID 0x%02X.\n", dev->name, hdr->pad);
-				dlp->stats.rx_errors++;
+				dev->stats.rx_errors++;
 				break;
 
 			default:
 				printk(KERN_NOTICE "%s: Invalid pad byte 0x%02X.\n", dev->name, hdr->pad);
-				dlp->stats.rx_errors++;
+				dev->stats.rx_errors++;
 				break;				
 		}
 
@@ -178,9 +178,9 @@ static void dlci_receive(struct sk_buff 
 		/* we've set up the protocol, so discard the header */
 		skb_reset_mac_header(skb);
 		skb_pull(skb, header);
-		dlp->stats.rx_bytes += skb->len;
+		dev->stats.rx_bytes += skb->len;
 		netif_rx(skb);
-		dlp->stats.rx_packets++;
+		dev->stats.rx_packets++;
 	}
 	else
 		dev_kfree_skb(skb);
@@ -204,15 +204,15 @@ static int dlci_transmit(struct sk_buff 
 	switch (ret)
 	{
 		case DLCI_RET_OK:
-			dlp->stats.tx_packets++;
+			dev->stats.tx_packets++;
 			ret = 0;
 			break;
 			case DLCI_RET_ERR:
-			dlp->stats.tx_errors++;
+			dev->stats.tx_errors++;
 			ret = 0;
 			break;
 			case DLCI_RET_DROP:
-			dlp->stats.tx_dropped++;
+			dev->stats.tx_dropped++;
 			ret = 1;
 			break;
 	}
@@ -342,15 +342,6 @@ static int dlci_close(struct net_device 
 	return 0;
 }
 
-static struct net_device_stats *dlci_get_stats(struct net_device *dev)
-{
-	struct dlci_local *dlp;
-
-	dlp = netdev_priv(dev);
-
-	return(&dlp->stats);
-}
-
 static int dlci_add(struct dlci_add *dlci)
 {
 	struct net_device	*master, *slave;
@@ -498,7 +489,6 @@ static void dlci_setup(struct net_device
 	dev->do_ioctl		= dlci_dev_ioctl;
 	dev->hard_start_xmit	= dlci_transmit;
 	dev->header_ops		= &dlci_header_ops;
-	dev->get_stats		= dlci_get_stats;
 	dev->change_mtu		= dlci_change_mtu;
 	dev->destructor		= free_netdev;
 

-- 


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

* [PATCH 48/77] dlci: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (46 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 47/77] dlci: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:43   ` David Miller
  2009-03-21  5:36 ` [PATCH 49/77] cycx: " Stephen Hemminger
                   ` (28 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: dlci-netdev.patch --]
[-- Type: text/plain, Size: 1571 bytes --]

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

--- a/drivers/net/wan/dlci.c	2009-03-20 16:39:20.344088959 -0700
+++ b/drivers/net/wan/dlci.c	2009-03-20 17:04:52.506777503 -0700
@@ -200,7 +200,7 @@ static int dlci_transmit(struct sk_buff 
 
 	netif_stop_queue(dev);
 	
-	ret = dlp->slave->hard_start_xmit(skb, dlp->slave);
+	ret = dlp->slave->netdev_ops->ndo_start_xmit(skb, dlp->slave);
 	switch (ret)
 	{
 		case DLCI_RET_OK:
@@ -295,11 +295,9 @@ static int dlci_dev_ioctl(struct net_dev
 
 static int dlci_change_mtu(struct net_device *dev, int new_mtu)
 {
-	struct dlci_local *dlp;
-
-	dlp = netdev_priv(dev);
+	struct dlci_local *dlp = netdev_priv(dev);
 
-	return((*dlp->slave->change_mtu)(dlp->slave, new_mtu));
+	return dev_set_mtu(dlp->slave, new_mtu);
 }
 
 static int dlci_open(struct net_device *dev)
@@ -479,17 +477,21 @@ static const struct header_ops dlci_head
 	.create	= dlci_header,
 };
 
+static const struct net_device_ops dlci_netdev_ops = {
+	.ndo_open	= dlci_open,
+	.ndo_stop	= dlci_close,
+	.ndo_do_ioctl	= dlci_dev_ioctl,
+	.ndo_start_xmit	= dlci_transmit,
+	.ndo_change_mtu	= dlci_change_mtu,
+};
+
 static void dlci_setup(struct net_device *dev)
 {
 	struct dlci_local *dlp = netdev_priv(dev);
 
 	dev->flags		= 0;
-	dev->open		= dlci_open;
-	dev->stop		= dlci_close;
-	dev->do_ioctl		= dlci_dev_ioctl;
-	dev->hard_start_xmit	= dlci_transmit;
 	dev->header_ops		= &dlci_header_ops;
-	dev->change_mtu		= dlci_change_mtu;
+	dev->netdev_ops		= &dlci_netdev_ops;
 	dev->destructor		= free_netdev;
 
 	dlp->receive		= dlci_receive;

-- 


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

* [PATCH 49/77] cycx: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (47 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 48/77] dlci: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:43   ` David Miller
  2009-03-21  5:36 ` [PATCH 50/77] lapbether: convert to internal net_device_stats Stephen Hemminger
                   ` (27 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: cycx-netdev.patch --]
[-- Type: text/plain, Size: 2177 bytes --]

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

--- a/drivers/net/wan/cycx_x25.c	2009-03-20 17:04:44.887089081 -0700
+++ b/drivers/net/wan/cycx_x25.c	2009-03-20 17:06:13.508715060 -0700
@@ -355,12 +355,6 @@ static int cycx_wan_update(struct wan_de
 	return 0;
 }
 
-/* callback to initialize device */
-static void cycx_x25_chan_setup(struct net_device *dev)
-{
-	dev->init = cycx_netdevice_init;
-}
-
 /* Create new logical channel.
  * This routine is called by the router when ROUTER_IFNEW IOCTL is being
  * handled.
@@ -476,6 +470,27 @@ static const struct header_ops cycx_head
 	.rebuild = cycx_netdevice_rebuild_header,
 };
 
+static const struct net_device_ops cycx_netdev_ops = {
+	.ndo_init	= cycx_netdevice_init,
+	.ndo_open	= cycx_netdevice_open,
+	.ndo_stop	= cycx_netdevice_stop,
+	.ndo_start_xmit	= cycx_netdevice_hard_start_xmit,
+	.ndo_get_stats	= cycx_netdevice_get_stats,
+};
+
+static void cycx_x25_chan_setup(struct net_device *dev)
+{
+	/* Initialize device driver entry points */
+	dev->netdev_ops		= &cycx_netdev_ops;
+	dev->header_ops		= &cycx_header_ops;
+
+	/* Initialize media-specific parameters */
+	dev->mtu		= CYCX_X25_CHAN_MTU;
+	dev->type		= ARPHRD_HWX25;	/* ARP h/w type */
+	dev->hard_header_len	= 0;		/* media header length */
+	dev->addr_len		= 0;		/* hardware address length */
+}
+
 /* Initialize Linux network interface.
  *
  * This routine is called only once for each interface, during Linux network
@@ -487,20 +502,6 @@ static int cycx_netdevice_init(struct ne
 	struct cycx_device *card = chan->card;
 	struct wan_device *wandev = &card->wandev;
 
-	/* Initialize device driver entry points */
-	dev->open		= cycx_netdevice_open;
-	dev->stop		= cycx_netdevice_stop;
-	dev->header_ops		= &cycx_header_ops;
-
-	dev->hard_start_xmit	= cycx_netdevice_hard_start_xmit;
-	dev->get_stats		= cycx_netdevice_get_stats;
-
-	/* Initialize media-specific parameters */
-	dev->mtu		= CYCX_X25_CHAN_MTU;
-	dev->type		= ARPHRD_HWX25;	/* ARP h/w type */
-	dev->hard_header_len	= 0;		/* media header length */
-	dev->addr_len		= 0;		/* hardware address length */
-
 	if (!chan->svc)
 		*(__be16*)dev->dev_addr = htons(chan->lcn);
 

-- 


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

* [PATCH 50/77] lapbether: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (48 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 49/77] cycx: " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:43   ` David Miller
  2009-03-21  5:36 ` [PATCH 51/77] labether: convert to net_device_ops Stephen Hemminger
                   ` (26 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: lapbether-stats.patch --]
[-- Type: text/plain, Size: 1829 bytes --]

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

--- a/drivers/net/wan/lapbether.c	2009-03-20 21:45:41.177964217 -0700
+++ b/drivers/net/wan/lapbether.c	2009-03-20 22:04:49.754653610 -0700
@@ -55,7 +55,6 @@ struct lapbethdev {
 	struct list_head	node;
 	struct net_device	*ethdev;	/* link to ethernet device */
 	struct net_device	*axdev;		/* lapbeth device (lapb#) */
-	struct net_device_stats stats;		/* some statistics */
 };
 
 static LIST_HEAD(lapbeth_devices);
@@ -107,10 +106,9 @@ static int lapbeth_rcv(struct sk_buff *s
 	if (!netif_running(lapbeth->axdev))
 		goto drop_unlock;
 
-	lapbeth->stats.rx_packets++;
-
 	len = skb->data[0] + skb->data[1] * 256;
-	lapbeth->stats.rx_bytes += len;
+	dev->stats.rx_packets++;
+	dev->stats.rx_bytes += len;
 
 	skb_pull(skb, 2);	/* Remove the length bytes */
 	skb_trim(skb, len);	/* Set the length of the data */
@@ -210,8 +208,8 @@ static void lapbeth_data_transmit(struct
 	*ptr++ = size % 256;
 	*ptr++ = size / 256;
 
-	lapbeth->stats.tx_packets++;
-	lapbeth->stats.tx_bytes += size;
+	ndev->stats.tx_packets++;
+	ndev->stats.tx_bytes += size;
 
 	skb->dev = dev = lapbeth->ethdev;
 
@@ -255,15 +253,6 @@ static void lapbeth_disconnected(struct 
 }
 
 /*
- *	Statistics
- */
-static struct net_device_stats *lapbeth_get_stats(struct net_device *dev)
-{
-	struct lapbethdev *lapbeth = netdev_priv(dev);
-	return &lapbeth->stats;
-}
-
-/*
  *	Set AX.25 callsign
  */
 static int lapbeth_set_mac_address(struct net_device *dev, void *addr)
@@ -321,7 +310,6 @@ static void lapbeth_setup(struct net_dev
 	dev->stop	     = lapbeth_close;
 	dev->destructor	     = free_netdev;
 	dev->set_mac_address = lapbeth_set_mac_address;
-	dev->get_stats	     = lapbeth_get_stats;
 	dev->type            = ARPHRD_X25;
 	dev->hard_header_len = 3;
 	dev->mtu             = 1000;

-- 


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

* [PATCH 51/77] labether: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (49 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 50/77] lapbether: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:47   ` David Miller
  2009-03-21  5:36 ` [PATCH 52/77] sbni: use internal net_device_stats Stephen Hemminger
                   ` (25 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: lapbether.patch --]
[-- Type: text/plain, Size: 962 bytes --]

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

--- a/drivers/net/wan/lapbether.c	2009-03-20 22:04:49.754653610 -0700
+++ b/drivers/net/wan/lapbether.c	2009-03-20 22:05:47.163652939 -0700
@@ -303,13 +303,17 @@ static int lapbeth_close(struct net_devi
 
 /* ------------------------------------------------------------------------ */
 
+static const struct net_device_ops lapbeth_netdev_ops = {
+	.ndo_open	     = lapbeth_open,
+	.ndo_stop	     = lapbeth_close,
+	.ndo_start_xmit	     = lapbeth_xmit,
+	.ndo_set_mac_address = lapbeth_set_mac_address,
+};
+
 static void lapbeth_setup(struct net_device *dev)
 {
-	dev->hard_start_xmit = lapbeth_xmit;
-	dev->open	     = lapbeth_open;
-	dev->stop	     = lapbeth_close;
+	dev->netdev_ops	     = &lapbeth_netdev_ops;
 	dev->destructor	     = free_netdev;
-	dev->set_mac_address = lapbeth_set_mac_address;
 	dev->type            = ARPHRD_X25;
 	dev->hard_header_len = 3;
 	dev->mtu             = 1000;

-- 


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

* [PATCH 52/77] sbni: use internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (50 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 51/77] labether: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:47   ` David Miller
  2009-03-21  5:36 ` [PATCH 53/77] sbni: convert to net_device_ops Stephen Hemminger
                   ` (24 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: sbni.patch --]
[-- Type: text/plain, Size: 5136 bytes --]

Convert to use existing net_device_stats.
This driver,
      has bad style,
      	of using commas,
	   when brackets should be used...

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

--- a/drivers/net/wan/sbni.c	2009-03-20 17:14:16.263027723 -0700
+++ b/drivers/net/wan/sbni.c	2009-03-20 17:22:27.542840306 -0700
@@ -68,7 +68,6 @@
 /* device private data */
 
 struct net_local {
-	struct net_device_stats	stats;
 	struct timer_list	watchdog;
 
 	spinlock_t	lock;
@@ -117,7 +116,6 @@ static int  sbni_open( struct net_device
 static int  sbni_close( struct net_device * );
 static int  sbni_start_xmit( struct sk_buff *, struct net_device * );
 static int  sbni_ioctl( struct net_device *, struct ifreq *, int );
-static struct net_device_stats  *sbni_get_stats( struct net_device * );
 static void  set_multicast_list( struct net_device * );
 
 static irqreturn_t sbni_interrupt( int, void * );
@@ -723,13 +721,11 @@ upload_data( struct net_device  *dev,  u
 			nl->wait_frameno = 0,
 			nl->inppos = 0,
 #ifdef CONFIG_SBNI_MULTILINE
-			((struct net_local *)netdev_priv(nl->master))
-				->stats.rx_errors++,
-			((struct net_local *)netdev_priv(nl->master))
-				->stats.rx_missed_errors++;
+			nl->master->stats.rx_errors++,
+			nl->master->stats.rx_missed_errors++;
 #else
-			nl->stats.rx_errors++,
-			nl->stats.rx_missed_errors++;
+		        dev->stats.rx_errors++,
+			dev->stats.rx_missed_errors++;
 #endif
 			/* now skip all frames until is_first != 0 */
 	} else
@@ -742,13 +738,11 @@ upload_data( struct net_device  *dev,  u
 		 */
 		nl->wait_frameno = 0,
 #ifdef CONFIG_SBNI_MULTILINE
-		((struct net_local *)netdev_priv(nl->master))
-			->stats.rx_errors++,
-		((struct net_local *)netdev_priv(nl->master))
-			->stats.rx_crc_errors++;
+		nl->master->stats.rx_errors++,
+		nl->master->stats.rx_crc_errors++;
 #else
-		nl->stats.rx_errors++,
-		nl->stats.rx_crc_errors++;
+		dev->stats.rx_errors++,
+		dev->stats.rx_crc_errors++;
 #endif
 
 	return  frame_ok;
@@ -756,15 +750,16 @@ upload_data( struct net_device  *dev,  u
 
 
 static inline void
-send_complete( struct net_local  *nl )
+send_complete( struct net_device *dev )
 {
+	struct net_local  *nl = netdev_priv(dev);
+
 #ifdef CONFIG_SBNI_MULTILINE
-	((struct net_local *)netdev_priv(nl->master))->stats.tx_packets++;
-	((struct net_local *)netdev_priv(nl->master))->stats.tx_bytes
-		+= nl->tx_buf_p->len;
+	nl->master->stats.tx_packets++;
+	nl->master->stats.tx_bytes += nl->tx_buf_p->len;
 #else
-	nl->stats.tx_packets++;
-	nl->stats.tx_bytes += nl->tx_buf_p->len;
+	dev->stats.tx_packets++;
+	dev->stats.tx_bytes += nl->tx_buf_p->len;
 #endif
 	dev_kfree_skb_irq( nl->tx_buf_p );
 
@@ -792,7 +787,7 @@ interpret_ack( struct net_device  *dev, 
 						   nl->maxframe,
 						   nl->tx_buf_p->len - nl->outpos);
 			else
-				send_complete( nl ),
+				send_complete( dev ),
 #ifdef CONFIG_SBNI_MULTILINE
 				netif_wake_queue( nl->master );
 #else
@@ -881,13 +876,11 @@ drop_xmit_queue( struct net_device  *dev
 		dev_kfree_skb_any( nl->tx_buf_p ),
 		nl->tx_buf_p = NULL,
 #ifdef CONFIG_SBNI_MULTILINE
-		((struct net_local *)netdev_priv(nl->master))
-			->stats.tx_errors++,
-		((struct net_local *)netdev_priv(nl->master))
-			->stats.tx_carrier_errors++;
+		nl->master->stats.tx_errors++,
+		nl->master->stats.tx_carrier_errors++;
 #else
-		nl->stats.tx_errors++,
-		nl->stats.tx_carrier_errors++;
+		dev->stats.tx_errors++,
+		dev->stats.tx_carrier_errors++;
 #endif
 
 	nl->tx_frameno	= 0;
@@ -1017,14 +1010,13 @@ indicate_pkt( struct net_device  *dev )
 #ifdef CONFIG_SBNI_MULTILINE
 	skb->protocol = eth_type_trans( skb, nl->master );
 	netif_rx( skb );
-	++((struct net_local *)netdev_priv(nl->master))->stats.rx_packets;
-	((struct net_local *)netdev_priv(nl->master))->stats.rx_bytes +=
-		nl->inppos;
+	++nl->master->stats.rx_packets;
+	nl->master->stats.rx_bytes += nl->inppos;
 #else
 	skb->protocol = eth_type_trans( skb, dev );
 	netif_rx( skb );
-	++nl->stats.rx_packets;
-	nl->stats.rx_bytes += nl->inppos;
+	++dev->stats.rx_packets;
+	dev->stats.rx_bytes += nl->inppos;
 #endif
 	nl->rx_buf_p = NULL;	/* protocol driver will clear this sk_buff */
 }
@@ -1197,7 +1189,7 @@ sbni_open( struct net_device  *dev )
 handler_attached:
 
 	spin_lock( &nl->lock );
-	memset( &nl->stats, 0, sizeof(struct net_device_stats) );
+	memset( &dev->stats, 0, sizeof(struct net_device_stats) );
 	memset( &nl->in_stats, 0, sizeof(struct sbni_in_stats) );
 
 	card_start( dev );
@@ -1413,7 +1405,7 @@ enslave( struct net_device  *dev,  struc
 
 	/* Summary statistics of MultiLine operation will be stored
 	   in master's counters */
-	memset( &snl->stats, 0, sizeof(struct net_device_stats) );
+	memset( &slave_dev->stats, 0, sizeof(struct net_device_stats) );
 	netif_stop_queue( slave_dev );
 	netif_wake_queue( dev );	/* Now we are able to transmit */
 
@@ -1464,14 +1456,6 @@ emancipate( struct net_device  *dev )
 
 #endif
 
-
-static struct net_device_stats *
-sbni_get_stats( struct net_device  *dev )
-{
-	return  &((struct net_local *)netdev_priv(dev))->stats;
-}
-
-
 static void
 set_multicast_list( struct net_device  *dev )
 {

-- 


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

* [PATCH 53/77] sbni: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (51 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 52/77] sbni: use internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:47   ` David Miller
  2009-03-21  5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
                   ` (23 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: sbni-ops.patch --]
[-- Type: text/plain, Size: 1190 bytes --]

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


--- a/drivers/net/wan/sbni.c	2009-03-20 17:40:56.731776387 -0700
+++ b/drivers/net/wan/sbni.c	2009-03-20 17:43:13.322652142 -0700
@@ -206,15 +206,21 @@ sbni_isa_probe( struct net_device  *dev 
 	}
 }
 
+static const struct net_device_ops sbni_netdev_ops = {
+	.ndo_open		= sbni_open,
+	.ndo_stop		= sbni_close,
+	.ndo_start_xmit		= sbni_start_xmit,
+	.ndo_set_multicast_list	= set_multicast_list,
+	.ndo_do_ioctl		= sbni_ioctl,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static void __init sbni_devsetup(struct net_device *dev)
 {
 	ether_setup( dev );
-	dev->open		= &sbni_open;
-	dev->stop		= &sbni_close;
-	dev->hard_start_xmit	= &sbni_start_xmit;
-	dev->get_stats		= &sbni_get_stats;
-	dev->set_multicast_list	= &set_multicast_list;
-	dev->do_ioctl		= &sbni_ioctl;
+	dev->netdev_ops = &sbni_netdev_ops;
 }
 
 int __init sbni_probe(int unit)
@@ -227,6 +233,8 @@ int __init sbni_probe(int unit)
 	if (!dev)
 		return -ENOMEM;
 
+	dev->netdev_ops = &sbni_netdev_ops;
+
 	sprintf(dev->name, "sbni%d", unit);
 	netdev_boot_setup_check(dev);
 

-- 


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

* [PATCH 54/77] netwave: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (52 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 53/77] sbni: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053716.656878050-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 55/77] netwave: convert to net_device_ops Stephen Hemminger
                   ` (22 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-wireless

[-- Attachment #1: netwave-stats.patch --]
[-- Type: text/plain, Size: 5925 bytes --]

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


--- a/drivers/net/wireless/netwave_cs.c	2009-03-20 21:45:41.100964205 -0700
+++ b/drivers/net/wireless/netwave_cs.c	2009-03-20 22:14:37.954403178 -0700
@@ -210,10 +210,6 @@ static int netwave_rx( struct net_device
 static irqreturn_t netwave_interrupt(int irq, void *dev_id);
 static void netwave_watchdog(struct net_device *);
 
-/* Statistics */
-static void update_stats(struct net_device *dev);
-static struct net_device_stats *netwave_get_stats(struct net_device *dev);
-
 /* Wireless extensions */
 static struct iw_statistics* netwave_get_wireless_stats(struct net_device *dev);
 
@@ -275,14 +271,9 @@ typedef struct netwave_private {
     int        lastExec;
     struct timer_list      watchdog;	/* To avoid blocking state */
     struct site_survey     nss;
-    struct net_device_stats stats;
     struct iw_statistics   iw_stats;    /* Wireless stats */
 } netwave_private;
 
-#ifdef NETWAVE_STATS
-static struct net_device_stats *netwave_get_stats(struct net_device *dev);
-#endif
-
 /*
  * The Netwave card is little-endian, so won't work for big endian
  * systems.
@@ -413,7 +404,6 @@ static int netwave_probe(struct pcmcia_d
 
     /* Netwave specific entries in the device structure */
     dev->hard_start_xmit = &netwave_start_xmit;
-    dev->get_stats  = &netwave_get_stats;
     dev->set_multicast_list = &set_multicast_list;
     /* wireless extensions */
     dev->wireless_handlers = (struct iw_handler_def *)&netwave_handler_def;
@@ -988,7 +978,7 @@ static int netwave_hw_xmit(unsigned char
 	return 1;
     }
 
-    priv->stats.tx_bytes += len;
+    dev->stats.tx_bytes += len;
 
     DEBUG(3, "Transmitting with SPCQ %x SPU %x LIF %x ISPLQ %x\n",
 	  readb(ramBase + NETWAVE_EREG_SPCQ),
@@ -1107,11 +1097,11 @@ static irqreturn_t netwave_interrupt(int
 	    rser = readb(ramBase + NETWAVE_EREG_RSER);			
 	    
 	    if (rser & 0x04) {
-		++priv->stats.rx_dropped; 
-		++priv->stats.rx_crc_errors;
+		++dev->stats.rx_dropped;
+		++dev->stats.rx_crc_errors;
 	    }
 	    if (rser & 0x02)
-		++priv->stats.rx_frame_errors;
+		++dev->stats.rx_frame_errors;
 			
 	    /* Clear the RxErr bit in RSER. RSER+4 is the
 	     * write part. Also clear the RxCRC (0x04) and 
@@ -1125,8 +1115,8 @@ static irqreturn_t netwave_interrupt(int
 	    wait_WOC(iobase);
 	    writeb(0x40, ramBase + NETWAVE_EREG_ASCC);
 
-	    /* Remember to count up priv->stats on error packets */
-	    ++priv->stats.rx_errors;
+	    /* Remember to count up dev->stats on error packets */
+	    ++dev->stats.rx_errors;
 	}
 	/* TxDN */
 	if (status & 0x20) {
@@ -1140,17 +1130,17 @@ static irqreturn_t netwave_interrupt(int
 		/* Transmitting was okay, clear bits */
 		wait_WOC(iobase);
 		writeb(0x2f, ramBase + NETWAVE_EREG_TSER + 4);
-		++priv->stats.tx_packets;
+		++dev->stats.tx_packets;
 	    }
 			
 	    if (txStatus & 0xd0) {
 		if (txStatus & 0x80) {
-		    ++priv->stats.collisions; /* Because of /proc/net/dev*/
-		    /* ++priv->stats.tx_aborted_errors; */
+		    ++dev->stats.collisions; /* Because of /proc/net/dev*/
+		    /* ++dev->stats.tx_aborted_errors; */
 		    /* printk("Collision. %ld\n", jiffies - dev->trans_start); */
 		}
 		if (txStatus & 0x40) 
-		    ++priv->stats.tx_carrier_errors;
+		    ++dev->stats.tx_carrier_errors;
 		/* 0x80 TxGU Transmit giveup - nine times and no luck
 		 * 0x40 TxNOAP No access point. Discarded packet.
 		 * 0x10 TxErr Transmit error. Always set when 
@@ -1163,7 +1153,7 @@ static irqreturn_t netwave_interrupt(int
 		/* Clear out TxGU, TxNOAP, TxErr and TxTrys */
 		wait_WOC(iobase);
 		writeb(0xdf & txStatus, ramBase+NETWAVE_EREG_TSER+4);
-		++priv->stats.tx_errors;
+		++dev->stats.tx_errors;
 	    }
 	    DEBUG(3, "New status is TSER %x ASR %x\n",
 		  readb(ramBase + NETWAVE_EREG_TSER),
@@ -1197,40 +1187,6 @@ static void netwave_watchdog(struct net_
     netif_wake_queue(dev);
 } /* netwave_watchdog */
 
-static struct net_device_stats *netwave_get_stats(struct net_device *dev) {
-    netwave_private *priv = netdev_priv(dev);
-
-    update_stats(dev);
-
-    DEBUG(2, "netwave: SPCQ %x SPU %x LIF %x ISPLQ %x MHS %x rxtx %x"
-	  " %x tx %x %x %x %x\n", 
-	  readb(priv->ramBase + NETWAVE_EREG_SPCQ),
-	  readb(priv->ramBase + NETWAVE_EREG_SPU),
-	  readb(priv->ramBase + NETWAVE_EREG_LIF),
-	  readb(priv->ramBase + NETWAVE_EREG_ISPLQ),
-	  readb(priv->ramBase + NETWAVE_EREG_MHS),
-	  readb(priv->ramBase + NETWAVE_EREG_EC + 0xe),
-	  readb(priv->ramBase + NETWAVE_EREG_EC + 0xf),
-	  readb(priv->ramBase + NETWAVE_EREG_EC + 0x18),
-	  readb(priv->ramBase + NETWAVE_EREG_EC + 0x19),
-	  readb(priv->ramBase + NETWAVE_EREG_EC + 0x1a),
-	  readb(priv->ramBase + NETWAVE_EREG_EC + 0x1b));
-
-    return &priv->stats;
-}
-
-static void update_stats(struct net_device *dev) {
-    //unsigned long flags;
-/*     netwave_private *priv = netdev_priv(dev); */
-
-    //spin_lock_irqsave(&priv->spinlock, flags);
-
-/*    priv->stats.rx_packets = readb(priv->ramBase + 0x18e); 
-    priv->stats.tx_packets = readb(priv->ramBase + 0x18f); */
-
-    //spin_unlock_irqrestore(&priv->spinlock, flags);
-}
-
 static int netwave_rx(struct net_device *dev)
 {
     netwave_private *priv = netdev_priv(dev);
@@ -1274,7 +1230,7 @@ static int netwave_rx(struct net_device 
 	if (skb == NULL) {
 	    DEBUG(1, "netwave_rx: Could not allocate an sk_buff of "
 		  "length %d\n", rcvLen);
-	    ++priv->stats.rx_dropped; 
+	    ++dev->stats.rx_dropped;
 	    /* Tell the adapter to skip the packet */
 	    wait_WOC(iobase);
 	    writeb(NETWAVE_CMD_SRP, ramBase + NETWAVE_EREG_CB + 0);
@@ -1307,8 +1263,8 @@ static int netwave_rx(struct net_device 
 	/* Queue packet for network layer */
 	netif_rx(skb);
 
-	priv->stats.rx_packets++;
-	priv->stats.rx_bytes += rcvLen;
+	dev->stats.rx_packets++;
+	dev->stats.rx_bytes += rcvLen;
 
 	/* Got the packet, tell the adapter to skip it */
 	wait_WOC(iobase);

-- 


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

* [PATCH 55/77] netwave: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (53 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:48   ` David Miller
  2009-03-21  5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
                   ` (21 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: netwave.patch --]
[-- Type: text/plain, Size: 1703 bytes --]

Also get rid of unneeded cast

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>


--- a/drivers/net/wireless/netwave_cs.c	2009-03-20 22:14:37.954403178 -0700
+++ b/drivers/net/wireless/netwave_cs.c	2009-03-20 22:15:57.752963633 -0700
@@ -355,6 +355,17 @@ static struct iw_statistics *netwave_get
     return &priv->iw_stats;
 }
 
+static const struct net_device_ops netwave_netdev_ops = {
+	.ndo_open	 	= netwave_open,
+	.ndo_stop		= netwave_close,
+	.ndo_start_xmit		= netwave_start_xmit,
+	.ndo_set_multicast_list = set_multicast_list,
+	.ndo_tx_timeout		= netwave_watchdog,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /*
  * Function netwave_attach (void)
  *
@@ -403,16 +414,12 @@ static int netwave_probe(struct pcmcia_d
     spin_lock_init(&priv->spinlock);
 
     /* Netwave specific entries in the device structure */
-    dev->hard_start_xmit = &netwave_start_xmit;
-    dev->set_multicast_list = &set_multicast_list;
+    dev->netdev_ops = &netwave_netdev_ops;
     /* wireless extensions */
-    dev->wireless_handlers = (struct iw_handler_def *)&netwave_handler_def;
+    dev->wireless_handlers = &netwave_handler_def;
 
-    dev->tx_timeout = &netwave_watchdog;
     dev->watchdog_timeo = TX_TIMEOUT;
 
-    dev->open = &netwave_open;
-    dev->stop = &netwave_close;
     link->irq.Instance = dev;
 
     return netwave_pcmcia_config( link);

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 56/77] strip: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (54 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 55/77] netwave: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` 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
                   ` (20 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: strip.patch --]
[-- Type: text/plain, Size: 1039 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

--- a/drivers/net/wireless/strip.c	2009-03-20 22:14:24.337964494 -0700
+++ b/drivers/net/wireless/strip.c	2009-03-20 22:16:04.157965087 -0700
@@ -2477,6 +2477,16 @@ static const struct header_ops strip_hea
 	.rebuild = strip_rebuild_header,
 };
 
+
+static const struct net_device_ops strip_netdev_ops = {
+	.ndo_open 	= strip_open_low,
+	.ndo_stop 	= strip_close_low,
+	.ndo_start_xmit = strip_xmit,
+	.ndo_set_mac_address = strip_set_mac_address,
+	.ndo_get_stats	= strip_get_stats,
+	.ndo_change_mtu = strip_change_mtu,
+};
+
 /*
  * This routine is called by DDI when the
  * (dynamically assigned) device is registered
@@ -2503,18 +2513,8 @@ static void strip_dev_setup(struct net_d
 	dev->dev_addr[0] = 0;
 	dev->addr_len = sizeof(MetricomAddress);
 
-	/*
-	 * Pointers to interface service routines.
-	 */
-
-	dev->open = strip_open_low;
-	dev->stop = strip_close_low;
-	dev->hard_start_xmit = strip_xmit;
-	dev->header_ops = &strip_header_ops;

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

* [PATCH 57/77] wavelan: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (55 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053716.884788530-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 58/77] wavelan: convert to net_device_ops Stephen Hemminger
                   ` (19 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, jt-sDzT885Ts8HQT0dZR+AlfA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: wavelan-stats.patch --]
[-- Type: text/plain, Size: 6585 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>


--- a/drivers/net/wireless/wavelan_cs.c	2009-03-20 16:59:43.049838921 -0700
+++ b/drivers/net/wireless/wavelan_cs.c	2009-03-20 17:03:26.637026504 -0700
@@ -1352,21 +1352,6 @@ wv_init_info(struct net_device *	dev)
  * or wireless extensions
  */
 
-/*------------------------------------------------------------------*/
-/*
- * Get the current ethernet statistics. This may be called with the
- * card open or closed.
- * Used when the user read /proc/net/dev
- */
-static en_stats	*
-wavelan_get_stats(struct net_device *	dev)
-{
-#ifdef DEBUG_IOCTL_TRACE
-  printk(KERN_DEBUG "%s: <>wavelan_get_stats()\n", dev->name);
-#endif
-
-  return(&((net_local *)netdev_priv(dev))->stats);
-}
 
 /*------------------------------------------------------------------*/
 /*
@@ -2817,7 +2802,7 @@ wv_packet_read(struct net_device *		dev,
       printk(KERN_INFO "%s: wv_packet_read(): could not alloc_skb(%d, GFP_ATOMIC)\n",
 	     dev->name, sksize);
 #endif
-      lp->stats.rx_dropped++;
+      dev->stats.rx_dropped++;
       /*
        * Not only do we want to return here, but we also need to drop the
        * packet on the floor to clear the interrupt.
@@ -2877,8 +2862,8 @@ wv_packet_read(struct net_device *		dev,
   netif_rx(skb);
 
   /* Keep stats up to date */
-  lp->stats.rx_packets++;
-  lp->stats.rx_bytes += sksize;
+  dev->stats.rx_packets++;
+  dev->stats.rx_bytes += sksize;
 
 #ifdef DEBUG_RX_TRACE
   printk(KERN_DEBUG "%s: <-wv_packet_read()\n", dev->name);
@@ -2980,13 +2965,13 @@ wv_packet_rcv(struct net_device *	dev)
       /* Check status */
       if((status & RX_RCV_OK) != RX_RCV_OK)
 	{
-	  lp->stats.rx_errors++;
+	  dev->stats.rx_errors++;
 	  if(status & RX_NO_SFD)
-	    lp->stats.rx_frame_errors++;
+	    dev->stats.rx_frame_errors++;
 	  if(status & RX_CRC_ERR)
-	    lp->stats.rx_crc_errors++;
+	    dev->stats.rx_crc_errors++;
 	  if(status & RX_OVRRUN)
-	    lp->stats.rx_over_errors++;
+	    dev->stats.rx_over_errors++;
 
 #ifdef DEBUG_RX_FAIL
 	  printk(KERN_DEBUG "%s: wv_packet_rcv(): packet not received ok, status = 0x%x\n",
@@ -3073,7 +3058,7 @@ wv_packet_write(struct net_device *	dev,
   dev->trans_start = jiffies;
 
   /* Keep stats up to date */
-  lp->stats.tx_bytes += length;
+  dev->stats.tx_bytes += length;
 
   spin_unlock_irqrestore(&lp->spinlock, flags);
 
@@ -4106,7 +4091,7 @@ wavelan_interrupt(int		irq,
 	      printk(KERN_INFO "%s: wv_interrupt(): receive buffer overflow\n",
 		     dev->name);
 #endif
-	      lp->stats.rx_over_errors++;
+	      dev->stats.rx_over_errors++;
 	      lp->overrunning = 1;
       	    }
 
@@ -4155,7 +4140,7 @@ wavelan_interrupt(int		irq,
 	  /* Check for possible errors */
 	  if((tx_status & TX_OK) != TX_OK)
 	    {
-	      lp->stats.tx_errors++;
+	      dev->stats.tx_errors++;
 
 	      if(tx_status & TX_FRTL)
 		{
@@ -4170,14 +4155,14 @@ wavelan_interrupt(int		irq,
 		  printk(KERN_DEBUG "%s: wv_interrupt(): DMA underrun\n",
 			 dev->name);
 #endif
-		  lp->stats.tx_aborted_errors++;
+		  dev->stats.tx_aborted_errors++;
 		}
 	      if(tx_status & TX_LOST_CTS)
 		{
 #ifdef DEBUG_TX_FAIL
 		  printk(KERN_DEBUG "%s: wv_interrupt(): no CTS\n", dev->name);
 #endif
-		  lp->stats.tx_carrier_errors++;
+		  dev->stats.tx_carrier_errors++;
 		}
 	      if(tx_status & TX_LOST_CRS)
 		{
@@ -4185,14 +4170,14 @@ wavelan_interrupt(int		irq,
 		  printk(KERN_DEBUG "%s: wv_interrupt(): no carrier\n",
 			 dev->name);
 #endif
-		  lp->stats.tx_carrier_errors++;
+		  dev->stats.tx_carrier_errors++;
 		}
 	      if(tx_status & TX_HRT_BEAT)
 		{
 #ifdef DEBUG_TX_FAIL
 		  printk(KERN_DEBUG "%s: wv_interrupt(): heart beat\n", dev->name);
 #endif
-		  lp->stats.tx_heartbeat_errors++;
+		  dev->stats.tx_heartbeat_errors++;
 		}
 	      if(tx_status & TX_DEFER)
 		{
@@ -4216,14 +4201,14 @@ wavelan_interrupt(int		irq,
 #endif
 		      if(!(tx_status & TX_NCOL_MASK))
 			{
-			  lp->stats.collisions += 0x10;
+			  dev->stats.collisions += 0x10;
 			}
 		    }
 		}
 	    }	/* if(!(tx_status & TX_OK)) */
 
-	  lp->stats.collisions += (tx_status & TX_NCOL_MASK);
-	  lp->stats.tx_packets++;
+	  dev->stats.collisions += (tx_status & TX_NCOL_MASK);
+	  dev->stats.tx_packets++;
 
 	  netif_wake_queue(dev);
 	  outb(CR0_INT_ACK | OP0_NOP, LCCR(base));	/* Acknowledge the interrupt */
@@ -4514,7 +4499,6 @@ wavelan_probe(struct pcmcia_device *p_de
   dev->open = &wavelan_open;
   dev->stop = &wavelan_close;
   dev->hard_start_xmit = &wavelan_packet_xmit;
-  dev->get_stats = &wavelan_get_stats;
   dev->set_multicast_list = &wavelan_set_multicast_list;
 #ifdef SET_MAC_ADDRESS
   dev->set_mac_address = &wavelan_set_mac_address;
--- a/drivers/net/wireless/wavelan_cs.p.h	2009-03-20 17:02:30.295089835 -0700
+++ b/drivers/net/wireless/wavelan_cs.p.h	2009-03-20 17:03:17.387027572 -0700
@@ -576,7 +576,6 @@ struct wavepoint_table
 /****************************** TYPES ******************************/
 
 /* Shortcuts */
-typedef struct net_device_stats	en_stats;
 typedef struct iw_statistics	iw_stats;
 typedef struct iw_quality	iw_qual;
 typedef struct iw_freq		iw_freq;
@@ -592,8 +591,6 @@ typedef u_char		mac_addr[WAVELAN_ADDR_SI
  * For each network interface, Linux keep data in two structure. "device"
  * keep the generic data (same format for everybody) and "net_local" keep
  * the additional specific data.
- * Note that some of this specific data is in fact generic (en_stats, for
- * example).
  */
 struct net_local
 {
@@ -601,7 +598,6 @@ struct net_local
   struct net_device *	dev;		/* Reverse link... */
   spinlock_t	spinlock;	/* Serialize access to the hardware (SMP) */
   struct pcmcia_device *	link;		/* pcmcia structure */
-  en_stats	stats;		/* Ethernet interface statistics */
   int		nresets;	/* Number of hw resets */
   u_char	configured;	/* If it is configured */
   u_char	reconfig_82593;	/* Need to reconfigure the controller */
@@ -694,8 +690,6 @@ static void
 static void
 	wv_init_info(struct net_device *);	/* display startup info */
 /* ------------------- IOCTL, STATS & RECONFIG ------------------- */
-static en_stats	*
-	wavelan_get_stats(struct net_device *);	/* Give stats /proc/net/dev */
 static iw_stats *
 	wavelan_get_wireless_stats(struct net_device *);
 /* ----------------------- PACKET RECEPTION ----------------------- */

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 58/77] wavelan: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (56 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 57/77] wavelan: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:47   ` David Miller
  2009-03-21  5:36 ` [PATCH 59/77] airo: " Stephen Hemminger
                   ` (18 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, jt; +Cc: netdev, linux-wireless

[-- Attachment #1: wavelan-ops.patch --]
[-- Type: text/plain, Size: 1445 bytes --]

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

--- a/drivers/net/wireless/wavelan_cs.c	2009-03-20 22:16:50.602027068 -0700
+++ b/drivers/net/wireless/wavelan_cs.c	2009-03-20 22:25:51.618651474 -0700
@@ -4436,6 +4436,19 @@ wavelan_close(struct net_device *	dev)
   return 0;
 }
 
+static const struct net_device_ops wavelan_netdev_ops = {
+	.ndo_open 		= wavelan_open,
+	.ndo_stop		= wavelan_close,
+	.ndo_start_xmit		= wavelan_packet_xmit,
+	.ndo_set_multicast_list = wavelan_set_multicast_list,
+#ifdef SET_MAC_ADDRESS
+	.ndo_set_mac_address	= wavelan_set_mac_address,
+#endif
+	.ndo_tx_timeout		= wavelan_watchdog,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /*------------------------------------------------------------------*/
 /*
  * wavelan_attach() creates an "instance" of the driver, allocating
@@ -4496,16 +4509,7 @@ wavelan_probe(struct pcmcia_device *p_de
   lp->dev = dev;
 
   /* wavelan NET3 callbacks */
-  dev->open = &wavelan_open;
-  dev->stop = &wavelan_close;
-  dev->hard_start_xmit = &wavelan_packet_xmit;
-  dev->set_multicast_list = &wavelan_set_multicast_list;
-#ifdef SET_MAC_ADDRESS
-  dev->set_mac_address = &wavelan_set_mac_address;
-#endif	/* SET_MAC_ADDRESS */
-
-  /* Set the watchdog timer */
-  dev->tx_timeout	= &wavelan_watchdog;
+  dev->netdev_ops = &wavelan_netdev_ops;
   dev->watchdog_timeo	= WATCHDOG_JIFFIES;
   SET_ETHTOOL_OPS(dev, &ops);
 

-- 


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

* [PATCH 59/77] airo: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (57 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 58/77] wavelan: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053717.048069302-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
                   ` (17 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-wireless

[-- Attachment #1: airo.patch --]
[-- Type: text/plain, Size: 3211 bytes --]

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;
 

-- 


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

* [PATCH 60/77] atmel: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (58 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 59/77] airo: " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053717.126155878-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 61/77] raylan: " Stephen Hemminger
                   ` (16 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: atmel.patch --]
[-- Type: text/plain, Size: 1620 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

--- a/drivers/net/wireless/atmel.c	2009-03-20 22:14:19.375839873 -0700
+++ b/drivers/net/wireless/atmel.c	2009-03-20 22:25:54.642841540 -0700
@@ -1495,6 +1495,17 @@ static int atmel_read_proc(char *page, c
 	return len;
 }
 
+static const struct net_device_ops atmel_netdev_ops = {
+	.ndo_open 		= atmel_open,
+	.ndo_stop		= atmel_close,
+	.ndo_change_mtu 	= atmel_change_mtu,
+	.ndo_set_mac_address 	= atmel_set_mac_address,
+	.ndo_start_xmit 	= start_tx,
+	.ndo_do_ioctl 		= atmel_ioctl,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
 				   const AtmelFWType fw_type,
 				   struct device *sys_dev,
@@ -1579,13 +1590,8 @@ struct net_device *init_atmel_card(unsig
 	priv->management_timer.function = atmel_management_timer;
 	priv->management_timer.data = (unsigned long) dev;
 
-	dev->open = atmel_open;
-	dev->stop = atmel_close;
-	dev->change_mtu = atmel_change_mtu;
-	dev->set_mac_address = atmel_set_mac_address;
-	dev->hard_start_xmit = start_tx;
-	dev->wireless_handlers = (struct iw_handler_def *)&atmel_handler_def;
-	dev->do_ioctl = atmel_ioctl;
+	dev->netdev_ops = &atmel_netdev_ops;
+	dev->wireless_handlers = &atmel_handler_def;
 	dev->irq = irq;
 	dev->base_addr = port;
 

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 61/77] raylan: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (59 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:53   ` David Miller
  2009-03-21  5:36 ` [PATCH 62/77] wl3501: convert to internal net_device_stats Stephen Hemminger
                   ` (15 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, coreythomas; +Cc: netdev, linux-wireless

[-- Attachment #1: ray_cs.patch --]
[-- Type: text/plain, Size: 1818 bytes --]

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

--- a/drivers/net/wireless/ray_cs.c	2009-03-20 22:14:19.352839145 -0700
+++ b/drivers/net/wireless/ray_cs.c	2009-03-20 22:25:55.863652814 -0700
@@ -298,6 +298,19 @@ static char hop_pattern_length[] = { 1,
 static char rcsid[] =
     "Raylink/WebGear wireless LAN - Corey <Thomas corey@world.std.com>";
 
+static const struct net_device_ops ray_netdev_ops = {
+	.ndo_init 		= ray_dev_init,
+	.ndo_open 		= ray_open,
+	.ndo_stop 		= ray_dev_close,
+	.ndo_start_xmit		= ray_dev_start_xmit,
+	.ndo_set_config		= ray_dev_config,
+	.ndo_get_stats		= ray_get_stats,
+	.ndo_set_multicast_list = set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /*=============================================================================
     ray_attach() creates an "instance" of the driver, allocating
     local data structures for one device.  The device is registered
@@ -347,9 +360,7 @@ static int ray_probe(struct pcmcia_devic
 	      p_dev, dev, local, &ray_interrupt);
 
 	/* Raylink entries in the device structure */
-	dev->hard_start_xmit = &ray_dev_start_xmit;
-	dev->set_config = &ray_dev_config;
-	dev->get_stats = &ray_get_stats;
+	dev->netdev_ops = &ray_netdev_ops;
 	SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
 	dev->wireless_handlers = &ray_handler_def;
 #ifdef WIRELESS_SPY
@@ -357,12 +368,8 @@ static int ray_probe(struct pcmcia_devic
 	dev->wireless_data = &local->wireless_data;
 #endif /* WIRELESS_SPY */
 
-	dev->set_multicast_list = &set_multicast_list;
 
 	DEBUG(2, "ray_cs ray_attach calling ether_setup.)\n");
-	dev->init = &ray_dev_init;
-	dev->open = &ray_open;
-	dev->stop = &ray_dev_close;
 	netif_stop_queue(dev);
 
 	init_timer(&local->timer);

-- 


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

* [PATCH 62/77] wl3501: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (60 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 61/77] raylan: " Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:53   ` David Miller
  2009-03-21  5:36 ` [PATCH 63/77] wl3501: convert to net_device_ops Stephen Hemminger
                   ` (14 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, acme; +Cc: netdev

[-- Attachment #1: wl3501-stats.patch --]
[-- Type: text/plain, Size: 2747 bytes --]

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

--- a/drivers/net/wireless/wl3501.h	2009-03-20 21:45:40.918964050 -0700
+++ b/drivers/net/wireless/wl3501.h	2009-03-20 22:25:57.380964659 -0700
@@ -606,7 +606,7 @@ struct wl3501_card {
 	u8				reg_domain;
 	u8				version[2];
 	struct wl3501_scan_confirm	bss_set[20];
-	struct net_device_stats 	stats;
+
 	struct iw_statistics		wstats;
 	struct iw_spy_data		spy_data;
 	struct iw_public_data		wireless_data;
--- a/drivers/net/wireless/wl3501_cs.c	2009-03-20 21:45:40.925964138 -0700
+++ b/drivers/net/wireless/wl3501_cs.c	2009-03-20 22:25:57.381964610 -0700
@@ -1000,7 +1000,7 @@ static inline void wl3501_md_ind_interru
 	if (!skb) {
 		printk(KERN_WARNING "%s: Can't alloc a sk_buff of size %d.\n",
 		       dev->name, pkt_len);
-		this->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 	} else {
 		skb->dev = dev;
 		skb_reserve(skb, 2); /* IP headers on 16 bytes boundaries */
@@ -1008,8 +1008,8 @@ static inline void wl3501_md_ind_interru
 		wl3501_receive(this, skb->data, pkt_len);
 		skb_put(skb, pkt_len);
 		skb->protocol	= eth_type_trans(skb, dev);
-		this->stats.rx_packets++;
-		this->stats.rx_bytes += skb->len;
+		dev->stats.rx_packets++;
+		dev->stats.rx_bytes += skb->len;
 		netif_rx(skb);
 	}
 }
@@ -1311,7 +1311,7 @@ out:
 static void wl3501_tx_timeout(struct net_device *dev)
 {
 	struct wl3501_card *this = netdev_priv(dev);
-	struct net_device_stats *stats = &this->stats;
+	struct net_device_stats *stats = &dev->stats;
 	unsigned long flags;
 	int rc;
 
@@ -1346,11 +1346,11 @@ static int wl3501_hard_start_xmit(struct
 	if (enabled)
 		wl3501_unblock_interrupt(this);
 	if (rc) {
-		++this->stats.tx_dropped;
+		++dev->stats.tx_dropped;
 		netif_stop_queue(dev);
 	} else {
-		++this->stats.tx_packets;
-		this->stats.tx_bytes += skb->len;
+		++dev->stats.tx_packets;
+		dev->stats.tx_bytes += skb->len;
 		kfree_skb(skb);
 
 		if (this->tx_buffer_cnt < 2)
@@ -1400,13 +1400,6 @@ fail:
 	goto out;
 }
 
-static struct net_device_stats *wl3501_get_stats(struct net_device *dev)
-{
-	struct wl3501_card *this = netdev_priv(dev);
-
-	return &this->stats;
-}
-
 static struct iw_statistics *wl3501_get_wireless_stats(struct net_device *dev)
 {
 	struct wl3501_card *this = netdev_priv(dev);
@@ -1922,12 +1915,14 @@ static int wl3501_probe(struct pcmcia_de
 	dev = alloc_etherdev(sizeof(struct wl3501_card));
 	if (!dev)
 		goto out_link;
+
+
 	dev->open		= wl3501_open;
 	dev->stop		= wl3501_close;
 	dev->hard_start_xmit	= wl3501_hard_start_xmit;
 	dev->tx_timeout		= wl3501_tx_timeout;
 	dev->watchdog_timeo	= 5 * HZ;
-	dev->get_stats		= wl3501_get_stats;
+
 	this = netdev_priv(dev);
 	this->wireless_data.spy_data = &this->spy_data;
 	this->p_dev = p_dev;

-- 


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

* [PATCH 63/77] wl3501: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (61 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 62/77] wl3501: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` 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
                   ` (13 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, acme; +Cc: netdev

[-- Attachment #1: wl3501-ops.patch --]
[-- Type: text/plain, Size: 1397 bytes --]

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

--- a/drivers/net/wireless/wl3501_cs.c	2009-03-20 22:25:57.381964610 -0700
+++ b/drivers/net/wireless/wl3501_cs.c	2009-03-20 22:25:59.099652050 -0700
@@ -1883,6 +1883,16 @@ static const struct iw_handler_def wl350
 	.get_wireless_stats = wl3501_get_wireless_stats,
 };
 
+static const struct net_device_ops wl3501_netdev_ops = {
+	.ndo_open		= wl3501_open,
+	.ndo_stop		= wl3501_close,
+	.ndo_start_xmit		= wl3501_hard_start_xmit,
+	.ndo_tx_timeout		= wl3501_tx_timeout,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /**
  * wl3501_attach - creates an "instance" of the driver
  *
@@ -1917,17 +1927,14 @@ static int wl3501_probe(struct pcmcia_de
 		goto out_link;
 
 
-	dev->open		= wl3501_open;
-	dev->stop		= wl3501_close;
-	dev->hard_start_xmit	= wl3501_hard_start_xmit;
-	dev->tx_timeout		= wl3501_tx_timeout;
+	dev->netdev_ops		= &wl3501_netdev_ops;
 	dev->watchdog_timeo	= 5 * HZ;
 
 	this = netdev_priv(dev);
 	this->wireless_data.spy_data = &this->spy_data;
 	this->p_dev = p_dev;
 	dev->wireless_data	= &this->wireless_data;
-	dev->wireless_handlers	= (struct iw_handler_def *)&wl3501_handler_def;
+	dev->wireless_handlers	= &wl3501_handler_def;
 	SET_ETHTOOL_OPS(dev, &ops);
 	netif_stop_queue(dev);
 	p_dev->priv = p_dev->irq.Instance = dev;

-- 


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

* [PATCH 64/77] zd1201: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (62 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 63/77] wl3501: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053717.440414565-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 65/77] zd1201: convert to net_device_ops Stephen Hemminger
                   ` (12 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, pe1rxq-QXXXXQs8DbXYtjvyW6yDsg
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: zd1201-stats.patch --]
[-- Type: text/plain, Size: 3217 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

--- a/drivers/net/wireless/zd1201.c	2009-03-20 21:45:40.866964137 -0700
+++ b/drivers/net/wireless/zd1201.c	2009-03-20 22:26:00.356902321 -0700
@@ -328,8 +328,8 @@ static void zd1201_usbrx(struct urb *urb
 			memcpy(skb_put(skb, 2), &data[datalen-24], 2);
 			memcpy(skb_put(skb, len), data, len);
 			skb->protocol = eth_type_trans(skb, zd->dev);
-			zd->stats.rx_packets++;
-			zd->stats.rx_bytes += skb->len;
+			zd->dev->stats.rx_packets++;
+			zd->dev->stats.rx_bytes += skb->len;
 			netif_rx(skb);
 			goto resubmit;
 		}
@@ -384,8 +384,8 @@ static void zd1201_usbrx(struct urb *urb
 			memcpy(skb_put(skb, len), data+8, len);
 		}
 		skb->protocol = eth_type_trans(skb, zd->dev);
-		zd->stats.rx_packets++;
-		zd->stats.rx_bytes += skb->len;
+		zd->dev->stats.rx_packets++;
+		zd->dev->stats.rx_bytes += skb->len;
 		netif_rx(skb);
 	}
 resubmit:
@@ -787,7 +787,7 @@ static int zd1201_hard_start_xmit(struct
 	struct urb *urb = zd->tx_urb;
 
 	if (!zd->mac_enabled || zd->monitor) {
-		zd->stats.tx_dropped++;
+		dev->stats.tx_dropped++;
 		kfree_skb(skb);
 		return 0;
 	}
@@ -817,12 +817,12 @@ static int zd1201_hard_start_xmit(struct
 
 	err = usb_submit_urb(zd->tx_urb, GFP_ATOMIC);
 	if (err) {
-		zd->stats.tx_errors++;
+		dev->stats.tx_errors++;
 		netif_start_queue(dev);
 		return err;
 	}
-	zd->stats.tx_packets++;
-	zd->stats.tx_bytes += skb->len;
+	dev->stats.tx_packets++;
+	dev->stats.tx_bytes += skb->len;
 	dev->trans_start = jiffies;
 	kfree_skb(skb);
 
@@ -838,7 +838,7 @@ static void zd1201_tx_timeout(struct net
 	dev_warn(&zd->usb->dev, "%s: TX timeout, shooting down urb\n",
 	    dev->name);
 	usb_unlink_urb(zd->tx_urb);
-	zd->stats.tx_errors++;
+	dev->stats.tx_errors++;
 	/* Restart the timeout to quiet the watchdog: */
 	dev->trans_start = jiffies;
 }
@@ -861,13 +861,6 @@ static int zd1201_set_mac_address(struct
 	return zd1201_mac_reset(zd);
 }
 
-static struct net_device_stats *zd1201_get_stats(struct net_device *dev)
-{
-	struct zd1201 *zd = netdev_priv(dev);
-
-	return &zd->stats;
-}
-
 static struct iw_statistics *zd1201_get_wireless_stats(struct net_device *dev)
 {
 	struct zd1201 *zd = netdev_priv(dev);
@@ -1778,9 +1771,7 @@ static int zd1201_probe(struct usb_inter
 
 	dev->open = zd1201_net_open;
 	dev->stop = zd1201_net_stop;
-	dev->get_stats = zd1201_get_stats;
-	dev->wireless_handlers =
-	    (struct iw_handler_def *)&zd1201_iw_handlers;
+	dev->wireless_handlers = &zd1201_iw_handlers;
 	dev->hard_start_xmit = zd1201_hard_start_xmit;
 	dev->watchdog_timeo = ZD1201_TX_TIMEOUT;
 	dev->tx_timeout = zd1201_tx_timeout;
--- a/drivers/net/wireless/zd1201.h	2009-03-20 21:45:40.859963944 -0700
+++ b/drivers/net/wireless/zd1201.h	2009-03-20 22:26:00.356902321 -0700
@@ -26,7 +26,6 @@ struct zd1201 {
 	struct usb_device	*usb;
 	int			removed;
 	struct net_device	*dev;
-	struct net_device_stats stats;
 	struct iw_statistics	iwstats;
 
 	int			endp_in;

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 65/77] zd1201: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (63 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 64/77] zd1201: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053717.514936473-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats Stephen Hemminger
                   ` (11 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, pe1rxq-QXXXXQs8DbXYtjvyW6yDsg
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: zd1201-ops.patch --]
[-- Type: text/plain, Size: 1669 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>


--- a/drivers/net/wireless/zd1201.c	2009-03-20 22:26:00.356902321 -0700
+++ b/drivers/net/wireless/zd1201.c	2009-03-20 22:26:01.715027053 -0700
@@ -1717,6 +1717,18 @@ static const struct iw_handler_def zd120
 	.get_wireless_stats	= zd1201_get_wireless_stats,
 };
 
+static const struct net_device_ops zd1201_netdev_ops = {
+	.ndo_open		= zd1201_net_open,
+	.ndo_stop		= zd1201_net_stop,
+	.ndo_start_xmit		= zd1201_hard_start_xmit,
+	.ndo_tx_timeout		= zd1201_tx_timeout,
+	.ndo_set_multicast_list = zd1201_set_multicast,
+	.ndo_set_mac_address	= zd1201_set_mac_address,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static int zd1201_probe(struct usb_interface *interface,
 			const struct usb_device_id *id)
 {
@@ -1769,14 +1781,9 @@ static int zd1201_probe(struct usb_inter
 	if (err)
 		goto err_start;
 
-	dev->open = zd1201_net_open;
-	dev->stop = zd1201_net_stop;
+	dev->netdev_ops = &zd1201_netdev_ops;
 	dev->wireless_handlers = &zd1201_iw_handlers;
-	dev->hard_start_xmit = zd1201_hard_start_xmit;
 	dev->watchdog_timeo = ZD1201_TX_TIMEOUT;
-	dev->tx_timeout = zd1201_tx_timeout;
-	dev->set_multicast_list = zd1201_set_multicast;
-	dev->set_mac_address = zd1201_set_mac_address;
 	strcpy(dev->name, "wlan%d");
 
 	err = zd1201_getconfig(zd, ZD1201_RID_CNFOWNMACADDR, 

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (64 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 65/77] zd1201: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053717.601771143-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 67/77] prism54: convert to net_device_ops Stephen Hemminger
                   ` (10 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, j
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: hwsim.patch --]
[-- Type: text/plain, Size: 1005 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>


--- a/drivers/net/wireless/mac80211_hwsim.c	2009-03-20 21:45:40.802964051 -0700
+++ b/drivers/net/wireless/mac80211_hwsim.c	2009-03-20 22:26:02.959027480 -0700
@@ -739,10 +739,16 @@ static struct device_driver mac80211_hws
 	.name = "mac80211_hwsim"
 };
 
+static const struct net_device_ops hwsim_netdev_ops = {
+	.ndo_start_xmit 	= hwsim_mon_xmit,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
 
 static void hwsim_mon_setup(struct net_device *dev)
 {
-	dev->hard_start_xmit = hwsim_mon_xmit;
+	dev->netdev_ops = &hwsim_netdev_ops;
 	dev->destructor = free_netdev;
 	ether_setup(dev);
 	dev->tx_queue_len = 0;

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 67/77] prism54: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (65 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053717.682860987-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 68/77] prism54: convert to internal net_device_stats Stephen Hemminger
                   ` (9 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, mcgrof-Re5JQEeQqe8AvxtiuMwx3w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: islpci.patch --]
[-- Type: text/plain, Size: 2324 bytes --]

Also, make ethtool_ops const as it should be, and get rid
of useless cast.

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>


--- a/drivers/net/wireless/prism54/islpci_dev.c	2009-03-20 21:45:40.782964097 -0700
+++ b/drivers/net/wireless/prism54/islpci_dev.c	2009-03-20 22:26:05.140779360 -0700
@@ -804,10 +804,23 @@ static void islpci_ethtool_get_drvinfo(s
 	strcpy(info->version, DRV_VERSION);
 }
 
-static struct ethtool_ops islpci_ethtool_ops = {
+static const struct ethtool_ops islpci_ethtool_ops = {
 	.get_drvinfo = islpci_ethtool_get_drvinfo,
 };
 
+static const struct net_device_ops islpci_netdev_ops = {
+	.ndo_open 		= islpci_open,
+	.ndo_stop		= islpci_close,
+	.ndo_get_stats		= islpci_statistics,
+	.ndo_do_ioctl		= prism54_ioctl,
+	.ndo_start_xmit		= islpci_eth_transmit,
+	.ndo_tx_timeout		= islpci_eth_tx_timeout,
+	.ndo_set_mac_address 	= prism54_set_mac_address,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 struct net_device *
 islpci_setup(struct pci_dev *pdev)
 {
@@ -827,25 +840,16 @@ islpci_setup(struct pci_dev *pdev)
 	ndev->irq = pdev->irq;
 
 	/* initialize the function pointers */
-	ndev->open = &islpci_open;
-	ndev->stop = &islpci_close;
-	ndev->get_stats = &islpci_statistics;
-	ndev->do_ioctl = &prism54_ioctl;
-	ndev->wireless_handlers =
-	    (struct iw_handler_def *) &prism54_handler_def;
+	ndev->netdev_ops = &islpci_netdev_ops;
+	ndev->wireless_handlers = &prism54_handler_def;
 	ndev->ethtool_ops = &islpci_ethtool_ops;
 
-	ndev->hard_start_xmit = &islpci_eth_transmit;
 	/* ndev->set_multicast_list = &islpci_set_multicast_list; */
 	ndev->addr_len = ETH_ALEN;
-	ndev->set_mac_address = &prism54_set_mac_address;
 	/* Get a non-zero dummy MAC address for nameif. Jean II */
 	memcpy(ndev->dev_addr, dummy_mac, 6);
 
-#ifdef HAVE_TX_TIMEOUT
 	ndev->watchdog_timeo = ISLPCI_TX_TIMEOUT;
-	ndev->tx_timeout = &islpci_eth_tx_timeout;
-#endif
 
 	/* allocate a private device structure to the network device  */
 	priv = netdev_priv(ndev);

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 68/77] prism54: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (66 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 67/77] prism54: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:53   ` David Miller
  2009-03-21  5:36 ` [PATCH 69/77] libertas: " Stephen Hemminger
                   ` (8 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, mcgrof-Re5JQEeQqe8AvxtiuMwx3w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: lscpi-stats.patch --]
[-- Type: text/plain, Size: 3881 bytes --]

Also, make ethtool_ops const as it should be, and get rid
of useless cast.

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

---
 drivers/net/wireless/prism54/islpci_dev.c |   14 --------------
 drivers/net/wireless/prism54/islpci_dev.h |    3 ---
 drivers/net/wireless/prism54/islpci_eth.c |   13 ++++++-------
 3 files changed, 6 insertions(+), 24 deletions(-)

--- a/drivers/net/wireless/prism54/islpci_dev.c	2009-03-20 18:37:36.129838594 -0700
+++ b/drivers/net/wireless/prism54/islpci_dev.c	2009-03-20 18:37:36.137839156 -0700
@@ -43,7 +43,6 @@
 
 static int prism54_bring_down(islpci_private *);
 static int islpci_alloc_memory(islpci_private *);
-static struct net_device_stats *islpci_statistics(struct net_device *);
 
 /* Temporary dummy MAC address to use until firmware is loaded.
  * The idea there is that some tools (such as nameif) may query
@@ -614,18 +613,6 @@ islpci_reset(islpci_private *priv, int r
 	return rc;
 }
 
-static struct net_device_stats *
-islpci_statistics(struct net_device *ndev)
-{
-	islpci_private *priv = netdev_priv(ndev);
-
-#if VERBOSE > SHOW_ERROR_MESSAGES
-	DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics\n");
-#endif
-
-	return &priv->statistics;
-}
-
 /******************************************************************************
     Network device configuration functions
 ******************************************************************************/
@@ -811,7 +798,6 @@ static const struct ethtool_ops islpci_e
 static const struct net_device_ops islpci_netdev_ops = {
 	.ndo_open 		= islpci_open,
 	.ndo_stop		= islpci_close,
-	.ndo_get_stats		= islpci_statistics,
 	.ndo_do_ioctl		= prism54_ioctl,
 	.ndo_start_xmit		= islpci_eth_transmit,
 	.ndo_tx_timeout		= islpci_eth_tx_timeout,
--- a/drivers/net/wireless/prism54/islpci_dev.h	2009-03-20 18:36:43.697901654 -0700
+++ b/drivers/net/wireless/prism54/islpci_dev.h	2009-03-20 18:37:36.137839156 -0700
@@ -158,9 +158,6 @@ typedef struct {
 	dma_addr_t pci_map_tx_address[ISL38XX_CB_TX_QSIZE];
 	dma_addr_t pci_map_rx_address[ISL38XX_CB_RX_QSIZE];
 
-	/* driver network interface members */
-	struct net_device_stats statistics;
-
 	/* wait for a reset interrupt */
 	wait_queue_head_t reset_done;
 
--- a/drivers/net/wireless/prism54/islpci_eth.c	2009-03-20 18:37:59.821964445 -0700
+++ b/drivers/net/wireless/prism54/islpci_eth.c	2009-03-20 18:38:59.740714710 -0700
@@ -231,8 +231,8 @@ islpci_eth_transmit(struct sk_buff *skb,
 
 	/* set the transmission time */
 	ndev->trans_start = jiffies;
-	priv->statistics.tx_packets++;
-	priv->statistics.tx_bytes += skb->len;
+	ndev->stats.tx_packets++;
+	ndev->stats.tx_bytes += skb->len;
 
 	/* trigger the device */
 	islpci_trigger(priv);
@@ -243,7 +243,7 @@ islpci_eth_transmit(struct sk_buff *skb,
 	return 0;
 
       drop_free:
-	priv->statistics.tx_dropped++;
+	ndev->stats.tx_dropped++;
 	spin_unlock_irqrestore(&priv->slock, flags);
 	dev_kfree_skb(skb);
 	return err;
@@ -408,8 +408,8 @@ islpci_eth_receive(islpci_private *priv)
 		skb->protocol = eth_type_trans(skb, ndev);
 	}
 	skb->ip_summed = CHECKSUM_NONE;
-	priv->statistics.rx_packets++;
-	priv->statistics.rx_bytes += size;
+	ndev->stats.rx_packets++;
+	ndev->stats.rx_bytes += size;
 
 	/* deliver the skb to the network layer */
 #ifdef ISLPCI_ETH_DEBUG
@@ -497,10 +497,9 @@ void
 islpci_eth_tx_timeout(struct net_device *ndev)
 {
 	islpci_private *priv = netdev_priv(ndev);
-	struct net_device_stats *statistics = &priv->statistics;
 
 	/* increment the transmit error counter */
-	statistics->tx_errors++;
+	ndev->stats.tx_errors++;
 
 	if (!priv->reset_task_pending) {
 		printk(KERN_WARNING

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 69/77] libertas: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (67 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 68/77] prism54: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` 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
                   ` (7 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, dcbw-H+wXaHxf7aLQT0dZR+AlfA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	libertas-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: libertas-stats.patch --]
[-- Type: text/plain, Size: 7182 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

---
 drivers/net/wireless/libertas/dev.h   |    1 -
 drivers/net/wireless/libertas/if_cs.c |    2 +-
 drivers/net/wireless/libertas/main.c  |   26 +-------------------------
 drivers/net/wireless/libertas/rx.c    |   18 +++++++++---------
 drivers/net/wireless/libertas/tx.c    |    8 ++++----
 drivers/net/wireless/libertas/wext.c  |    2 +-
 6 files changed, 16 insertions(+), 41 deletions(-)

--- a/drivers/net/wireless/libertas/dev.h	2009-03-20 21:45:40.710964143 -0700
+++ b/drivers/net/wireless/libertas/dev.h	2009-03-20 22:26:09.127902523 -0700
@@ -109,7 +109,6 @@ struct lbs_private {
 	void *card;
 	struct net_device *dev;
 
-	struct net_device_stats stats;
 	struct net_device *mesh_dev; /* Virtual device */
 	struct net_device *rtap_net_dev;
 
--- a/drivers/net/wireless/libertas/main.c	2009-03-20 21:45:40.701964238 -0700
+++ b/drivers/net/wireless/libertas/main.c	2009-03-20 22:26:09.128902494 -0700
@@ -582,20 +582,6 @@ void lbs_host_to_card_done(struct lbs_pr
 }
 EXPORT_SYMBOL_GPL(lbs_host_to_card_done);
 
-/**
- *  @brief This function returns the network statistics
- *
- *  @param dev     A pointer to struct lbs_private structure
- *  @return 	   A pointer to net_device_stats structure
- */
-static struct net_device_stats *lbs_get_stats(struct net_device *dev)
-{
-	struct lbs_private *priv = dev->ml_priv;
-
-	lbs_deb_enter(LBS_DEB_NET);
-	return &priv->stats;
-}
-
 static int lbs_set_mac_address(struct net_device *dev, void *addr)
 {
 	int ret = 0;
@@ -1201,7 +1187,7 @@ struct lbs_private *lbs_add_card(void *c
 	dev->stop = lbs_eth_stop;
 	dev->set_mac_address = lbs_set_mac_address;
 	dev->tx_timeout = lbs_tx_timeout;
-	dev->get_stats = lbs_get_stats;
+
 	dev->watchdog_timeo = 5 * HZ;
 	dev->ethtool_ops = &lbs_ethtool_ops;
 #ifdef	WIRELESS_EXT
@@ -1443,7 +1429,6 @@ static int lbs_add_mesh(struct lbs_priva
 	mesh_dev->open = lbs_dev_open;
 	mesh_dev->hard_start_xmit = lbs_hard_start_xmit;
 	mesh_dev->stop = lbs_mesh_stop;
-	mesh_dev->get_stats = lbs_get_stats;
 	mesh_dev->set_mac_address = lbs_set_mac_address;
 	mesh_dev->ethtool_ops = &lbs_ethtool_ops;
 	memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
@@ -1648,14 +1633,6 @@ static int lbs_rtap_hard_start_xmit(stru
 	return NETDEV_TX_BUSY;
 }
 
-static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev)
-{
-	struct lbs_private *priv = dev->ml_priv;
-	lbs_deb_enter(LBS_DEB_NET);
-	return &priv->stats;
-}
-
-
 static void lbs_remove_rtap(struct lbs_private *priv)
 {
 	lbs_deb_enter(LBS_DEB_MAIN);
@@ -1689,7 +1666,6 @@ static int lbs_add_rtap(struct lbs_priva
 	rtap_dev->type = ARPHRD_IEEE80211_RADIOTAP;
 	rtap_dev->open = lbs_rtap_open;
 	rtap_dev->stop = lbs_rtap_stop;
-	rtap_dev->get_stats = lbs_rtap_get_stats;
 	rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit;
 	rtap_dev->ml_priv = priv;
 	SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent);
--- a/drivers/net/wireless/libertas/if_cs.c	2009-03-20 21:45:40.718964266 -0700
+++ b/drivers/net/wireless/libertas/if_cs.c	2009-03-20 22:26:09.129902588 -0700
@@ -421,7 +421,7 @@ static struct sk_buff *if_cs_receive_dat
 	len = if_cs_read16(priv->card, IF_CS_READ_LEN);
 	if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
 		lbs_pr_err("card data buffer has invalid # of bytes (%d)\n", len);
-		priv->stats.rx_dropped++;
+		priv->dev->stats.rx_dropped++;
 		goto dat_err;
 	}
 
--- a/drivers/net/wireless/libertas/rx.c	2009-03-20 21:45:40.706964162 -0700
+++ b/drivers/net/wireless/libertas/rx.c	2009-03-20 22:26:09.129902588 -0700
@@ -168,7 +168,7 @@ int lbs_process_rxed_packet(struct lbs_p
 
 	if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) {
 		lbs_deb_rx("rx err: frame received with bad length\n");
-		priv->stats.rx_length_errors++;
+		dev->stats.rx_length_errors++;
 		ret = 0;
 		goto done;
 	}
@@ -179,7 +179,7 @@ int lbs_process_rxed_packet(struct lbs_p
 	if (!(p_rx_pd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) {
 		lbs_deb_rx("rx err: frame received with bad status\n");
 		lbs_pr_alert("rxpd not ok\n");
-		priv->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		ret = 0;
 		goto done;
 	}
@@ -243,8 +243,8 @@ int lbs_process_rxed_packet(struct lbs_p
 	lbs_compute_rssi(priv, p_rx_pd);
 
 	lbs_deb_rx("rx data: size of actual packet %d\n", skb->len);
-	priv->stats.rx_bytes += skb->len;
-	priv->stats.rx_packets++;
+	dev->stats.rx_bytes += skb->len;
+	dev->stats.rx_packets++;
 
 	skb->protocol = eth_type_trans(skb, dev);
 	if (in_interrupt())
@@ -311,7 +311,7 @@ static int process_rxed_802_11_packet(st
 	struct sk_buff *skb)
 {
 	int ret = 0;
-
+	struct net_device *dev = priv->dev;
 	struct rx80211packethdr *p_rx_pkt;
 	struct rxpd *prxpd;
 	struct rx_radiotap_hdr radiotap_hdr;
@@ -326,7 +326,7 @@ static int process_rxed_802_11_packet(st
 
 	if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) {
 		lbs_deb_rx("rx err: frame received with bad length\n");
-		priv->stats.rx_length_errors++;
+		dev->stats.rx_length_errors++;
 		ret = -EINVAL;
 		kfree_skb(skb);
 		goto done;
@@ -337,7 +337,7 @@ static int process_rxed_802_11_packet(st
 	 */
 	if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) {
 		//lbs_deb_rx("rx err: frame received with bad status\n");
-		priv->stats.rx_errors++;
+		dev->stats.rx_errors++;
 	}
 
 	lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
@@ -389,8 +389,8 @@ static int process_rxed_802_11_packet(st
 	lbs_compute_rssi(priv, prxpd);
 
 	lbs_deb_rx("rx data: size of actual packet %d\n", skb->len);
-	priv->stats.rx_bytes += skb->len;
-	priv->stats.rx_packets++;
+	dev->stats.rx_bytes += skb->len;
+	dev->stats.rx_packets++;
 
 	skb->protocol = eth_type_trans(skb, priv->rtap_net_dev);
 	netif_rx(skb);
--- a/drivers/net/wireless/libertas/tx.c	2009-03-20 21:45:40.691964095 -0700
+++ b/drivers/net/wireless/libertas/tx.c	2009-03-20 22:26:09.129902588 -0700
@@ -82,8 +82,8 @@ int lbs_hard_start_xmit(struct sk_buff *
 		       skb->len, MRVDRV_ETH_TX_PACKET_BUFFER_SIZE);
 		/* We'll never manage to send this one; drop it and return 'OK' */
 
-		priv->stats.tx_dropped++;
-		priv->stats.tx_errors++;
+		dev->stats.tx_dropped++;
+		dev->stats.tx_errors++;
 		goto free;
 	}
 
@@ -146,8 +146,8 @@ int lbs_hard_start_xmit(struct sk_buff *
 
 	lbs_deb_tx("%s lined up packet\n", __func__);
 
-	priv->stats.tx_packets++;
-	priv->stats.tx_bytes += skb->len;
+	dev->stats.tx_packets++;
+	dev->stats.tx_bytes += skb->len;
 
 	dev->trans_start = jiffies;
 
--- a/drivers/net/wireless/libertas/wext.c	2009-03-20 21:45:40.696716266 -0700
+++ b/drivers/net/wireless/libertas/wext.c	2009-03-20 22:26:09.130903884 -0700
@@ -830,7 +830,7 @@ static struct iw_statistics *lbs_get_wir
 	quality = rssi_qual;
 
 	/* Quality by TX errors */
-	priv->wstats.discard.retries = priv->stats.tx_errors;
+	priv->wstats.discard.retries = dev->stats.tx_errors;
 
 	memset(&log, 0, sizeof(log));
 	log.hdr.size = cpu_to_le16(sizeof(log));

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 70/77] libertas: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (68 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 69/77] libertas: " Stephen Hemminger
@ 2009-03-21  5:36 ` 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
                   ` (6 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, dcbw-H+wXaHxf7aLQT0dZR+AlfA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	libertas-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: libertas-ops.patch --]
[-- Type: text/plain, Size: 3690 bytes --]

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

--- a/drivers/net/wireless/libertas/main.c	2009-03-20 22:26:09.128902494 -0700
+++ b/drivers/net/wireless/libertas/main.c	2009-03-20 22:26:10.923651732 -0700
@@ -1148,6 +1148,17 @@ static void lbs_free_adapter(struct lbs_
 	lbs_deb_leave(LBS_DEB_MAIN);
 }
 
+static const struct net_device_ops lbs_netdev_ops = {
+	.ndo_open 		= lbs_dev_open,
+	.ndo_stop		= lbs_eth_stop,
+	.ndo_start_xmit		= lbs_hard_start_xmit,
+	.ndo_set_mac_address	= lbs_set_mac_address,
+	.ndo_tx_timeout 	= lbs_tx_timeout,
+	.ndo_set_multicast_list = lbs_set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /**
  * @brief This function adds the card. it will probe the
  * card, allocate the lbs_priv and initialize the device.
@@ -1182,19 +1193,13 @@ struct lbs_private *lbs_add_card(void *c
 	priv->infra_open = 0;
 
 	/* Setup the OS Interface to our functions */
-	dev->open = lbs_dev_open;
-	dev->hard_start_xmit = lbs_hard_start_xmit;
-	dev->stop = lbs_eth_stop;
-	dev->set_mac_address = lbs_set_mac_address;
-	dev->tx_timeout = lbs_tx_timeout;
-
+ 	dev->netdev_ops = &lbs_netdev_ops;
 	dev->watchdog_timeo = 5 * HZ;
 	dev->ethtool_ops = &lbs_ethtool_ops;
 #ifdef	WIRELESS_EXT
-	dev->wireless_handlers = (struct iw_handler_def *)&lbs_handler_def;
+	dev->wireless_handlers = &lbs_handler_def;
 #endif
 	dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
-	dev->set_multicast_list = lbs_set_multicast_list;
 
 	SET_NETDEV_DEV(dev, dmdev);
 
@@ -1404,6 +1409,14 @@ out:
 EXPORT_SYMBOL_GPL(lbs_stop_card);
 
 
+static const struct net_device_ops mesh_netdev_ops = {
+	.ndo_open		= lbs_dev_open,
+	.ndo_stop 		= lbs_mesh_stop,
+	.ndo_start_xmit		= lbs_hard_start_xmit,
+	.ndo_set_mac_address	= lbs_set_mac_address,
+	.ndo_set_multicast_list = lbs_set_multicast_list,
+};
+
 /**
  * @brief This function adds mshX interface
  *
@@ -1426,10 +1439,7 @@ static int lbs_add_mesh(struct lbs_priva
 	mesh_dev->ml_priv = priv;
 	priv->mesh_dev = mesh_dev;
 
-	mesh_dev->open = lbs_dev_open;
-	mesh_dev->hard_start_xmit = lbs_hard_start_xmit;
-	mesh_dev->stop = lbs_mesh_stop;
-	mesh_dev->set_mac_address = lbs_set_mac_address;
+	mesh_dev->netdev_ops = &mesh_netdev_ops;
 	mesh_dev->ethtool_ops = &lbs_ethtool_ops;
 	memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
 			sizeof(priv->dev->dev_addr));
@@ -1440,7 +1450,6 @@ static int lbs_add_mesh(struct lbs_priva
 	mesh_dev->wireless_handlers = (struct iw_handler_def *)&mesh_handler_def;
 #endif
 	mesh_dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
-	mesh_dev->set_multicast_list = lbs_set_multicast_list;
 	/* Register virtual mesh interface */
 	ret = register_netdev(mesh_dev);
 	if (ret) {
@@ -1645,6 +1654,12 @@ out:
 	lbs_deb_leave(LBS_DEB_MAIN);
 }
 
+static const struct net_device_ops rtap_netdev_ops = {
+	.ndo_open = lbs_rtap_open,
+	.ndo_stop = lbs_rtap_stop,
+	.ndo_start_xmit = lbs_rtap_hard_start_xmit,
+};
+
 static int lbs_add_rtap(struct lbs_private *priv)
 {
 	int ret = 0;
@@ -1664,9 +1679,7 @@ static int lbs_add_rtap(struct lbs_priva
 
 	memcpy(rtap_dev->dev_addr, priv->current_addr, ETH_ALEN);
 	rtap_dev->type = ARPHRD_IEEE80211_RADIOTAP;
-	rtap_dev->open = lbs_rtap_open;
-	rtap_dev->stop = lbs_rtap_stop;
-	rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit;
+	rtap_dev->netdev_ops = &rtap_netdev_ops;
 	rtap_dev->ml_priv = priv;
 	SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent);
 

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 71/77] ipw2x00: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (69 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 70/77] libertas: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` 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
                   ` (5 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, jkosina, dstreba; +Cc: netdev, linux-wireless

[-- Attachment #1: ipw-ieee-stats.patch --]
[-- Type: text/plain, Size: 16573 bytes --]

Replace struct in ieee with current net_device_stats, so no longer
need get_stats hook

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

---
 drivers/net/wireless/ipw2x00/ieee80211.h     |    1 
 drivers/net/wireless/ipw2x00/ipw2100.c       |   36 +++++++++---------
 drivers/net/wireless/ipw2x00/ipw2200.c       |   52 +++++++++------------------
 drivers/net/wireless/ipw2x00/libipw_module.c |   11 -----
 drivers/net/wireless/ipw2x00/libipw_rx.c     |   17 +++-----
 drivers/net/wireless/ipw2x00/libipw_tx.c     |    9 ++--
 6 files changed, 49 insertions(+), 77 deletions(-)

--- a/drivers/net/wireless/ipw2x00/ieee80211.h	2009-03-20 21:18:15.663026786 -0700
+++ b/drivers/net/wireless/ipw2x00/ieee80211.h	2009-03-20 21:24:54.874966147 -0700
@@ -786,7 +786,6 @@ struct ieee80211_device {
 	struct ieee80211_security sec;
 
 	/* Bookkeeping structures */
-	struct net_device_stats stats;
 	struct ieee80211_stats ieee_stats;
 
 	struct ieee80211_geo geo;
--- a/drivers/net/wireless/ipw2x00/libipw_module.c	2009-03-20 21:18:15.668026646 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_module.c	2009-03-20 21:24:54.887966521 -0700
@@ -139,13 +139,6 @@ static int ieee80211_change_mtu(struct n
 	return 0;
 }
 
-static struct net_device_stats *ieee80211_generic_get_stats(
-	struct net_device *dev)
-{
-	struct ieee80211_device *ieee = netdev_priv(dev);
-	return &ieee->stats;
-}
-
 struct net_device *alloc_ieee80211(int sizeof_priv)
 {
 	struct ieee80211_device *ieee;
@@ -163,10 +156,6 @@ struct net_device *alloc_ieee80211(int s
 	dev->hard_start_xmit = ieee80211_xmit;
 	dev->change_mtu = ieee80211_change_mtu;
 
-	/* Drivers are free to override this if the generic implementation
-	 * does not meet their needs. */
-	dev->get_stats = ieee80211_generic_get_stats;
-
 	ieee->dev = dev;
 
 	err = ieee80211_networks_allocate(ieee);
--- a/drivers/net/wireless/ipw2x00/libipw_rx.c	2009-03-20 21:18:15.677026752 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_rx.c	2009-03-20 21:25:06.478026388 -0700
@@ -335,7 +335,6 @@ int ieee80211_rx(struct ieee80211_device
 	struct ieee80211_hdr_4addr *hdr;
 	size_t hdrlen;
 	u16 fc, type, stype, sc;
-	struct net_device_stats *stats;
 	unsigned int frag;
 	u8 *payload;
 	u16 ethertype;
@@ -354,8 +353,6 @@ int ieee80211_rx(struct ieee80211_device
 	int can_be_decrypted = 0;
 
 	hdr = (struct ieee80211_hdr_4addr *)skb->data;
-	stats = &ieee->stats;
-
 	if (skb->len < 10) {
 		printk(KERN_INFO "%s: SKB length < 10\n", dev->name);
 		goto rx_dropped;
@@ -412,8 +409,8 @@ int ieee80211_rx(struct ieee80211_device
 #endif
 
 	if (ieee->iw_mode == IW_MODE_MONITOR) {
-		stats->rx_packets++;
-		stats->rx_bytes += skb->len;
+		dev->stats.rx_packets++;
+		dev->stats.rx_bytes += skb->len;
 		ieee80211_monitor_rx(ieee, skb, rx_stats);
 		return 1;
 	}
@@ -769,8 +766,8 @@ int ieee80211_rx(struct ieee80211_device
 	}
 #endif
 
-	stats->rx_packets++;
-	stats->rx_bytes += skb->len;
+	dev->stats.rx_packets++;
+	dev->stats.rx_bytes += skb->len;
 
 #ifdef NOT_YET
 	if (ieee->iw_mode == IW_MODE_MASTER && !wds && ieee->ap->bridge_packets) {
@@ -812,7 +809,7 @@ int ieee80211_rx(struct ieee80211_device
 			 * in our stats. */
 			IEEE80211_DEBUG_DROP
 			    ("RX: netif_rx dropped the packet\n");
-			stats->rx_dropped++;
+			dev->stats.rx_dropped++;
 		}
 	}
 
@@ -824,7 +821,7 @@ int ieee80211_rx(struct ieee80211_device
 	return 1;
 
       rx_dropped:
-	stats->rx_dropped++;
+	dev->stats.rx_dropped++;
 
 	/* Returning 0 indicates to caller that we have not handled the SKB--
 	 * so it is still allocated and can be used again by underlying
@@ -919,7 +916,7 @@ void ieee80211_rx_any(struct ieee80211_d
 
 drop_free:
 	dev_kfree_skb_irq(skb);
-	ieee->stats.rx_dropped++;
+	ieee->dev->stats.rx_dropped++;
 	return;
 }
 
--- a/drivers/net/wireless/ipw2x00/libipw_tx.c	2009-03-20 21:18:15.673026767 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_tx.c	2009-03-20 21:18:36.958902525 -0700
@@ -260,7 +260,6 @@ int ieee80211_xmit(struct sk_buff *skb, 
 	int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size,
 	    rts_required;
 	unsigned long flags;
-	struct net_device_stats *stats = &ieee->stats;
 	int encrypt, host_encrypt, host_encrypt_msdu, host_build_iv;
 	__be16 ether_type;
 	int bytes, fc, hdr_len;
@@ -306,7 +305,7 @@ int ieee80211_xmit(struct sk_buff *skb, 
 
 	if (!encrypt && ieee->ieee802_1x &&
 	    ieee->drop_unencrypted && ether_type != htons(ETH_P_PAE)) {
-		stats->tx_dropped++;
+		dev->stats.tx_dropped++;
 		goto success;
 	}
 
@@ -526,8 +525,8 @@ int ieee80211_xmit(struct sk_buff *skb, 
 	if (txb) {
 		int ret = (*ieee->hard_start_xmit) (txb, dev, priority);
 		if (ret == 0) {
-			stats->tx_packets++;
-			stats->tx_bytes += txb->payload_size;
+			dev->stats.tx_packets++;
+			dev->stats.tx_bytes += txb->payload_size;
 			return 0;
 		}
 
@@ -539,7 +538,7 @@ int ieee80211_xmit(struct sk_buff *skb, 
       failed:
 	spin_unlock_irqrestore(&ieee->lock, flags);
 	netif_stop_queue(dev);
-	stats->tx_errors++;
+	dev->stats.tx_errors++;
 	return 1;
 }
 
--- a/drivers/net/wireless/ipw2x00/ipw2100.c	2009-03-20 21:18:15.685026716 -0700
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c	2009-03-20 21:24:53.398965406 -0700
@@ -2391,13 +2391,14 @@ static void ipw2100_corruption_detected(
 #endif
 
 	priv->fatal_error = IPW2100_ERR_C3_CORRUPTION;
-	priv->ieee->stats.rx_errors++;
+	priv->net_dev->stats.rx_errors++;
 	schedule_reset(priv);
 }
 
 static void isr_rx(struct ipw2100_priv *priv, int i,
 			  struct ieee80211_rx_stats *stats)
 {
+	struct net_device *dev = priv->net_dev;
 	struct ipw2100_status *status = &priv->status_queue.drv[i];
 	struct ipw2100_rx_packet *packet = &priv->rx_buffers[i];
 
@@ -2406,14 +2407,14 @@ static void isr_rx(struct ipw2100_priv *
 	if (unlikely(status->frame_size > skb_tailroom(packet->skb))) {
 		IPW_DEBUG_INFO("%s: frame_size (%u) > skb_tailroom (%u)!"
 			       "  Dropping.\n",
-			       priv->net_dev->name,
+			       dev->name,
 			       status->frame_size, skb_tailroom(packet->skb));
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		return;
 	}
 
-	if (unlikely(!netif_running(priv->net_dev))) {
-		priv->ieee->stats.rx_errors++;
+	if (unlikely(!netif_running(dev))) {
+		dev->stats.rx_errors++;
 		priv->wstats.discard.misc++;
 		IPW_DEBUG_DROP("Dropping packet while interface is not up.\n");
 		return;
@@ -2443,10 +2444,10 @@ static void isr_rx(struct ipw2100_priv *
 	if (!ieee80211_rx(priv->ieee, packet->skb, stats)) {
 #ifdef IPW2100_RX_DEBUG
 		IPW_DEBUG_DROP("%s: Non consumed packet:\n",
-			       priv->net_dev->name);
+			       dev->name);
 		printk_buf(IPW_DL_DROP, packet_data, status->frame_size);
 #endif
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 
 		/* ieee80211_rx failed, so it didn't free the SKB */
 		dev_kfree_skb_any(packet->skb);
@@ -2457,7 +2458,7 @@ static void isr_rx(struct ipw2100_priv *
 	if (unlikely(ipw2100_alloc_skb(priv, packet))) {
 		printk(KERN_WARNING DRV_NAME ": "
 		       "%s: Unable to allocate SKB onto RBD ring - disabling "
-		       "adapter.\n", priv->net_dev->name);
+		       "adapter.\n", dev->name);
 		/* TODO: schedule adapter shutdown */
 		IPW_DEBUG_INFO("TODO: Shutdown adapter...\n");
 	}
@@ -2471,6 +2472,7 @@ static void isr_rx(struct ipw2100_priv *
 static void isr_rx_monitor(struct ipw2100_priv *priv, int i,
 		   struct ieee80211_rx_stats *stats)
 {
+	struct net_device *dev = priv->net_dev;
 	struct ipw2100_status *status = &priv->status_queue.drv[i];
 	struct ipw2100_rx_packet *packet = &priv->rx_buffers[i];
 
@@ -2488,15 +2490,15 @@ static void isr_rx_monitor(struct ipw210
 				sizeof(struct ipw_rt_hdr))) {
 		IPW_DEBUG_INFO("%s: frame_size (%u) > skb_tailroom (%u)!"
 			       "  Dropping.\n",
-			       priv->net_dev->name,
+			       dev->name,
 			       status->frame_size,
 			       skb_tailroom(packet->skb));
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		return;
 	}
 
-	if (unlikely(!netif_running(priv->net_dev))) {
-		priv->ieee->stats.rx_errors++;
+	if (unlikely(!netif_running(dev))) {
+		dev->stats.rx_errors++;
 		priv->wstats.discard.misc++;
 		IPW_DEBUG_DROP("Dropping packet while interface is not up.\n");
 		return;
@@ -2505,7 +2507,7 @@ static void isr_rx_monitor(struct ipw210
 	if (unlikely(priv->config & CFG_CRC_CHECK &&
 		     status->flags & IPW_STATUS_FLAG_CRC_ERROR)) {
 		IPW_DEBUG_RX("CRC error in packet.  Dropping.\n");
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		return;
 	}
 
@@ -2527,7 +2529,7 @@ static void isr_rx_monitor(struct ipw210
 	skb_put(packet->skb, status->frame_size + sizeof(struct ipw_rt_hdr));
 
 	if (!ieee80211_rx(priv->ieee, packet->skb, stats)) {
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 
 		/* ieee80211_rx failed, so it didn't free the SKB */
 		dev_kfree_skb_any(packet->skb);
@@ -2538,7 +2540,7 @@ static void isr_rx_monitor(struct ipw210
 	if (unlikely(ipw2100_alloc_skb(priv, packet))) {
 		IPW_DEBUG_WARNING(
 			"%s: Unable to allocate SKB onto RBD ring - disabling "
-			"adapter.\n", priv->net_dev->name);
+			"adapter.\n", dev->name);
 		/* TODO: schedule adapter shutdown */
 		IPW_DEBUG_INFO("TODO: Shutdown adapter...\n");
 	}
@@ -3340,7 +3342,7 @@ static int ipw2100_tx(struct ieee80211_t
 
 	if (!(priv->status & STATUS_ASSOCIATED)) {
 		IPW_DEBUG_INFO("Can not transmit when not connected.\n");
-		priv->ieee->stats.tx_carrier_errors++;
+		priv->net_dev->stats.tx_carrier_errors++;
 		netif_stop_queue(dev);
 		goto fail_unlock;
 	}
@@ -5836,7 +5838,7 @@ static void ipw2100_tx_timeout(struct ne
 {
 	struct ipw2100_priv *priv = ieee80211_priv(dev);
 
-	priv->ieee->stats.tx_errors++;
+	dev->stats.tx_errors++;
 
 #ifdef CONFIG_IPW2100_MONITOR
 	if (priv->ieee->iw_mode == IW_MODE_MONITOR)
--- a/drivers/net/wireless/ipw2x00/ipw2200.c	2009-03-20 21:18:15.659026583 -0700
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c	2009-03-20 21:24:29.757901661 -0700
@@ -7731,22 +7731,23 @@ static void ipw_handle_data_packet(struc
 				   struct ipw_rx_mem_buffer *rxb,
 				   struct ieee80211_rx_stats *stats)
 {
+	struct net_device *dev = priv->net_dev;
 	struct ieee80211_hdr_4addr *hdr;
 	struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data;
 
 	/* We received data from the HW, so stop the watchdog */
-	priv->net_dev->trans_start = jiffies;
+	dev->trans_start = jiffies;
 
 	/* We only process data packets if the
 	 * interface is open */
 	if (unlikely((le16_to_cpu(pkt->u.frame.length) + IPW_RX_FRAME_SIZE) >
 		     skb_tailroom(rxb->skb))) {
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		priv->wstats.discard.misc++;
 		IPW_DEBUG_DROP("Corruption detected! Oh no!\n");
 		return;
 	} else if (unlikely(!netif_running(priv->net_dev))) {
-		priv->ieee->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 		priv->wstats.discard.misc++;
 		IPW_DEBUG_DROP("Dropping packet while interface is not up.\n");
 		return;
@@ -7768,7 +7769,7 @@ static void ipw_handle_data_packet(struc
 		ipw_rebuild_decrypted_skb(priv, rxb->skb);
 
 	if (!ieee80211_rx(priv->ieee, rxb->skb, stats))
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 	else {			/* ieee80211_rx succeeded, so it now owns the SKB */
 		rxb->skb = NULL;
 		__ipw_led_activity_on(priv);
@@ -7780,6 +7781,7 @@ static void ipw_handle_data_packet_monit
 					   struct ipw_rx_mem_buffer *rxb,
 					   struct ieee80211_rx_stats *stats)
 {
+	struct net_device *dev = priv->net_dev;
 	struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data;
 	struct ipw_rx_frame *frame = &pkt->u.frame;
 
@@ -7797,18 +7799,18 @@ static void ipw_handle_data_packet_monit
 	short len = le16_to_cpu(pkt->u.frame.length);
 
 	/* We received data from the HW, so stop the watchdog */
-	priv->net_dev->trans_start = jiffies;
+	dev->trans_start = jiffies;
 
 	/* We only process data packets if the
 	 * interface is open */
 	if (unlikely((le16_to_cpu(pkt->u.frame.length) + IPW_RX_FRAME_SIZE) >
 		     skb_tailroom(rxb->skb))) {
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		priv->wstats.discard.misc++;
 		IPW_DEBUG_DROP("Corruption detected! Oh no!\n");
 		return;
 	} else if (unlikely(!netif_running(priv->net_dev))) {
-		priv->ieee->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 		priv->wstats.discard.misc++;
 		IPW_DEBUG_DROP("Dropping packet while interface is not up.\n");
 		return;
@@ -7818,7 +7820,7 @@ static void ipw_handle_data_packet_monit
 	 * that now */
 	if (len > IPW_RX_BUF_SIZE - sizeof(struct ipw_rt_hdr)) {
 		/* FIXME: Should alloc bigger skb instead */
-		priv->ieee->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 		priv->wstats.discard.misc++;
 		IPW_DEBUG_DROP("Dropping too large packet in monitor\n");
 		return;
@@ -7924,7 +7926,7 @@ static void ipw_handle_data_packet_monit
 	IPW_DEBUG_RX("Rx packet of %d bytes.\n", rxb->skb->len);
 
 	if (!ieee80211_rx(priv->ieee, rxb->skb, stats))
-		priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 	else {			/* ieee80211_rx succeeded, so it now owns the SKB */
 		rxb->skb = NULL;
 		/* no LED during capture */
@@ -7956,6 +7958,7 @@ static void ipw_handle_promiscuous_rx(st
 				      struct ipw_rx_mem_buffer *rxb,
 				      struct ieee80211_rx_stats *stats)
 {
+	struct net_device *dev = priv->prom_net_dev;
 	struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data;
 	struct ipw_rx_frame *frame = &pkt->u.frame;
 	struct ipw_rt_hdr *ipw_rt;
@@ -7978,17 +7981,17 @@ static void ipw_handle_promiscuous_rx(st
 		return;
 
 	/* We received data from the HW, so stop the watchdog */
-	priv->prom_net_dev->trans_start = jiffies;
+	dev->trans_start = jiffies;
 
 	if (unlikely((len + IPW_RX_FRAME_SIZE) > skb_tailroom(rxb->skb))) {
-		priv->prom_priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		IPW_DEBUG_DROP("Corruption detected! Oh no!\n");
 		return;
 	}
 
 	/* We only process data packets if the interface is open */
-	if (unlikely(!netif_running(priv->prom_net_dev))) {
-		priv->prom_priv->ieee->stats.rx_dropped++;
+	if (unlikely(!netif_running(dev))) {
+		dev->stats.rx_dropped++;
 		IPW_DEBUG_DROP("Dropping packet while interface is not up.\n");
 		return;
 	}
@@ -7997,7 +8000,7 @@ static void ipw_handle_promiscuous_rx(st
 	 * that now */
 	if (len > IPW_RX_BUF_SIZE - sizeof(struct ipw_rt_hdr)) {
 		/* FIXME: Should alloc bigger skb instead */
-		priv->prom_priv->ieee->stats.rx_dropped++;
+		dev->stats.rx_dropped++;
 		IPW_DEBUG_DROP("Dropping too large packet in monitor\n");
 		return;
 	}
@@ -8129,7 +8132,7 @@ static void ipw_handle_promiscuous_rx(st
 	IPW_DEBUG_RX("Rx packet of %d bytes.\n", skb->len);
 
 	if (!ieee80211_rx(priv->prom_priv->ieee, skb, stats)) {
-		priv->prom_priv->ieee->stats.rx_errors++;
+		dev->stats.rx_errors++;
 		dev_kfree_skb_any(skb);
 	}
 }
@@ -8413,7 +8416,7 @@ static void ipw_rx(struct ipw_priv *priv
 					IPW_DEBUG_DROP
 					    ("Received packet is too small. "
 					     "Dropping.\n");
-					priv->ieee->stats.rx_errors++;
+					priv->net_dev->stats.rx_errors++;
 					priv->wstats.discard.misc++;
 					break;
 				}
@@ -10484,15 +10487,6 @@ static int ipw_net_hard_start_xmit(struc
 	return ret;
 }
 
-static struct net_device_stats *ipw_net_get_stats(struct net_device *dev)
-{
-	struct ipw_priv *priv = ieee80211_priv(dev);
-
-	priv->ieee->stats.tx_packets = priv->tx_packets;
-	priv->ieee->stats.rx_packets = priv->rx_packets;
-	return &priv->ieee->stats;
-}
-
 static void ipw_net_set_multicast_list(struct net_device *dev)
 {
 
@@ -11535,12 +11529,6 @@ static int ipw_prom_hard_start_xmit(stru
 	return -EOPNOTSUPP;
 }
 
-static struct net_device_stats *ipw_prom_get_stats(struct net_device *dev)
-{
-	struct ipw_prom_priv *prom_priv = ieee80211_priv(dev);
-	return &prom_priv->ieee->stats;
-}
-
 static int ipw_prom_alloc(struct ipw_priv *priv)
 {
 	int rc = 0;
@@ -11562,7 +11550,6 @@ static int ipw_prom_alloc(struct ipw_pri
 	priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
 	priv->prom_net_dev->open = ipw_prom_open;
 	priv->prom_net_dev->stop = ipw_prom_stop;
-	priv->prom_net_dev->get_stats = ipw_prom_get_stats;
 	priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit;
 
 	priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
@@ -11695,7 +11682,6 @@ static int __devinit ipw_pci_probe(struc
 	net_dev->open = ipw_net_open;
 	net_dev->stop = ipw_net_stop;
 	net_dev->init = ipw_net_init;
-	net_dev->get_stats = ipw_net_get_stats;
 	net_dev->set_multicast_list = ipw_net_set_multicast_list;
 	net_dev->set_mac_address = ipw_net_set_mac_address;
 	priv->wireless_data.spy_data = &priv->ieee->spy_data;

-- 


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

* [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (70 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 71/77] ipw2x00: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` 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
                   ` (4 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, jkosina-AlSwsSmVLrQ, dstreba-AlSwsSmVLrQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: ipw-netdev.patch --]
[-- Type: text/plain, Size: 2379 bytes --]

Expose routines so drivers can hook. Only set ptrs in netdev
if using old compat code.

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

---
 drivers/net/wireless/ipw2x00/ieee80211.h     |    1 +
 drivers/net/wireless/ipw2x00/libipw_module.c |    5 ++++-
 drivers/net/wireless/ipw2x00/libipw_tx.c     |    1 +
 3 files changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/net/wireless/ipw2x00/libipw_module.c	2009-03-20 21:39:32.901088992 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_module.c	2009-03-20 21:39:34.508964994 -0700
@@ -131,13 +131,14 @@ static void ieee80211_networks_initializ
 			      &ieee->network_free_list);
 }
 
-static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
+int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
 {
 	if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN))
 		return -EINVAL;
 	dev->mtu = new_mtu;
 	return 0;
 }
+EXPORT_SYMBOL(ieee80211_change_mtu);
 
 struct net_device *alloc_ieee80211(int sizeof_priv)
 {
@@ -153,8 +154,10 @@ struct net_device *alloc_ieee80211(int s
 		goto failed;
 	}
 	ieee = netdev_priv(dev);
+#ifdef CONFIG_COMPAT_NET_DEV_OPS
 	dev->hard_start_xmit = ieee80211_xmit;
 	dev->change_mtu = ieee80211_change_mtu;
+#endif
 
 	ieee->dev = dev;
 
--- a/drivers/net/wireless/ipw2x00/ieee80211.h	2009-03-20 21:39:32.900089558 -0700
+++ b/drivers/net/wireless/ipw2x00/ieee80211.h	2009-03-20 21:39:34.509964918 -0700
@@ -1016,6 +1016,7 @@ static inline int ieee80211_is_cck_rate(
 /* ieee80211.c */
 extern void free_ieee80211(struct net_device *dev);
 extern struct net_device *alloc_ieee80211(int sizeof_priv);
+extern int ieee80211_change_mtu(struct net_device *dev, int new_mtu);
 
 extern void ieee80211_networks_age(struct ieee80211_device *ieee,
 				   unsigned long age_secs);
--- a/drivers/net/wireless/ipw2x00/libipw_tx.c	2009-03-20 21:39:59.063966304 -0700
+++ b/drivers/net/wireless/ipw2x00/libipw_tx.c	2009-03-20 21:40:37.667839502 -0700
@@ -541,5 +541,6 @@ int ieee80211_xmit(struct sk_buff *skb, 
 	dev->stats.tx_errors++;
 	return 1;
 }
+EXPORT_SYMBOL(ieee80211_xmit);
 
 EXPORT_SYMBOL(ieee80211_txb_free);

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 73/77] ipw2100: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (71 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053718.145743314-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
                   ` (3 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, jkosina, dstreba; +Cc: netdev, linux-wireless

[-- Attachment #1: ipw2100.patch --]
[-- Type: text/plain, Size: 1629 bytes --]

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


---
 drivers/net/wireless/ipw2x00/ipw2100.c       |   17 ++++++++++++-----
 drivers/net/wireless/ipw2x00/libipw_module.c |    2 ++
 2 files changed, 14 insertions(+), 5 deletions(-)

--- a/drivers/net/wireless/ipw2x00/ipw2100.c	2009-03-20 21:18:36.962783530 -0700
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c	2009-03-20 21:24:40.533652141 -0700
@@ -6008,6 +6008,17 @@ static void ipw2100_rf_kill(struct work_
 
 static void ipw2100_irq_tasklet(struct ipw2100_priv *priv);
 
+static const struct net_device_ops ipw2100_netdev_ops = {
+	.ndo_open		= ipw2100_open,
+	.ndo_stop		= ipw2100_close,
+	.ndo_start_xmit		= ieee80211_xmit,
+	.ndo_change_mtu		= ieee80211_change_mtu,
+	.ndo_init		= ipw2100_net_init,
+	.ndo_tx_timeout		= ipw2100_tx_timeout,
+	.ndo_set_mac_address	= ipw2100_set_address,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 /* Look into using netdev destructor to shutdown ieee80211? */
 
 static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
@@ -6032,15 +6043,11 @@ static struct net_device *ipw2100_alloc_
 	priv->ieee->perfect_rssi = -20;
 	priv->ieee->worst_rssi = -85;
 
-	dev->open = ipw2100_open;
-	dev->stop = ipw2100_close;
-	dev->init = ipw2100_net_init;
+	dev->netdev_ops = &ipw2100_netdev_ops;
 	dev->ethtool_ops = &ipw2100_ethtool_ops;
-	dev->tx_timeout = ipw2100_tx_timeout;
 	dev->wireless_handlers = &ipw2100_wx_handler_def;
 	priv->wireless_data.ieee80211 = priv->ieee;
 	dev->wireless_data = &priv->wireless_data;
-	dev->set_mac_address = ipw2100_set_address;
 	dev->watchdog_timeo = 3 * HZ;
 	dev->irq = 0;
 

-- 


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

* [PATCH 74/77] ipw2200: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (72 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 73/77] ipw2100: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
       [not found]   ` <20090321053718.224939952-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21  5:36 ` [PATCH 75/77] hostap: convert to internal net_device_stats Stephen Hemminger
                   ` (2 subsequent siblings)
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, jkosina, dstreba; +Cc: netdev, linux-wireless

[-- Attachment #1: ipw2200.patch --]
[-- Type: text/plain, Size: 2333 bytes --]

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

--- a/drivers/net/wireless/ipw2x00/ipw2200.c	2009-03-20 21:17:26.008902901 -0700
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c	2009-03-20 21:17:55.282652680 -0700
@@ -11529,6 +11529,15 @@ static int ipw_prom_hard_start_xmit(stru
 	return -EOPNOTSUPP;
 }
 
+static const struct net_device_ops ipw_prom_netdev_ops = {
+	.ndo_open 		= ipw_prom_open,
+	.ndo_stop		= ipw_prom_stop,
+	.ndo_start_xmit		= ipw_prom_hard_start_xmit,
+	.ndo_change_mtu		= ieee80211_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static int ipw_prom_alloc(struct ipw_priv *priv)
 {
 	int rc = 0;
@@ -11548,9 +11557,7 @@ static int ipw_prom_alloc(struct ipw_pri
 	memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
 
 	priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
-	priv->prom_net_dev->open = ipw_prom_open;
-	priv->prom_net_dev->stop = ipw_prom_stop;
-	priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit;
+	priv->prom_net_dev->netdev_ops = &ipw_prom_netdev_ops;
 
 	priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
 	SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev);
@@ -11578,6 +11585,17 @@ static void ipw_prom_free(struct ipw_pri
 
 #endif
 
+static const struct net_device_ops ipw_netdev_ops = {
+	.ndo_init		= ipw_net_init,
+	.ndo_open		= ipw_net_open,
+	.ndo_stop		= ipw_net_stop,
+	.ndo_set_multicast_list	= ipw_net_set_multicast_list,
+	.ndo_set_mac_address	= ipw_net_set_mac_address,
+	.ndo_start_xmit		= ieee80211_xmit,
+	.ndo_change_mtu		= ieee80211_change_mtu,
+	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_validate_addr	= eth_validate_addr,
+};
 
 static int __devinit ipw_pci_probe(struct pci_dev *pdev,
 				   const struct pci_device_id *ent)
@@ -11679,11 +11697,7 @@ static int __devinit ipw_pci_probe(struc
 	priv->ieee->perfect_rssi = -20;
 	priv->ieee->worst_rssi = -85;
 
-	net_dev->open = ipw_net_open;
-	net_dev->stop = ipw_net_stop;
-	net_dev->init = ipw_net_init;
-	net_dev->set_multicast_list = ipw_net_set_multicast_list;
-	net_dev->set_mac_address = ipw_net_set_mac_address;
+	net_dev->netdev_ops = &ipw_netdev_ops;
 	priv->wireless_data.spy_data = &priv->ieee->spy_data;
 	net_dev->wireless_data = &priv->wireless_data;
 	net_dev->wireless_handlers = &ipw_wx_handler_def;

-- 


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

* [PATCH 75/77] hostap: convert to internal net_device_stats
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (73 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
@ 2009-03-21  5:36 ` 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-21  5:36 ` [PATCH 77/77] netdev: expose net_device_ops compat as config option Stephen Hemminger
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, j
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: hostap-stats.patch --]
[-- Type: text/plain, Size: 6672 bytes --]

Use pre-existing net_device_stats in network_device struct.

Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

---
 drivers/net/wireless/hostap/hostap_80211_rx.c |   19 ++++++-------------
 drivers/net/wireless/hostap/hostap_ap.c       |    2 +-
 drivers/net/wireless/hostap/hostap_hw.c       |   12 ++++--------
 drivers/net/wireless/hostap/hostap_main.c     |   10 ----------
 drivers/net/wireless/hostap/hostap_wlan.h     |    1 -
 5 files changed, 11 insertions(+), 33 deletions(-)

--- a/drivers/net/wireless/hostap/hostap_80211_rx.c	2009-03-20 21:24:29.727901352 -0700
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c	2009-03-20 21:25:28.499088945 -0700
@@ -207,13 +207,11 @@ hdr->f.status = s; hdr->f.len = l; hdr->
 static void monitor_rx(struct net_device *dev, struct sk_buff *skb,
 		       struct hostap_80211_rx_status *rx_stats)
 {
-	struct net_device_stats *stats;
 	int len;
 
 	len = prism2_rx_80211(dev, skb, rx_stats, PRISM2_RX_MONITOR);
-	stats = hostap_get_stats(dev);
-	stats->rx_packets++;
-	stats->rx_bytes += len;
+	dev->stats.rx_packets++;
+	dev->stats.rx_bytes += len;
 }
 
 
@@ -724,7 +722,6 @@ void hostap_80211_rx(struct net_device *
 	size_t hdrlen;
 	u16 fc, type, stype, sc;
 	struct net_device *wds = NULL;
-	struct net_device_stats *stats;
 	unsigned int frag;
 	u8 *payload;
 	struct sk_buff *skb2 = NULL;
@@ -748,7 +745,6 @@ void hostap_80211_rx(struct net_device *
 	iface = netdev_priv(dev);
 
 	hdr = (struct ieee80211_hdr *) skb->data;
-	stats = hostap_get_stats(dev);
 
 	if (skb->len < 10)
 		goto rx_dropped;
@@ -866,10 +862,8 @@ void hostap_80211_rx(struct net_device *
 
 	if (hostap_rx_frame_wds(local, hdr, fc, &wds))
 		goto rx_dropped;
-	if (wds) {
+	if (wds)
 		skb->dev = dev = wds;
-		stats = hostap_get_stats(dev);
-	}
 
 	if (local->iw_mode == IW_MODE_MASTER && !wds &&
 	    (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
@@ -878,7 +872,6 @@ void hostap_80211_rx(struct net_device *
 	    memcmp(hdr->addr2, local->assoc_ap_addr, ETH_ALEN) == 0) {
 		/* Frame from BSSID of the AP for which we are a client */
 		skb->dev = dev = local->stadev;
-		stats = hostap_get_stats(dev);
 		from_assoc_ap = 1;
 	}
 
@@ -1069,8 +1062,8 @@ void hostap_80211_rx(struct net_device *
 		skb_trim(skb, skb->len - ETH_ALEN);
 	}
 
-	stats->rx_packets++;
-	stats->rx_bytes += skb->len;
+	dev->stats.rx_packets++;
+	dev->stats.rx_bytes += skb->len;
 
 	if (local->iw_mode == IW_MODE_MASTER && !wds &&
 	    local->ap->bridge_packets) {
@@ -1115,7 +1108,7 @@ void hostap_80211_rx(struct net_device *
  rx_dropped:
 	dev_kfree_skb(skb);
 
-	stats->rx_dropped++;
+	dev->stats.rx_dropped++;
 	goto rx_exit;
 }
 
--- a/drivers/net/wireless/hostap/hostap_hw.c	2009-03-20 21:24:29.735901559 -0700
+++ b/drivers/net/wireless/hostap/hostap_hw.c	2009-03-20 21:36:12.541714768 -0700
@@ -1682,7 +1682,7 @@ static int prism2_get_txfid_idx(local_in
 
 	PDEBUG(DEBUG_EXTRA2, "prism2_get_txfid_idx: no room in txfid buf: "
 	       "packet dropped\n");
-	local->stats.tx_dropped++;
+	local->dev->stats.tx_dropped++;
 
 	return -1;
 }
@@ -1787,11 +1787,9 @@ static int prism2_transmit(struct net_de
 		prism2_transmit_cb, (long) idx);
 
 	if (res) {
-		struct net_device_stats *stats;
 		printk(KERN_DEBUG "%s: prism2_transmit: CMDCODE_TRANSMIT "
 		       "failed (res=%d)\n", dev->name, res);
-		stats = hostap_get_stats(dev);
-		stats->tx_dropped++;
+		dev->stats.tx_dropped++;
 		netif_wake_queue(dev);
 		return -1;
 	}
@@ -1939,12 +1937,10 @@ static void prism2_rx(local_info_t *loca
 	struct net_device *dev = local->dev;
 	int res, rx_pending = 0;
 	u16 len, hdr_len, rxfid, status, macport;
-	struct net_device_stats *stats;
 	struct hfa384x_rx_frame rxdesc;
 	struct sk_buff *skb = NULL;
 
 	prism2_callback(local, PRISM2_CALLBACK_RX_START);
-	stats = hostap_get_stats(dev);
 
 	rxfid = prism2_read_fid_reg(dev, HFA384X_RXFID_OFF);
 #ifndef final_version
@@ -2031,7 +2027,7 @@ static void prism2_rx(local_info_t *loca
 	return;
 
  rx_dropped:
-	stats->rx_dropped++;
+	dev->stats.rx_dropped++;
 	if (skb)
 		dev_kfree_skb(skb);
 	goto rx_exit;
@@ -2335,7 +2331,7 @@ static void prism2_txexc(local_info_t *l
 	struct hfa384x_tx_frame txdesc;
 
 	show_dump = local->frame_dump & PRISM2_DUMP_TXEXC_HDR;
-	local->stats.tx_errors++;
+	dev->stats.tx_errors++;
 
 	res = hostap_tx_compl_read(local, 1, &txdesc, &payload);
 	HFA384X_OUTW(HFA384X_EV_TXEXC, HFA384X_EVACK_OFF);
--- a/drivers/net/wireless/hostap/hostap_main.c	2009-03-20 21:24:29.713901614 -0700
+++ b/drivers/net/wireless/hostap/hostap_main.c	2009-03-20 21:36:12.533715392 -0700
@@ -607,14 +607,6 @@ int hostap_80211_get_hdrlen(__le16 fc)
 }
 
 
-struct net_device_stats *hostap_get_stats(struct net_device *dev)
-{
-	struct hostap_interface *iface;
-	iface = netdev_priv(dev);
-	return &iface->stats;
-}
-
-
 static int prism2_close(struct net_device *dev)
 {
 	struct hostap_interface *iface;
@@ -832,7 +824,6 @@ void hostap_setup_dev(struct net_device 
 	ether_setup(dev);
 
 	/* kernel callbacks */
-	dev->get_stats = hostap_get_stats;
 	if (iface) {
 		/* Currently, we point to the proper spy_data only on
 		 * the main_dev. This could be fixed. Jean II */
@@ -1112,7 +1103,6 @@ EXPORT_SYMBOL(hostap_set_auth_algs);
 EXPORT_SYMBOL(hostap_dump_rx_header);
 EXPORT_SYMBOL(hostap_dump_tx_header);
 EXPORT_SYMBOL(hostap_80211_get_hdrlen);
-EXPORT_SYMBOL(hostap_get_stats);
 EXPORT_SYMBOL(hostap_setup_dev);
 EXPORT_SYMBOL(hostap_set_multicast_list_queue);
 EXPORT_SYMBOL(hostap_set_hostapd);
--- a/drivers/net/wireless/hostap/hostap_wlan.h	2009-03-20 21:24:29.722901695 -0700
+++ b/drivers/net/wireless/hostap/hostap_wlan.h	2009-03-20 21:25:28.500088879 -0700
@@ -684,7 +684,6 @@ struct local_info {
 	u16 channel_mask; /* mask of allowed channels */
 	u16 scan_channel_mask; /* mask of channels to be scanned */
 	struct comm_tallies_sums comm_tallies;
-	struct net_device_stats stats;
 	struct proc_dir_entry *proc;
 	int iw_mode; /* operating mode (IW_MODE_*) */
 	int pseudo_adhoc; /* 0: IW_MODE_ADHOC is real 802.11 compliant IBSS
--- a/drivers/net/wireless/hostap/hostap_ap.c	2009-03-20 21:24:29.718901717 -0700
+++ b/drivers/net/wireless/hostap/hostap_ap.c	2009-03-20 21:25:28.501088825 -0700
@@ -2262,7 +2262,7 @@ void hostap_rx(struct net_device *dev, s
 	if (skb->len < 16)
 		goto drop;
 
-	local->stats.rx_packets++;
+	dev->stats.rx_packets++;
 
 	hdr = (struct ieee80211_hdr *) skb->data;
 

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 76/77] hostap: convert to net_device_ops
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (74 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 75/77] hostap: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:57   ` David Miller
  2009-03-21  5:36 ` [PATCH 77/77] netdev: expose net_device_ops compat as config option Stephen Hemminger
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller, j; +Cc: netdev, linux-wireless

[-- Attachment #1: hostap-netdev.patch --]
[-- Type: text/plain, Size: 3596 bytes --]

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

---
 drivers/net/wireless/hostap/hostap_hw.c   |    1 
 drivers/net/wireless/hostap/hostap_main.c |   69 ++++++++++++++++++++++--------
 2 files changed, 52 insertions(+), 18 deletions(-)

--- a/drivers/net/wireless/hostap/hostap_main.c	2009-03-20 22:31:48.333901386 -0700
+++ b/drivers/net/wireless/hostap/hostap_main.c	2009-03-20 22:31:48.342902082 -0700
@@ -815,6 +815,46 @@ const struct header_ops hostap_80211_ops
 };
 EXPORT_SYMBOL(hostap_80211_ops);
 
+
+static const struct net_device_ops hostap_netdev_ops = {
+	.ndo_start_xmit		= hostap_data_start_xmit,
+
+	.ndo_open		= prism2_open,
+	.ndo_stop		= prism2_close,
+	.ndo_do_ioctl		= hostap_ioctl,
+	.ndo_set_mac_address	= prism2_set_mac_address,
+	.ndo_set_multicast_list = hostap_set_multicast_list,
+	.ndo_change_mtu 	= prism2_change_mtu,
+	.ndo_tx_timeout 	= prism2_tx_timeout,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
+static const struct net_device_ops hostap_mgmt_netdev_ops = {
+	.ndo_start_xmit		= hostap_mgmt_start_xmit,
+
+	.ndo_open		= prism2_open,
+	.ndo_stop		= prism2_close,
+	.ndo_do_ioctl		= hostap_ioctl,
+	.ndo_set_mac_address	= prism2_set_mac_address,
+	.ndo_set_multicast_list = hostap_set_multicast_list,
+	.ndo_change_mtu 	= prism2_change_mtu,
+	.ndo_tx_timeout 	= prism2_tx_timeout,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
+static const struct net_device_ops hostap_master_ops = {
+	.ndo_start_xmit 	= hostap_master_start_xmit,
+
+	.ndo_open		= prism2_open,
+	.ndo_stop		= prism2_close,
+	.ndo_do_ioctl		= hostap_ioctl,
+	.ndo_set_mac_address	= prism2_set_mac_address,
+	.ndo_set_multicast_list = hostap_set_multicast_list,
+	.ndo_change_mtu 	= prism2_change_mtu,
+	.ndo_tx_timeout 	= prism2_tx_timeout,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 void hostap_setup_dev(struct net_device *dev, local_info_t *local,
 		      int type)
 {
@@ -830,30 +870,25 @@ void hostap_setup_dev(struct net_device 
 		iface->wireless_data.spy_data = &iface->spy_data;
 		dev->wireless_data = &iface->wireless_data;
 	}
-	dev->wireless_handlers =
-		(struct iw_handler_def *) &hostap_iw_handler_def;
-	dev->do_ioctl = hostap_ioctl;
-	dev->open = prism2_open;
-	dev->stop = prism2_close;
-	dev->set_mac_address = prism2_set_mac_address;
-	dev->set_multicast_list = hostap_set_multicast_list;
-	dev->change_mtu = prism2_change_mtu;
-	dev->tx_timeout = prism2_tx_timeout;
+	dev->wireless_handlers = &hostap_iw_handler_def;
 	dev->watchdog_timeo = TX_TIMEOUT;
 
-	if (type == HOSTAP_INTERFACE_AP) {
-		dev->hard_start_xmit = hostap_mgmt_start_xmit;
+	switch(type) {
+	case HOSTAP_INTERFACE_AP:
+		dev->netdev_ops = &hostap_mgmt_netdev_ops;
 		dev->type = ARPHRD_IEEE80211;
 		dev->header_ops = &hostap_80211_ops;
-	} else {
-		dev->hard_start_xmit = hostap_data_start_xmit;
+		break;
+	case HOSTAP_INTERFACE_MASTER:
+		dev->tx_queue_len = 0;	/* use main radio device queue */
+		dev->netdev_ops = &hostap_master_ops;
+		break;
+	default:
+		dev->netdev_ops = &hostap_netdev_ops;
 	}
 
 	dev->mtu = local->mtu;
-	if (type != HOSTAP_INTERFACE_MASTER) {
-		/* use main radio device queue */
-		dev->tx_queue_len = 0;
-	}
+
 
 	SET_ETHTOOL_OPS(dev, &prism2_ethtool_ops);
 
--- a/drivers/net/wireless/hostap/hostap_hw.c	2009-03-20 22:31:48.333901386 -0700
+++ b/drivers/net/wireless/hostap/hostap_hw.c	2009-03-20 22:31:48.343901481 -0700
@@ -3222,7 +3222,6 @@ while (0)
 
 	hostap_setup_dev(dev, local, HOSTAP_INTERFACE_MASTER);
 
-	dev->hard_start_xmit = hostap_master_start_xmit;
 	dev->type = ARPHRD_IEEE80211;
 	dev->header_ops = &hostap_80211_ops;
 

-- 


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

* [PATCH 77/77] netdev: expose net_device_ops compat as config option
  2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
                   ` (75 preceding siblings ...)
  2009-03-21  5:36 ` [PATCH 76/77] hostap: convert to net_device_ops Stephen Hemminger
@ 2009-03-21  5:36 ` Stephen Hemminger
  2009-03-22  5:57   ` David Miller
  76 siblings, 1 reply; 197+ messages in thread
From: Stephen Hemminger @ 2009-03-21  5:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: net-compat-config.patch --]
[-- Type: text/plain, Size: 1352 bytes --]

Now that most network device drivers in (all but one in x86_64 allmodconfig)
support net_device_ops. Expose it as a configuration parameter. Still
need to address even older 32 bit drivers, and other arch before
compatiablity can be scheduled for removal in some future release.

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


---
 drivers/net/Kconfig |    9 +++++++++
 net/Kconfig         |    3 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

--- a/drivers/net/Kconfig	2009-03-20 12:36:10.802902100 -0700
+++ b/drivers/net/Kconfig	2009-03-20 12:43:55.464652333 -0700
@@ -26,6 +26,15 @@ menuconfig NETDEVICES
 # that for each of the symbols.
 if NETDEVICES
 
+config COMPAT_NET_DEV_OPS
+       default y
+       bool "Enable older network device API compatiablity"
+       ---help---
+          This option enables kernel compatiability with older network devices
+          that do not use net_device_ops interface.
+
+	  If unsure, say Y.
+
 config IFB
 	tristate "Intermediate Functional Block support"
 	depends on NET_CLS_ACT
--- a/net/Kconfig	2009-03-20 12:35:21.319088970 -0700
+++ b/net/Kconfig	2009-03-20 12:43:03.535841778 -0700
@@ -24,9 +24,6 @@ if NET
 
 menu "Networking options"
 
-config COMPAT_NET_DEV_OPS
-       def_bool y
-
 source "net/packet/Kconfig"
 source "net/unix/Kconfig"
 source "net/xfrm/Kconfig"

-- 


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

* Re: [PATCH 22/77] usbnet: convert catc device to net_device_ops
  2009-03-21  5:35 ` [PATCH 22/77] usbnet: convert catc device to net_device_ops Stephen Hemminger
@ 2009-03-21  9:01   ` David Brownell
  2009-03-21 13:02     ` Vojtech Pavlik
  2009-03-21 10:17   ` Jiri Pirko
  2009-03-22  2:45   ` David Miller
  2 siblings, 1 reply; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:01 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, Vojtech Pavlik

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

OK by me, but I cc'd Vojtech who was the last maintainer of this code.


> --- a/drivers/net/usb/catc.c	2009-03-20 12:10:10.851651580 -0700
> +++ b/drivers/net/usb/catc.c	2009-03-20 12:10:23.060839265 -0700
> @@ -743,6 +743,18 @@ static int catc_stop(struct net_device *
>  	return 0;
>  }
>  
> +static const struct net_device_ops catc_netdev_ops = {
> +	.ndo_open		= catc_open,
> +	.ndo_stop		= catc_stop,
> +	.ndo_start_xmit		= catc_start_xmit,
> +
> +	.ndo_tx_timeout		= catc_tx_timeout,
> +	.ndo_set_multicast_list = catc_set_multicast_list,
> +	.ndo_change_mtu		= eth_change_mtu,
> +	.ndo_set_mac_address 	= eth_mac_addr,
> +	.ndo_validate_addr	= eth_validate_addr,
> +};
> +
>  /*
>   * USB probe, disconnect.
>   */
> @@ -767,12 +779,8 @@ static int catc_probe(struct usb_interfa
>  
>  	catc = netdev_priv(netdev);
>  
> -	netdev->open = catc_open;
> -	netdev->hard_start_xmit = catc_hard_start_xmit;
> -	netdev->stop = catc_stop;
> -	netdev->tx_timeout = catc_tx_timeout;
> +	netdev->netdev_ops = &catc_netdev_ops;
>  	netdev->watchdog_timeo = TX_TIMEOUT;
> -	netdev->set_multicast_list = catc_set_multicast_list;
>  	SET_ETHTOOL_OPS(netdev, &ops);
>  
>  	catc->usbdev = usbdev;
> 
> -- 
> 
> 



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

* Re: [PATCH 23/77] usbnet: convert to internal net_device stats
  2009-03-21  5:35 ` [PATCH 23/77] usbnet: convert to internal net_device stats Stephen Hemminger
@ 2009-03-21  9:01   ` David Brownell
  2009-03-21 13:02     ` Vojtech Pavlik
  2009-03-22  2:45   ` David Miller
  1 sibling, 1 reply; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:01 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, Vojtech Pavlik

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

... ditto ...

> --- a/drivers/net/usb/rtl8150.c	2009-03-20 12:11:35.825901868 -0700
> +++ b/drivers/net/usb/rtl8150.c	2009-03-20 12:12:47.085715442 -0700
> @@ -155,7 +155,6 @@ struct rtl8150 {
>  	unsigned long flags;
>  	struct usb_device *udev;
>  	struct tasklet_struct tl;
> -	struct net_device_stats stats;
>  	struct net_device *netdev;
>  	struct urb *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
>  	struct sk_buff *tx_skb, *rx_skb;
> @@ -463,8 +462,8 @@ static void read_bulk_callback(struct ur
>  	skb_put(dev->rx_skb, pkt_len);
>  	dev->rx_skb->protocol = eth_type_trans(dev->rx_skb, netdev);
>  	netif_rx(dev->rx_skb);
> -	dev->stats.rx_packets++;
> -	dev->stats.rx_bytes += pkt_len;
> +	netdev->stats.rx_packets++;
> +	netdev->stats.rx_bytes += pkt_len;
>  
>  	spin_lock(&dev->rx_pool_lock);
>  	skb = pull_skb(dev);
> @@ -573,13 +572,13 @@ static void intr_callback(struct urb *ur
>  
>  	d = urb->transfer_buffer;
>  	if (d[0] & TSR_ERRORS) {
> -		dev->stats.tx_errors++;
> +		dev->netdev->stats.tx_errors++;
>  		if (d[INT_TSR] & (TSR_ECOL | TSR_JBR))
> -			dev->stats.tx_aborted_errors++;
> +			dev->netdev->stats.tx_aborted_errors++;
>  		if (d[INT_TSR] & TSR_LCOL)
> -			dev->stats.tx_window_errors++;
> +			dev->netdev->stats.tx_window_errors++;
>  		if (d[INT_TSR] & TSR_LOSS_CRS)
> -			dev->stats.tx_carrier_errors++;
> +			dev->netdev->stats.tx_carrier_errors++;
>  	}
>  	/* Report link status changes to the network stack */
>  	if ((d[INT_MSR] & MSR_LINK) == 0) {
> @@ -697,17 +696,12 @@ static void disable_net_traffic(rtl8150_
>  	set_registers(dev, CR, 1, &cr);
>  }
>  
> -static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev)
> -{
> -	return &((rtl8150_t *)netdev_priv(dev))->stats;
> -}
> -
>  static void rtl8150_tx_timeout(struct net_device *netdev)
>  {
>  	rtl8150_t *dev = netdev_priv(netdev);
>  	dev_warn(&netdev->dev, "Tx timeout.\n");
>  	usb_unlink_urb(dev->tx_urb);
> -	dev->stats.tx_errors++;
> +	netdev->stats.tx_errors++;
>  }
>  
>  static void rtl8150_set_multicast(struct net_device *netdev)
> @@ -747,12 +741,12 @@ static int rtl8150_start_xmit(struct sk_
>  			netif_device_detach(dev->netdev);
>  		else {
>  			dev_warn(&netdev->dev, "failed tx_urb %d\n", res);
> -			dev->stats.tx_errors++;
> +			netdev->stats.tx_errors++;
>  			netif_start_queue(netdev);
>  		}
>  	} else {
> -		dev->stats.tx_packets++;
> -		dev->stats.tx_bytes += skb->len;
> +		netdev->stats.tx_packets++;
> +		netdev->stats.tx_bytes += skb->len;
>  		netdev->trans_start = jiffies;
>  	}
>  
> @@ -931,7 +925,7 @@ static int rtl8150_probe(struct usb_inte
>  	netdev->hard_start_xmit = rtl8150_start_xmit;
>  	netdev->set_multicast_list = rtl8150_set_multicast;
>  	netdev->set_mac_address = rtl8150_set_mac_address;
> -	netdev->get_stats = rtl8150_netdev_stats;
> +
>  	SET_ETHTOOL_OPS(netdev, &ops);
>  	dev->intr_interval = 100;	/* 100ms */
>  
> 
> -- 
> 
> 



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

* Re: [PATCH 24/77] usbnet: convert rtl driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 24/77] usbnet: convert rtl driver to net_device_ops Stephen Hemminger
@ 2009-03-21  9:03   ` David Brownell
  2009-03-23  9:17     ` Petko Manolov
  2009-03-22  2:45   ` David Miller
  1 sibling, 1 reply; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, Petko Manolov

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc'd the maintainer ... by the way, note that
"usbnet" != "everything in drivers/net/usb" ...


> --- a/drivers/net/usb/rtl8150.c	2009-03-20 12:12:47.085715442 -0700
> +++ b/drivers/net/usb/rtl8150.c	2009-03-20 12:13:41.757841762 -0700
> @@ -891,6 +891,19 @@ static int rtl8150_ioctl(struct net_devi
>  	return res;
>  }
>  
> +static const struct net_device_ops rtl8150_netdev_ops = {
> +	.ndo_open		= rtl8150_open,
> +	.ndo_stop		= rtl8150_close,
> +	.ndo_do_ioctl		= rtl8150_ioctl,
> +	.ndo_start_xmit		= rtl8150_start_xmit,
> +	.ndo_tx_timeout 	= rtl8150_tx_timeout,
> +	.ndo_set_multicast_list = rtl8150_set_multicast,
> +	.ndo_set_mac_address	= rtl8150_set_mac_address,
> +
> +	.ndo_change_mtu		= eth_change_mtu,
> +	.ndo_validate_addr	= eth_validate_addr,
> +};
> +
>  static int rtl8150_probe(struct usb_interface *intf,
>  			 const struct usb_device_id *id)
>  {
> @@ -917,15 +930,8 @@ static int rtl8150_probe(struct usb_inte
>  	
>  	dev->udev = udev;
>  	dev->netdev = netdev;
> -	netdev->open = rtl8150_open;
> -	netdev->stop = rtl8150_close;
> -	netdev->do_ioctl = rtl8150_ioctl;
> +	netdev->netdev_ops = &rtl8150_netdev_ops;
>  	netdev->watchdog_timeo = RTL8150_TX_TIMEOUT;
> -	netdev->tx_timeout = rtl8150_tx_timeout;
> -	netdev->hard_start_xmit = rtl8150_start_xmit;
> -	netdev->set_multicast_list = rtl8150_set_multicast;
> -	netdev->set_mac_address = rtl8150_set_mac_address;
> -
>  	SET_ETHTOOL_OPS(netdev, &ops);
>  	dev->intr_interval = 100;	/* 100ms */
>  
> 
> -- 
> 
> 



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

* Re: [PATCH 25/77] usbnet: convert hso driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 25/77] usbnet: convert hso " Stephen Hemminger
@ 2009-03-21  9:08   ` David Brownell
  2009-03-22  2:45   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:08 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, d.barow

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc'd the driver's maintainer


> --- a/drivers/net/usb/hso.c	2009-03-09 08:23:41.851308905 -0700
> +++ b/drivers/net/usb/hso.c	2009-03-20 08:35:11.089026883 -0700
> @@ -2428,6 +2428,13 @@ static void hso_free_net_device(struct h
>  	kfree(hso_dev);
>  }
>  
> +static const struct net_device_ops hso_netdev_ops = {
> +	.ndo_open	= hso_net_open,
> +	.ndo_stop	= hso_net_close,
> +	.ndo_start_xmit = hso_net_start_xmit,
> +	.ndo_tx_timeout = hso_net_tx_timeout,
> +};
> +
>  /* initialize the network interface */
>  static void hso_net_init(struct net_device *net)
>  {
> @@ -2436,10 +2443,7 @@ static void hso_net_init(struct net_devi
>  	D1("sizeof hso_net is %d", (int)sizeof(*hso_net));
>  
>  	/* fill in the other fields */
> -	net->open = hso_net_open;
> -	net->stop = hso_net_close;
> -	net->hard_start_xmit = hso_net_start_xmit;
> -	net->tx_timeout = hso_net_tx_timeout;
> +	net->netdev_ops = &hso_netdev_ops;
>  	net->watchdog_timeo = HSO_NET_TX_TIMEOUT;
>  	net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
>  	net->type = ARPHRD_NONE;
> 
> -- 
> 
> 



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

* Re: [PATCH 26/77] usbnet: convert to internal net_device_stats
  2009-03-21  5:35 ` [PATCH 26/77] usbnet: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21  9:09   ` David Brownell
  2009-03-22  2:46   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:09 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Friday 20 March 2009, Stephen Hemminger wrote:
> Default handler for net_device_stats already does same thing.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>



> 
> 
> --- a/drivers/net/usb/usbnet.c	2009-03-20 09:38:00.950964064 -0700
> +++ b/drivers/net/usb/usbnet.c	2009-03-20 09:38:46.383715245 -0700
> @@ -249,14 +249,6 @@ static int usbnet_change_mtu (struct net
>  
>  /*-------------------------------------------------------------------------*/
>  
> -static struct net_device_stats *usbnet_get_stats (struct net_device *net)
> -{
> -	struct usbnet	*dev = netdev_priv(net);
> -	return &dev->stats;
> -}
> -
> -/*-------------------------------------------------------------------------*/
> -
>  /* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from
>   * completion callbacks.  2.5 should have fixed those bugs...
>   */
> @@ -1180,7 +1172,6 @@ usbnet_probe (struct usb_interface *udev
>  #endif
>  
>  	net->change_mtu = usbnet_change_mtu;
> -	net->get_stats = usbnet_get_stats;
>  	net->hard_start_xmit = usbnet_start_xmit;
>  	net->open = usbnet_open;
>  	net->stop = usbnet_stop;
> 
> -- 
> 
> 



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

* Re: [PATCH 27/77] usbnet: support net_device_ops
  2009-03-21  5:35 ` [PATCH 27/77] usbnet: support net_device_ops Stephen Hemminger
@ 2009-03-21  9:11   ` David Brownell
  2009-03-22  2:46   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:11 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Friday 20 March 2009, Stephen Hemminger wrote:
> Use net_device_ops for usbnet device, and export for use
> by other derived drivers.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>


> ---
>  drivers/net/usb/usbnet.c   |   31 +++++++++++++++++++++++--------
>  include/linux/usb/usbnet.h |    5 +++++
>  2 files changed, 28 insertions(+), 8 deletions(-)
> 
> --- a/drivers/net/usb/usbnet.c	2009-03-20 09:39:11.001839596 -0700
> +++ b/drivers/net/usb/usbnet.c	2009-03-20 09:57:37.178776906 -0700
> @@ -223,7 +223,7 @@ EXPORT_SYMBOL_GPL(usbnet_skb_return);
>   *
>   *-------------------------------------------------------------------------*/
>  
> -static int usbnet_change_mtu (struct net_device *net, int new_mtu)
> +int usbnet_change_mtu (struct net_device *net, int new_mtu)
>  {
>  	struct usbnet	*dev = netdev_priv(net);
>  	int		ll_mtu = new_mtu + net->hard_header_len;
> @@ -246,6 +246,7 @@ static int usbnet_change_mtu (struct net
>  
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(usbnet_change_mtu);
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -540,7 +541,7 @@ EXPORT_SYMBOL_GPL(usbnet_unlink_rx_urbs)
>  
>  // precondition: never called in_interrupt
>  
> -static int usbnet_stop (struct net_device *net)
> +int usbnet_stop (struct net_device *net)
>  {
>  	struct usbnet		*dev = netdev_priv(net);
>  	int			temp;
> @@ -584,6 +585,7 @@ static int usbnet_stop (struct net_devic
>  
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(usbnet_stop);
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -591,7 +593,7 @@ static int usbnet_stop (struct net_devic
>  
>  // precondition: never called in_interrupt
>  
> -static int usbnet_open (struct net_device *net)
> +int usbnet_open (struct net_device *net)
>  {
>  	struct usbnet		*dev = netdev_priv(net);
>  	int			retval;
> @@ -666,6 +668,7 @@ done:
>  done_nopm:
>  	return retval;
>  }
> +EXPORT_SYMBOL_GPL(usbnet_open);
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -900,7 +903,7 @@ static void tx_complete (struct urb *urb
>  
>  /*-------------------------------------------------------------------------*/
>  
> -static void usbnet_tx_timeout (struct net_device *net)
> +void usbnet_tx_timeout (struct net_device *net)
>  {
>  	struct usbnet		*dev = netdev_priv(net);
>  
> @@ -909,10 +912,11 @@ static void usbnet_tx_timeout (struct ne
>  
>  	// FIXME: device recovery -- reset?
>  }
> +EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
>  
>  /*-------------------------------------------------------------------------*/
>  
> -static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
> +int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
>  {
>  	struct usbnet		*dev = netdev_priv(net);
>  	int			length;
> @@ -995,7 +999,7 @@ drop:
>  	}
>  	return retval;
>  }
> -
> +EXPORT_SYMBOL_GPL(usbnet_start_xmit);
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -1102,6 +1106,15 @@ void usbnet_disconnect (struct usb_inter
>  }
>  EXPORT_SYMBOL_GPL(usbnet_disconnect);
>  
> +static const struct net_device_ops usbnet_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_change_mtu		= usbnet_change_mtu,
> +	.ndo_set_mac_address 	= eth_mac_addr,
> +	.ndo_validate_addr	= eth_validate_addr,
> +};
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -1171,12 +1184,14 @@ usbnet_probe (struct usb_interface *udev
>  		net->features |= NETIF_F_HIGHDMA;
>  #endif
>  
> -	net->change_mtu = usbnet_change_mtu;
> +	net->netdev_ops = &usbnet_netdev_ops;
> +#ifdef CONFIG_COMPAT_NET_DEV_OPS
>  	net->hard_start_xmit = usbnet_start_xmit;
>  	net->open = usbnet_open;
>  	net->stop = usbnet_stop;
> -	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
>  	net->tx_timeout = usbnet_tx_timeout;
> +#endif
> +	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
>  	net->ethtool_ops = &usbnet_ethtool_ops;
>  
>  	// allow device-specific bind/init procedures
> --- a/include/linux/usb/usbnet.h	2009-03-20 09:54:30.657965414 -0700
> +++ b/include/linux/usb/usbnet.h	2009-03-20 09:57:31.417699745 -0700
> @@ -176,6 +176,11 @@ struct skb_data {	/* skb->cb is one of t
>  	size_t			length;
>  };
>  
> +extern int usbnet_open (struct net_device *net);
> +extern int usbnet_stop (struct net_device *net);
> +extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net);
> +extern void usbnet_tx_timeout (struct net_device *net);
> +extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
>  
>  extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *);
>  extern void usbnet_defer_kevent (struct usbnet *, int);
> 
> -- 
> 
> 



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

* Re: [PATCH 28/77] usbnet: convert asix driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 28/77] usbnet: convert asix driver to net_device_ops Stephen Hemminger
@ 2009-03-21  9:12   ` David Brownell
  2009-03-22  2:46   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:12 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, David Hollis

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc'd driver maintainer


> 
> --- a/drivers/net/usb/asix.c	2009-03-20 12:11:35.724901593 -0700
> +++ b/drivers/net/usb/asix.c	2009-03-20 12:15:35.937027165 -0700
> @@ -807,6 +807,18 @@ static int ax88172_link_reset(struct usb
>  	return 0;
>  }
>  
> +static const struct net_device_ops ax88172_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_change_mtu		= usbnet_change_mtu,
> +	.ndo_set_mac_address 	= eth_mac_addr,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_do_ioctl		= asix_ioctl,
> +	.ndo_set_multicast_list = ax88172_set_multicast,
> +};
> +
>  static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf)
>  {
>  	int ret = 0;
> @@ -846,9 +858,8 @@ static int ax88172_bind(struct usbnet *d
>  	dev->mii.phy_id_mask = 0x3f;
>  	dev->mii.reg_num_mask = 0x1f;
>  	dev->mii.phy_id = asix_get_phy_addr(dev);
> -	dev->net->do_ioctl = asix_ioctl;
>  
> -	dev->net->set_multicast_list = ax88172_set_multicast;
> +	dev->net->netdev_ops = &ax88172_netdev_ops;
>  	dev->net->ethtool_ops = &ax88172_ethtool_ops;
>  
>  	asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
> @@ -898,6 +909,18 @@ static int ax88772_link_reset(struct usb
>  	return 0;
>  }
>  
> +static const struct net_device_ops ax88772_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_change_mtu		= usbnet_change_mtu,
> +	.ndo_set_mac_address 	= eth_mac_addr,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_do_ioctl		= asix_ioctl,
> +	.ndo_set_multicast_list = asix_set_multicast,
> +};
> +
>  static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
>  {
>  	int ret, embd_phy;
> @@ -962,7 +985,6 @@ static int ax88772_bind(struct usbnet *d
>  	dev->mii.mdio_write = asix_mdio_write;
>  	dev->mii.phy_id_mask = 0x1f;
>  	dev->mii.reg_num_mask = 0x1f;
> -	dev->net->do_ioctl = asix_ioctl;
>  	dev->mii.phy_id = asix_get_phy_addr(dev);
>  
>  	phyid = asix_get_phyid(dev);
> @@ -978,7 +1000,7 @@ static int ax88772_bind(struct usbnet *d
>  
>  	msleep(150);
>  
> -	dev->net->set_multicast_list = asix_set_multicast;
> +	dev->net->netdev_ops = &ax88772_netdev_ops;
>  	dev->net->ethtool_ops = &ax88772_ethtool_ops;
>  
>  	asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
> @@ -1181,6 +1203,18 @@ static int ax88178_change_mtu(struct net
>  	return 0;
>  }
>  
> +static const struct net_device_ops ax88178_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_set_mac_address 	= eth_mac_addr,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_set_multicast_list = asix_set_multicast,
> +	.ndo_do_ioctl 		= asix_ioctl,
> +	.ndo_change_mtu 	= ax88178_change_mtu,
> +};
> +
>  static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf)
>  {
>  	struct asix_data *data = (struct asix_data *)&dev->data;
> @@ -1247,11 +1281,10 @@ static int ax88178_bind(struct usbnet *d
>  	dev->mii.phy_id_mask = 0x1f;
>  	dev->mii.reg_num_mask = 0xff;
>  	dev->mii.supports_gmii = 1;
> -	dev->net->do_ioctl = asix_ioctl;
>  	dev->mii.phy_id = asix_get_phy_addr(dev);
> -	dev->net->set_multicast_list = asix_set_multicast;
> +
> +	dev->net->netdev_ops = &ax88178_netdev_ops;
>  	dev->net->ethtool_ops = &ax88178_ethtool_ops;
> -	dev->net->change_mtu = &ax88178_change_mtu;
>  
>  	phyid = asix_get_phyid(dev);
>  	dbg("PHYID=0x%08x", phyid);
> 
> -- 
> 
> 



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

* Re: [PATCH 29/77] usbnet: convert dms9601 driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 29/77] usbnet: convert dms9601 " Stephen Hemminger
@ 2009-03-21  9:14   ` David Brownell
  2009-03-21 10:57     ` Peter Korsgaard
  2009-03-22  3:00   ` David Miller
  1 sibling, 1 reply; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, jacmet

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc'd maintainer



> 
> --- a/drivers/net/usb/dm9601.c	2009-03-20 12:11:35.703901588 -0700
> +++ b/drivers/net/usb/dm9601.c	2009-03-20 12:16:05.744902076 -0700
> @@ -419,6 +419,18 @@ static int dm9601_set_mac_address(struct
>  	return 0;
>  }
>  
> +static const struct net_device_ops dm9601_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_change_mtu		= usbnet_change_mtu,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_do_ioctl 		= dm9601_ioctl,
> +	.ndo_set_multicast_list = dm9601_set_multicast,
> +	.ndo_set_mac_address	= dm9601_set_mac_address,
> +};
> +
>  static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
>  {
>  	int ret;
> @@ -428,9 +440,7 @@ static int dm9601_bind(struct usbnet *de
>  	if (ret)
>  		goto out;
>  
> -	dev->net->do_ioctl = dm9601_ioctl;
> -	dev->net->set_multicast_list = dm9601_set_multicast;
> -	dev->net->set_mac_address = dm9601_set_mac_address;
> +	dev->net->netdev_ops = &dm9601_netdev_ops;
>  	dev->net->ethtool_ops = &dm9601_ethtool_ops;
>  	dev->net->hard_header_len += DM_TX_OVERHEAD;
>  	dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
> 
> -- 
> 
> 



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

* Re: [PATCH 30/77] usbnet: convert msc7830 driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 30/77] usbnet: convert msc7830 " Stephen Hemminger
@ 2009-03-21  9:19   ` David Brownell
  2009-03-22  3:00   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, Arnd Bergmann

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc'd driver maintainer


> 
> --- a/drivers/net/usb/mcs7830.c	2009-03-20 12:11:35.680902515 -0700
> +++ b/drivers/net/usb/mcs7830.c	2009-03-20 12:16:27.334776706 -0700
> @@ -486,6 +486,18 @@ static int mcs7830_set_mac_address(struc
>  	return 0;
>  }
>  
> +static const struct net_device_ops mcs7830_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_change_mtu		= usbnet_change_mtu,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_do_ioctl 		= mcs7830_ioctl,
> +	.ndo_set_multicast_list = mcs7830_set_multicast,
> +	.ndo_set_mac_address	 = mcs7830_set_mac_address,
> +};
> +
>  static int mcs7830_bind(struct usbnet *dev, struct usb_interface *udev)
>  {
>  	struct net_device *net = dev->net;
> @@ -495,11 +507,9 @@ static int mcs7830_bind(struct usbnet *d
>  	if (ret)
>  		goto out;
>  
> -	net->do_ioctl = mcs7830_ioctl;
>  	net->ethtool_ops = &mcs7830_ethtool_ops;
> -	net->set_multicast_list = mcs7830_set_multicast;
> +	net->netdev_ops = &mcs7830_netdev_ops;
>  	mcs7830_set_multicast(net);
> -	net->set_mac_address = mcs7830_set_mac_address;
>  
>  	/* reserve space for the status byte on rx */
>  	dev->rx_urb_size = ETH_FRAME_LEN + 1;
> 
> -- 
> 
> 



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

* Re: [PATCH 31/77] usbnet: convert sms95xx driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 31/77] usbnet: convert sms95xx " Stephen Hemminger
@ 2009-03-21  9:20   ` David Brownell
  2009-03-21 15:53     ` Steve.Glendinning
  2009-03-22  3:01   ` David Miller
  1 sibling, 1 reply; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:20 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, Steve Glendinning

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

cc driver maintainer


> --- a/drivers/net/usb/smsc95xx.c	2009-03-20 12:11:35.646901516 -0700
> +++ b/drivers/net/usb/smsc95xx.c	2009-03-20 12:16:51.582901740 -0700
> @@ -1008,6 +1008,18 @@ static int smsc95xx_reset(struct usbnet 
>  	return 0;
>  }
>  
> +static const struct net_device_ops smsc95xx_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_change_mtu		= usbnet_change_mtu,
> +	.ndo_set_mac_address 	= eth_mac_addr,
> +	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_do_ioctl 		= smsc95xx_ioctl,
> +	.ndo_set_multicast_list = smsc95xx_set_multicast,
> +};
> +
>  static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
>  {
>  	struct smsc95xx_priv *pdata = NULL;
> @@ -1038,9 +1050,8 @@ static int smsc95xx_bind(struct usbnet *
>  	/* Init all registers */
>  	ret = smsc95xx_reset(dev);
>  
> -	dev->net->do_ioctl = smsc95xx_ioctl;
> +	dev->net->netdev_ops = &smsc95xx_netdev_ops;
>  	dev->net->ethtool_ops = &smsc95xx_ethtool_ops;
> -	dev->net->set_multicast_list = smsc95xx_set_multicast;
>  	dev->net->flags |= IFF_MULTICAST;
>  	dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD;
>  	return 0;
> 
> -- 
> 
> 



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

* Re: [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats
  2009-03-21  5:35 ` [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats Stephen Hemminger
@ 2009-03-21  9:22   ` David Brownell
  2009-03-22  3:01   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:22 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Friday 20 March 2009, Stephen Hemminger wrote:
> dev_get_stats() handles all issues with net_device_ops
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>


> ---
>  drivers/usb/gadget/rndis.c |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> --- a/drivers/usb/gadget/rndis.c	2009-03-20 12:18:22.054027493 -0700
> +++ b/drivers/usb/gadget/rndis.c	2009-03-20 12:18:28.620714647 -0700
> @@ -170,7 +170,7 @@ gen_ndis_query_resp (int configNr, u32 O
>  	int			i, count;
>  	rndis_query_cmplt_type	*resp;
>  	struct net_device	*net;
> -	struct net_device_stats	*stats;
> +	const struct net_device_stats	*stats;
>  
>  	if (!r) return -ENOMEM;
>  	resp = (rndis_query_cmplt_type *) r->buf;
> @@ -193,10 +193,7 @@ gen_ndis_query_resp (int configNr, u32 O
>  	resp->InformationBufferOffset = cpu_to_le32 (16);
>  
>  	net = rndis_per_dev_params[configNr].dev;
> -	if (net->get_stats)
> -		stats = net->get_stats(net);
> -	else
> -		stats = NULL;
> +	stats = dev_get_stats(net);
>  
>  	switch (OID) {
>  
> 
> -- 
> 
> 



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

* Re: [PATCH 33/77] usbnet: convert rndis driver to net_device_ops
  2009-03-21  5:36 ` [PATCH 33/77] usbnet: convert rndis driver to net_device_ops Stephen Hemminger
@ 2009-03-21  9:23   ` David Brownell
  2009-03-22  3:01   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Brownell @ 2009-03-21  9:23 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Friday 20 March 2009, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>


> --- a/drivers/net/usb/rndis_host.c	2009-03-20 12:18:22.041027638 -0700
> +++ b/drivers/net/usb/rndis_host.c	2009-03-20 12:27:20.541841282 -0700
> @@ -266,6 +266,16 @@ response_error:
>  	return -EDOM;
>  }
>  
> +/* same as usbnet_netdev_ops but MTU change not allowed */
> +static const struct net_device_ops rndis_netdev_ops = {
> +	.ndo_open		= usbnet_open,
> +	.ndo_stop		= usbnet_stop,
> +	.ndo_start_xmit		= usbnet_start_xmit,
> +	.ndo_tx_timeout		= usbnet_tx_timeout,
> +	.ndo_set_mac_address 	= eth_mac_addr,
> +	.ndo_validate_addr	= eth_validate_addr,
> +};
> +
>  int
>  generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
>  {
> @@ -327,7 +337,8 @@ generic_rndis_bind(struct usbnet *dev, s
>  	dev->rx_urb_size &= ~(dev->maxpacket - 1);
>  	u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size);
>  
> -	net->change_mtu = NULL;
> +	net->netdev_ops = &rndis_netdev_ops;
> +
>  	retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE);
>  	if (unlikely(retval < 0)) {
>  		/* it might not even be an RNDIS device!! */
> 
> -- 
> 
> 



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

* Re: [PATCH 22/77] usbnet: convert catc device to net_device_ops
  2009-03-21  5:35 ` [PATCH 22/77] usbnet: convert catc device to net_device_ops Stephen Hemminger
  2009-03-21  9:01   ` David Brownell
@ 2009-03-21 10:17   ` Jiri Pirko
  2009-03-22  2:40     ` David Miller
  2009-03-22  2:45   ` David Miller
  2 siblings, 1 reply; 197+ messages in thread
From: Jiri Pirko @ 2009-03-21 10:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, dbrownell, netdev

Sat, Mar 21, 2009 at 06:35:49AM CET, shemminger@vyatta.com wrote:
>Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
>--- a/drivers/net/usb/catc.c	2009-03-20 12:10:10.851651580 -0700
>+++ b/drivers/net/usb/catc.c	2009-03-20 12:10:23.060839265 -0700
>@@ -743,6 +743,18 @@ static int catc_stop(struct net_device *
> 	return 0;
> }
> 
>+static const struct net_device_ops catc_netdev_ops = {
>+	.ndo_open		= catc_open,
>+	.ndo_stop		= catc_stop,
>+	.ndo_start_xmit		= catc_start_xmit,
                                  ^^^^^^^^^^^^^^^
Shouldn't be here catc_hard_start_xmit() instead? Cannot find catc_start_xmit()
anywhere in the code...
>+
>+	.ndo_tx_timeout		= catc_tx_timeout,
>+	.ndo_set_multicast_list = catc_set_multicast_list,
>+	.ndo_change_mtu		= eth_change_mtu,
>+	.ndo_set_mac_address 	= eth_mac_addr,
>+	.ndo_validate_addr	= eth_validate_addr,
>+};
>+
> /*
>  * USB probe, disconnect.
>  */
>@@ -767,12 +779,8 @@ static int catc_probe(struct usb_interfa
> 
> 	catc = netdev_priv(netdev);
> 
>-	netdev->open = catc_open;
>-	netdev->hard_start_xmit = catc_hard_start_xmit;
>-	netdev->stop = catc_stop;
>-	netdev->tx_timeout = catc_tx_timeout;
>+	netdev->netdev_ops = &catc_netdev_ops;
> 	netdev->watchdog_timeo = TX_TIMEOUT;
>-	netdev->set_multicast_list = catc_set_multicast_list;
> 	SET_ETHTOOL_OPS(netdev, &ops);
> 
> 	catc->usbdev = usbdev;
>
>-- 
>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 29/77] usbnet: convert dms9601 driver to net_device_ops
  2009-03-21  9:14   ` David Brownell
@ 2009-03-21 10:57     ` Peter Korsgaard
  2009-03-21 11:28       ` Peter Korsgaard
  0 siblings, 1 reply; 197+ messages in thread
From: Peter Korsgaard @ 2009-03-21 10:57 UTC (permalink / raw)
  To: David Brownell; +Cc: Stephen Hemminger, David Miller, netdev

>>>>> "David" == David Brownell <david-b@pacbell.net> writes:

 David> On Friday 20 March 2009, Stephen Hemminger wrote:
 >> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

 David> cc'd maintainer

Seems fine.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

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

* Re: [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats
       [not found]   ` <20090321053717.601771143-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-21 11:08     ` Johannes Berg
  2009-03-22  5:49       ` David Miller
  2009-03-22  5:53     ` David Miller
  1 sibling, 1 reply; 197+ messages in thread
From: Johannes Berg @ 2009-03-21 11:08 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: David Miller, j, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

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

On Fri, 2009-03-20 at 22:36 -0700, Stephen Hemminger wrote:
> plain text document attachment (hwsim.patch)
> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
> 
> 
> --- a/drivers/net/wireless/mac80211_hwsim.c	2009-03-20 21:45:40.802964051 -0700
> +++ b/drivers/net/wireless/mac80211_hwsim.c	2009-03-20 22:26:02.959027480 -0700
> @@ -739,10 +739,16 @@ static struct device_driver mac80211_hws
>  	.name = "mac80211_hwsim"
>  };
>  
> +static const struct net_device_ops hwsim_netdev_ops = {

this, and a few others I think, have wrong subjects.

johannes

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

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

* Re: [PATCH 29/77] usbnet: convert dms9601 driver to net_device_ops
  2009-03-21 10:57     ` Peter Korsgaard
@ 2009-03-21 11:28       ` Peter Korsgaard
  0 siblings, 0 replies; 197+ messages in thread
From: Peter Korsgaard @ 2009-03-21 11:28 UTC (permalink / raw)
  To: David Brownell; +Cc: Stephen Hemminger, David Miller, netdev

>>>>> "Peter" == Peter Korsgaard <jacmet@sunsite.dk> writes:

>>>>> "David" == David Brownell <david-b@pacbell.net> writes:
 David> On Friday 20 March 2009, Stephen Hemminger wrote:
 >>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

 David> cc'd maintainer

 Peter> Seems fine.

 Peter> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Ehhm, I meant Acked-by: Peter Korsgaard <jacmet@sunsite.dk> ofcourse.

-- 
Bye, Peter Korsgaard

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

* Re: [PATCH 01/77] atm: convert mpc device to using netdev_ops
  2009-03-21  5:35 ` [PATCH 01/77] atm: convert mpc device to using netdev_ops Stephen Hemminger
@ 2009-03-21 11:44   ` Chas Williams (CONTRACTOR)
  2009-03-22  2:34   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: Chas Williams (CONTRACTOR) @ 2009-03-21 11:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

this looks fine.  it seems like there should be a better way to handle
this, but it should work.  i dont remember many people using the mpoa
shortcut code though.

In message <20090321053712.648437543@vyatta.com>,Stephen Hemminger writes:
>This converts the mpc device to using new netdevice_ops.
>Compile tested only, needs more than usual review since
>device was swaping pointers around etc.
>
>Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>


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

* Re: [PATCH 22/77] usbnet: convert catc device to net_device_ops
  2009-03-21  9:01   ` David Brownell
@ 2009-03-21 13:02     ` Vojtech Pavlik
  0 siblings, 0 replies; 197+ messages in thread
From: Vojtech Pavlik @ 2009-03-21 13:02 UTC (permalink / raw)
  To: David Brownell; +Cc: Stephen Hemminger, David Miller, netdev

On Sat, Mar 21, 2009 at 02:01:14AM -0700, David Brownell wrote:
> On Friday 20 March 2009, Stephen Hemminger wrote:
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> OK by me, but I cc'd Vojtech who was the last maintainer of this code.

OK by me, too.

> 
> 
> > --- a/drivers/net/usb/catc.c	2009-03-20 12:10:10.851651580 -0700
> > +++ b/drivers/net/usb/catc.c	2009-03-20 12:10:23.060839265 -0700
> > @@ -743,6 +743,18 @@ static int catc_stop(struct net_device *
> >  	return 0;
> >  }
> >  
> > +static const struct net_device_ops catc_netdev_ops = {
> > +	.ndo_open		= catc_open,
> > +	.ndo_stop		= catc_stop,
> > +	.ndo_start_xmit		= catc_start_xmit,
> > +
> > +	.ndo_tx_timeout		= catc_tx_timeout,
> > +	.ndo_set_multicast_list = catc_set_multicast_list,
> > +	.ndo_change_mtu		= eth_change_mtu,
> > +	.ndo_set_mac_address 	= eth_mac_addr,
> > +	.ndo_validate_addr	= eth_validate_addr,
> > +};
> > +
> >  /*
> >   * USB probe, disconnect.
> >   */
> > @@ -767,12 +779,8 @@ static int catc_probe(struct usb_interfa
> >  
> >  	catc = netdev_priv(netdev);
> >  
> > -	netdev->open = catc_open;
> > -	netdev->hard_start_xmit = catc_hard_start_xmit;
> > -	netdev->stop = catc_stop;
> > -	netdev->tx_timeout = catc_tx_timeout;
> > +	netdev->netdev_ops = &catc_netdev_ops;
> >  	netdev->watchdog_timeo = TX_TIMEOUT;
> > -	netdev->set_multicast_list = catc_set_multicast_list;
> >  	SET_ETHTOOL_OPS(netdev, &ops);
> >  
> >  	catc->usbdev = usbdev;
> > 
> > -- 
> > 
> > 
> 
> 

-- 
Vojtech Pavlik
Director SuSE Labs

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

* Re: [PATCH 23/77] usbnet: convert to internal net_device stats
  2009-03-21  9:01   ` David Brownell
@ 2009-03-21 13:02     ` Vojtech Pavlik
  0 siblings, 0 replies; 197+ messages in thread
From: Vojtech Pavlik @ 2009-03-21 13:02 UTC (permalink / raw)
  To: David Brownell; +Cc: Stephen Hemminger, David Miller, netdev

On Sat, Mar 21, 2009 at 02:01:53AM -0700, David Brownell wrote:
> On Friday 20 March 2009, Stephen Hemminger wrote:
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> ... ditto ...

And here ok, too.

> 
> > --- a/drivers/net/usb/rtl8150.c	2009-03-20 12:11:35.825901868 -0700
> > +++ b/drivers/net/usb/rtl8150.c	2009-03-20 12:12:47.085715442 -0700
> > @@ -155,7 +155,6 @@ struct rtl8150 {
> >  	unsigned long flags;
> >  	struct usb_device *udev;
> >  	struct tasklet_struct tl;
> > -	struct net_device_stats stats;
> >  	struct net_device *netdev;
> >  	struct urb *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
> >  	struct sk_buff *tx_skb, *rx_skb;
> > @@ -463,8 +462,8 @@ static void read_bulk_callback(struct ur
> >  	skb_put(dev->rx_skb, pkt_len);
> >  	dev->rx_skb->protocol = eth_type_trans(dev->rx_skb, netdev);
> >  	netif_rx(dev->rx_skb);
> > -	dev->stats.rx_packets++;
> > -	dev->stats.rx_bytes += pkt_len;
> > +	netdev->stats.rx_packets++;
> > +	netdev->stats.rx_bytes += pkt_len;
> >  
> >  	spin_lock(&dev->rx_pool_lock);
> >  	skb = pull_skb(dev);
> > @@ -573,13 +572,13 @@ static void intr_callback(struct urb *ur
> >  
> >  	d = urb->transfer_buffer;
> >  	if (d[0] & TSR_ERRORS) {
> > -		dev->stats.tx_errors++;
> > +		dev->netdev->stats.tx_errors++;
> >  		if (d[INT_TSR] & (TSR_ECOL | TSR_JBR))
> > -			dev->stats.tx_aborted_errors++;
> > +			dev->netdev->stats.tx_aborted_errors++;
> >  		if (d[INT_TSR] & TSR_LCOL)
> > -			dev->stats.tx_window_errors++;
> > +			dev->netdev->stats.tx_window_errors++;
> >  		if (d[INT_TSR] & TSR_LOSS_CRS)
> > -			dev->stats.tx_carrier_errors++;
> > +			dev->netdev->stats.tx_carrier_errors++;
> >  	}
> >  	/* Report link status changes to the network stack */
> >  	if ((d[INT_MSR] & MSR_LINK) == 0) {
> > @@ -697,17 +696,12 @@ static void disable_net_traffic(rtl8150_
> >  	set_registers(dev, CR, 1, &cr);
> >  }
> >  
> > -static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev)
> > -{
> > -	return &((rtl8150_t *)netdev_priv(dev))->stats;
> > -}
> > -
> >  static void rtl8150_tx_timeout(struct net_device *netdev)
> >  {
> >  	rtl8150_t *dev = netdev_priv(netdev);
> >  	dev_warn(&netdev->dev, "Tx timeout.\n");
> >  	usb_unlink_urb(dev->tx_urb);
> > -	dev->stats.tx_errors++;
> > +	netdev->stats.tx_errors++;
> >  }
> >  
> >  static void rtl8150_set_multicast(struct net_device *netdev)
> > @@ -747,12 +741,12 @@ static int rtl8150_start_xmit(struct sk_
> >  			netif_device_detach(dev->netdev);
> >  		else {
> >  			dev_warn(&netdev->dev, "failed tx_urb %d\n", res);
> > -			dev->stats.tx_errors++;
> > +			netdev->stats.tx_errors++;
> >  			netif_start_queue(netdev);
> >  		}
> >  	} else {
> > -		dev->stats.tx_packets++;
> > -		dev->stats.tx_bytes += skb->len;
> > +		netdev->stats.tx_packets++;
> > +		netdev->stats.tx_bytes += skb->len;
> >  		netdev->trans_start = jiffies;
> >  	}
> >  
> > @@ -931,7 +925,7 @@ static int rtl8150_probe(struct usb_inte
> >  	netdev->hard_start_xmit = rtl8150_start_xmit;
> >  	netdev->set_multicast_list = rtl8150_set_multicast;
> >  	netdev->set_mac_address = rtl8150_set_mac_address;
> > -	netdev->get_stats = rtl8150_netdev_stats;
> > +
> >  	SET_ETHTOOL_OPS(netdev, &ops);
> >  	dev->intr_interval = 100;	/* 100ms */
> >  
> > 
> > -- 
> > 
> > 
> 
> 

-- 
Vojtech Pavlik
Director SuSE Labs

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

* Re: [PATCH 31/77] usbnet: convert sms95xx driver to net_device_ops
  2009-03-21  9:20   ` David Brownell
@ 2009-03-21 15:53     ` Steve.Glendinning
  0 siblings, 0 replies; 197+ messages in thread
From: Steve.Glendinning @ 2009-03-21 15:53 UTC (permalink / raw)
  To: David Brownell; +Cc: David Miller, netdev, Stephen Hemminger

Hi David,

The patch looks fine, but (minor nit) the subject line should read 
"smsc95xx" instead of "sms95xx".

Acked-by: Steve Glendinning <steve.glendinning@smsc.com>

--
Steve Glendinning
SMSC GmbH
m: +44 777 933 9124
e: steve.glendinning@smsc.com



David Brownell <david-b@pacbell.net> wrote on 21/03/2009 09:20:29:

> On Friday 20 March 2009, Stephen Hemminger wrote:
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> cc driver maintainer
> 
> 
> > --- a/drivers/net/usb/smsc95xx.c   2009-03-20 12:11:35.646901516 -0700
> > +++ b/drivers/net/usb/smsc95xx.c   2009-03-20 12:16:51.582901740 -0700
> > @@ -1008,6 +1008,18 @@ static int smsc95xx_reset(struct usbnet 
> >     return 0;
> >  }
> > 
> > +static const struct net_device_ops smsc95xx_netdev_ops = {
> > +   .ndo_open      = usbnet_open,
> > +   .ndo_stop      = usbnet_stop,
> > +   .ndo_start_xmit      = usbnet_start_xmit,
> > +   .ndo_tx_timeout      = usbnet_tx_timeout,
> > +   .ndo_change_mtu      = usbnet_change_mtu,
> > +   .ndo_set_mac_address    = eth_mac_addr,
> > +   .ndo_validate_addr   = eth_validate_addr,
> > +   .ndo_do_ioctl       = smsc95xx_ioctl,
> > +   .ndo_set_multicast_list = smsc95xx_set_multicast,
> > +};
> > +
> >  static int smsc95xx_bind(struct usbnet *dev, struct usb_interface 
*intf)
> >  {
> >     struct smsc95xx_priv *pdata = NULL;
> > @@ -1038,9 +1050,8 @@ static int smsc95xx_bind(struct usbnet *
> >     /* Init all registers */
> >     ret = smsc95xx_reset(dev);
> > 
> > -   dev->net->do_ioctl = smsc95xx_ioctl;
> > +   dev->net->netdev_ops = &smsc95xx_netdev_ops;
> >     dev->net->ethtool_ops = &smsc95xx_ethtool_ops;
> > -   dev->net->set_multicast_list = smsc95xx_set_multicast;
> >     dev->net->flags |= IFF_MULTICAST;
> >     dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD;
> >     return 0;
> > 
> > -- 
> > 
> > 
> 
> 


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

* [ofa-general] Re: [PATCH 03/77] infiniband: convert c2 to net_device_ops
  2009-03-21  5:35 ` [ofa-general] [PATCH 03/77] infiniband: convert c2 " Stephen Hemminger
@ 2009-03-21 18:26   ` Steve Wise
  2009-03-22  2:34   ` David Miller
  2009-03-22 16:12   ` [ofa-general] " Roland Dreier
  2 siblings, 0 replies; 197+ messages in thread
From: Steve Wise @ 2009-03-21 18:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, general, David Miller

Reviewed-by: Steve Wise <swise@opengridcomputing.com>

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

* Re: [PATCH 01/77] atm: convert mpc device to using netdev_ops
  2009-03-21  5:35 ` [PATCH 01/77] atm: convert mpc device to using netdev_ops Stephen Hemminger
  2009-03-21 11:44   ` Chas Williams (CONTRACTOR)
@ 2009-03-22  2:34   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: chas, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:28 -0700

> This converts the mpc device to using new netdevice_ops.
> Compile tested only, needs more than usual review since
> device was swaping pointers around etc.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 02/77] atm: cconvert clip driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 02/77] atm: cconvert clip driver to net_device_ops Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: chas, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:29 -0700

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

Applied.

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

* [ofa-general] Re: [PATCH 03/77] infiniband: convert c2 to net_device_ops
  2009-03-21  5:35 ` [ofa-general] [PATCH 03/77] infiniband: convert c2 " Stephen Hemminger
  2009-03-21 18:26   ` [ofa-general] " Steve Wise
@ 2009-03-22  2:34   ` David Miller
  2009-03-22 16:12   ` [ofa-general] " Roland Dreier
  2 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, general

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:30 -0700

> Convert this driver to new net_device_ops infrastructure.
> Also use default net_device get-stats infrastructure
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 04/77] infiniband: convert nes driver to net_device_ops
  2009-03-21  5:35 ` [ofa-general] [PATCH 04/77] infiniband: convert nes driver " Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: faisal.latif, chien.tin.tung, netdev, general

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:31 -0700

> Also, removed unnecessary memset() sinc alloc_netdev returns
> zeroed memory.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* [ofa-general] Re: [PATCH 05/77] infiniband: convert ipoib to net_device_ops
  2009-03-21  5:35 ` [ofa-general] [PATCH 05/77] infiniband: convert ipoib " Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, general

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:32 -0700

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

Applied.

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

* Re: [PATCH 06/77] irda: net_device_ops ioctl fix
  2009-03-21  5:35 ` [PATCH 06/77] irda: net_device_ops ioctl fix Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  2009-03-23 11:33   ` Samuel Ortiz
  2009-03-23 11:33   ` Samuel Ortiz
  2 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:33 -0700

> Need to reference net_device_ops not old pointer.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 07/77] irlan: convert to net_device_ops
  2009-03-21  5:35 ` [PATCH 07/77] irlan: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  2009-03-23 11:33   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:34 -0700

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

Applied.

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

* Re: [PATCH 08/77] irda: convert irda_usb to net_device_ops
  2009-03-21  5:35 ` [PATCH 08/77] irda: convert irda_usb " Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  2009-03-23 11:34   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:35 -0700

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

Applied.

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

* Re: [PATCH 09/77] irda: convert mcs driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 09/77] irda: convert mcs driver " Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  2009-03-23 11:34   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:36 -0700

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

Applied.

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

* Re: [PATCH 10/77] stir4200: convert to net_device_ops
  2009-03-21  5:35 ` [PATCH 10/77] stir4200: convert " Stephen Hemminger
@ 2009-03-22  2:34   ` David Miller
  2009-03-23 11:34   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:34 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:37 -0700

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

Applied.

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

* Re: [PATCH 11/77] irda: convert w83977af_ir to net_device_ops
  2009-03-21  5:35 ` [PATCH 11/77] irda: convert w83977af_ir " Stephen Hemminger
@ 2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:36 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:38 -0700

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

Applied.

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

* Re: [PATCH 12/77] irda: convert nsc_ircc driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 12/77] irda: convert nsc_ircc driver " Stephen Hemminger
@ 2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:36 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:39 -0700

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

Applied.


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

* Re: [PATCH 13/77] irda: convert ali driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 13/77] irda: convert ali " Stephen Hemminger
@ 2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:36 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:40 -0700

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

Applied.

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

* Re: [PATCH 14/77] irda: convert vlsi driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 14/77] irda: convert vlsi " Stephen Hemminger
@ 2009-03-22  2:36   ` David Miller
  2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:36 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:41 -0700

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

Applied.

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

* Re: [PATCH 15/77] irda: convert smsc driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 15/77] irda: convert smsc " Stephen Hemminger
@ 2009-03-22  2:36   ` David Miller
  2009-03-23 11:36   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:36 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:42 -0700

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

Applied.

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

* Re: [PATCH 16/77] irda: convert via-ircc to net_device_ops
  2009-03-21  5:35 ` [PATCH 16/77] irda: convert via-ircc " Stephen Hemminger
@ 2009-03-22  2:36   ` David Miller
  2009-03-23 11:36   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:36 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:43 -0700

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

Applied.

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

* Re: [PATCH 17/77] irda: convert sir device to net_device_ops
  2009-03-21  5:35 ` [PATCH 17/77] irda: convert sir device " Stephen Hemminger
@ 2009-03-22  2:36   ` David Miller
  2009-03-23 11:36   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:36 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:44 -0700

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

Applied.

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

* Re: [PATCH 18/77] irda: convert kignsun device to net_device_ops
  2009-03-21  5:35 ` [PATCH 18/77] irda: convert kignsun " Stephen Hemminger
@ 2009-03-22  2:37   ` David Miller
  2009-03-23 11:37   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:37 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:45 -0700

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

Applied.

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

* Re: [PATCH 19/77] irda: convert ksdazzle device to net_device_ops
  2009-03-21  5:35 ` [PATCH 19/77] irda: convert ksdazzle " Stephen Hemminger
@ 2009-03-22  2:37   ` David Miller
  2009-03-23 11:37   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:37 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:46 -0700

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

Applied.

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

* Re: [PATCH 20/77] irda: convert ks959 device to net_device_ops
  2009-03-21  5:35 ` [PATCH 20/77] irda: convert ks959 " Stephen Hemminger
@ 2009-03-22  2:37   ` David Miller
  2009-03-23 11:37   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:37 UTC (permalink / raw)
  To: shemminger; +Cc: samuel, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:47 -0700

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

Applied.

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

* Re: [PATCH 22/77] usbnet: convert catc device to net_device_ops
  2009-03-21 10:17   ` Jiri Pirko
@ 2009-03-22  2:40     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:40 UTC (permalink / raw)
  To: jpirko; +Cc: shemminger, dbrownell, netdev

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 21 Mar 2009 11:17:29 +0100

> Sat, Mar 21, 2009 at 06:35:49AM CET, shemminger@vyatta.com wrote:
> >Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> >
> >--- a/drivers/net/usb/catc.c	2009-03-20 12:10:10.851651580 -0700
> >+++ b/drivers/net/usb/catc.c	2009-03-20 12:10:23.060839265 -0700
> >@@ -743,6 +743,18 @@ static int catc_stop(struct net_device *
> > 	return 0;
> > }
> > 
> >+static const struct net_device_ops catc_netdev_ops = {
> >+	.ndo_open		= catc_open,
> >+	.ndo_stop		= catc_stop,
> >+	.ndo_start_xmit		= catc_start_xmit,
>                                   ^^^^^^^^^^^^^^^
> Shouldn't be here catc_hard_start_xmit() instead? Cannot find catc_start_xmit()
> anywhere in the code...

It gets renamed to catc_start_xmit() in the previous patch in this
series, #21.

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

* Re: [PATCH 21/77] usbnet: convert catc to internal net_device_stats
  2009-03-21  5:35 ` [PATCH 21/77] usbnet: convert catc to internal net_device_stats Stephen Hemminger
@ 2009-03-22  2:45   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:45 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:48 -0700

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

Applied.

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

* Re: [PATCH 22/77] usbnet: convert catc device to net_device_ops
  2009-03-21  5:35 ` [PATCH 22/77] usbnet: convert catc device to net_device_ops Stephen Hemminger
  2009-03-21  9:01   ` David Brownell
  2009-03-21 10:17   ` Jiri Pirko
@ 2009-03-22  2:45   ` David Miller
  2 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:45 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:49 -0700

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

Applied.

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

* Re: [PATCH 23/77] usbnet: convert to internal net_device stats
  2009-03-21  5:35 ` [PATCH 23/77] usbnet: convert to internal net_device stats Stephen Hemminger
  2009-03-21  9:01   ` David Brownell
@ 2009-03-22  2:45   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:45 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:50 -0700

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

Applied.

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

* Re: [PATCH 24/77] usbnet: convert rtl driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 24/77] usbnet: convert rtl driver to net_device_ops Stephen Hemminger
  2009-03-21  9:03   ` David Brownell
@ 2009-03-22  2:45   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:45 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:51 -0700

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

Applied.

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

* Re: [PATCH 25/77] usbnet: convert hso driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 25/77] usbnet: convert hso " Stephen Hemminger
  2009-03-21  9:08   ` David Brownell
@ 2009-03-22  2:45   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:45 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:52 -0700

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

Applied.

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

* Re: [PATCH 26/77] usbnet: convert to internal net_device_stats
  2009-03-21  5:35 ` [PATCH 26/77] usbnet: convert to internal net_device_stats Stephen Hemminger
  2009-03-21  9:09   ` David Brownell
@ 2009-03-22  2:46   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:46 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:53 -0700

> Default handler for net_device_stats already does same thing.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 27/77] usbnet: support net_device_ops
  2009-03-21  5:35 ` [PATCH 27/77] usbnet: support net_device_ops Stephen Hemminger
  2009-03-21  9:11   ` David Brownell
@ 2009-03-22  2:46   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:46 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:54 -0700

> Use net_device_ops for usbnet device, and export for use
> by other derived drivers.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 28/77] usbnet: convert asix driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 28/77] usbnet: convert asix driver to net_device_ops Stephen Hemminger
  2009-03-21  9:12   ` David Brownell
@ 2009-03-22  2:46   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  2:46 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:55 -0700

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

Applied.

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

* Re: [PATCH 29/77] usbnet: convert dms9601 driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 29/77] usbnet: convert dms9601 " Stephen Hemminger
  2009-03-21  9:14   ` David Brownell
@ 2009-03-22  3:00   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:00 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:56 -0700

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

Applied.

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

* Re: [PATCH 30/77] usbnet: convert msc7830 driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 30/77] usbnet: convert msc7830 " Stephen Hemminger
  2009-03-21  9:19   ` David Brownell
@ 2009-03-22  3:00   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:00 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:57 -0700

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

Applied.

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

* Re: [PATCH 31/77] usbnet: convert sms95xx driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 31/77] usbnet: convert sms95xx " Stephen Hemminger
  2009-03-21  9:20   ` David Brownell
@ 2009-03-22  3:01   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:58 -0700

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

Applied.

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

* Re: [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats
  2009-03-21  5:35 ` [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats Stephen Hemminger
  2009-03-21  9:22   ` David Brownell
@ 2009-03-22  3:01   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:59 -0700

> dev_get_stats() handles all issues with net_device_ops
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 33/77] usbnet: convert rndis driver to net_device_ops
  2009-03-21  5:36 ` [PATCH 33/77] usbnet: convert rndis driver to net_device_ops Stephen Hemminger
  2009-03-21  9:23   ` David Brownell
@ 2009-03-22  3:01   ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: dbrownell, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:00 -0700

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

Applied.

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

* Re: [PATCH 34/77] pcmcia: convert 3c589 to net_device_ops
  2009-03-21  5:36 ` [PATCH 34/77] pcmcia: convert 3c589 " Stephen Hemminger
@ 2009-03-22  3:01   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:01 -0700

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

Applied.

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

* Re: [PATCH 35/77] pcmcia: convert 3c574 to net_device_ops
  2009-03-21  5:36 ` [PATCH 35/77] pcmcia: convert 3c574 " Stephen Hemminger
@ 2009-03-22  3:01   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:02 -0700

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

Applied.

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

* Re: [PATCH 36/77] pcmcia: convert fmvj18x driver to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 36/77] pcmcia: convert fmvj18x driver to internal net_device_stats Stephen Hemminger
@ 2009-03-22  3:01   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:03 -0700

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

Applied.

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

* Re: [PATCH 37/77] pcmcia: convert fmvj18x driver to net_device_ops
  2009-03-21  5:36 ` [PATCH 37/77] pcmcia: convert fmvj18x driver to net_device_ops Stephen Hemminger
@ 2009-03-22  3:01   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:04 -0700

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

Applied.

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

* Re: [PATCH 38/77] pcmcia: convert nmclan driver to net_device_ops
  2009-03-21  5:36 ` [PATCH 38/77] pcmcia: convert nmclan " Stephen Hemminger
@ 2009-03-22  3:01   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:05 -0700

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

Applied.

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

* Re: [PATCH 39/77] pcnet: convert driver to net_device_ops
  2009-03-21  5:36 ` [PATCH 39/77] pcnet: convert " Stephen Hemminger
@ 2009-03-22  3:01   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:01 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:06 -0700

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

Applied.

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

* Re: [PATCH 40/77] xir2cps: convert to internal net_device stats
  2009-03-21  5:36 ` [PATCH 40/77] xir2cps: convert to internal net_device stats Stephen Hemminger
@ 2009-03-22  3:02   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  3:02 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:07 -0700

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

Applied.

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

* Re: [PATCH 41/77] xirc2ps: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 41/77] xirc2ps: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:42   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:42 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:08 -0700

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

Applied.

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

* Re: [PATCH 42/77] smc91c92: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 42/77] smc91c92: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:42   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:42 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:09 -0700

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

Applied.

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

* Re: [PATCH 43/77] smc91c92: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 43/77] smc91c92: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:42   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:42 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:10 -0700

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

Applied.

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

* Re: [PATCH 44/77] axnet: convert ot net_device_ops
  2009-03-21  5:36 ` [PATCH 44/77] axnet: convert ot net_device_ops Stephen Hemminger
@ 2009-03-22  5:42   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:42 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:11 -0700

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

Applied.

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

* Re: [PATCH 45/77] x25_asy: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 45/77] x25_asy: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:42   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:42 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:12 -0700

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

Applied.

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

* Re: [PATCH 46/77] x25_asy: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 46/77] x25_asy: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:43   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:43 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:13 -0700

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

Applied.

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

* Re: [PATCH 47/77] dlci: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 47/77] dlci: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:43   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:43 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:14 -0700

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

Applied.

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

* Re: [PATCH 48/77] dlci: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 48/77] dlci: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:43   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:43 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:15 -0700

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

Applied.

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

* Re: [PATCH 49/77] cycx: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 49/77] cycx: " Stephen Hemminger
@ 2009-03-22  5:43   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:43 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:16 -0700

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

Applied.

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

* Re: [PATCH 50/77] lapbether: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 50/77] lapbether: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:43   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:43 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:17 -0700

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

Applied.

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

* Re: [PATCH 51/77] labether: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 51/77] labether: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:47   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:47 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:18 -0700

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

Applied.

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

* Re: [PATCH 52/77] sbni: use internal net_device_stats
  2009-03-21  5:36 ` [PATCH 52/77] sbni: use internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:47   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:47 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:19 -0700

> Convert to use existing net_device_stats.
> This driver,
>       has bad style,
>       	of using commas,
> 	   when brackets should be used...
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 53/77] sbni: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 53/77] sbni: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:47   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:47 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:20 -0700

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

Applied.

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

* Re: [PATCH 54/77] netwave: convert to internal net_device_stats
       [not found]   ` <20090321053716.656878050-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:47     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:47 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:21 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 56/77] strip: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
@ 2009-03-22  5:47   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:47 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:23 -0700

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

Applied.

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

* Re: [PATCH 57/77] wavelan: convert to internal net_device_stats
       [not found]   ` <20090321053716.884788530-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:47     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:47 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: jt-sDzT885Ts8HQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:24 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 58/77] wavelan: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 58/77] wavelan: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:47   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:47 UTC (permalink / raw)
  To: shemminger; +Cc: jt, netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:25 -0700

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

Applied.

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

* Re: [PATCH 59/77] airo: convert to net_device_ops
       [not found]   ` <20090321053717.048069302-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:48     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:48 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:26 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 60/77] atmel: convert to net_device_ops
       [not found]   ` <20090321053717.126155878-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:48     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:48 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:27 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 55/77] netwave: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 55/77] netwave: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:48   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:48 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:22 -0700

> Also get rid of unneeded cast
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats
  2009-03-21 11:08     ` Johannes Berg
@ 2009-03-22  5:49       ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:49 UTC (permalink / raw)
  To: johannes; +Cc: shemminger, j, netdev, linux-wireless

From: Johannes Berg <johannes@sipsolutions.net>
Date: Sat, 21 Mar 2009 12:08:25 +0100

> On Fri, 2009-03-20 at 22:36 -0700, Stephen Hemminger wrote:
> > plain text document attachment (hwsim.patch)
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> > 
> > 
> > --- a/drivers/net/wireless/mac80211_hwsim.c	2009-03-20 21:45:40.802964051 -0700
> > +++ b/drivers/net/wireless/mac80211_hwsim.c	2009-03-20 22:26:02.959027480 -0700
> > @@ -739,10 +739,16 @@ static struct device_driver mac80211_hws
> >  	.name = "mac80211_hwsim"
> >  };
> >  
> > +static const struct net_device_ops hwsim_netdev_ops = {
> 
> this, and a few others I think, have wrong subjects.

I'll fix it up, as needed.

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

* Re: [PATCH 61/77] raylan: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 61/77] raylan: " Stephen Hemminger
@ 2009-03-22  5:53   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger; +Cc: coreythomas, netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:28 -0700

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

Applied.

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

* Re: [PATCH 62/77] wl3501: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 62/77] wl3501: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:53   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger; +Cc: acme, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:29 -0700

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

Applied.

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

* Re: [PATCH 63/77] wl3501: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 63/77] wl3501: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:53   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger; +Cc: acme, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:30 -0700

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

Applied.

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

* Re: [PATCH 64/77] zd1201: convert to internal net_device_stats
       [not found]   ` <20090321053717.440414565-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:53     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: pe1rxq-QXXXXQs8DbXYtjvyW6yDsg, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:31 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 65/77] zd1201: convert to net_device_ops
       [not found]   ` <20090321053717.514936473-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:53     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: pe1rxq-QXXXXQs8DbXYtjvyW6yDsg, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:32 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats
       [not found]   ` <20090321053717.601771143-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
  2009-03-21 11:08     ` Johannes Berg
@ 2009-03-22  5:53     ` David Miller
  1 sibling, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: j, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:33 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 67/77] prism54: convert to net_device_ops
       [not found]   ` <20090321053717.682860987-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:53     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: mcgrof-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:34 -0700

> Also, make ethtool_ops const as it should be, and get rid
> of useless cast.
> 
> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 68/77] prism54: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 68/77] prism54: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:53   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:53 UTC (permalink / raw)
  To: shemminger; +Cc: mcgrof, netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:35 -0700

> Also, make ethtool_ops const as it should be, and get rid
> of useless cast.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 69/77] libertas: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 69/77] libertas: " Stephen Hemminger
@ 2009-03-22  5:54   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:54 UTC (permalink / raw)
  To: shemminger; +Cc: dcbw, netdev, libertas-dev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:36 -0700

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

Applied.

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

* Re: [PATCH 70/77] libertas: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 70/77] libertas: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:54   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:54 UTC (permalink / raw)
  To: shemminger; +Cc: dcbw, netdev, libertas-dev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:37 -0700

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

Applied.

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

* Re: [PATCH 71/77] ipw2x00: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 71/77] ipw2x00: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:56   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:56 UTC (permalink / raw)
  To: shemminger; +Cc: jkosina, dstreba, netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:38 -0700

> Replace struct in ieee with current net_device_stats, so no longer
> need get_stats hook
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops
  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
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:56 UTC (permalink / raw)
  To: shemminger; +Cc: jkosina, dstreba, netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:39 -0700

> Expose routines so drivers can hook. Only set ptrs in netdev
> if using old compat code.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 73/77] ipw2100: convert to net_device_ops
       [not found]   ` <20090321053718.145743314-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:57     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:57 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: jkosina-AlSwsSmVLrQ, dstreba-AlSwsSmVLrQ,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:40 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 74/77] ipw2200: convert to net_device_ops
       [not found]   ` <20090321053718.224939952-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
@ 2009-03-22  5:57     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:57 UTC (permalink / raw)
  To: shemminger-ZtmgI6mnKB3QT0dZR+AlfA
  Cc: jkosina-AlSwsSmVLrQ, dstreba-AlSwsSmVLrQ,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
Date: Fri, 20 Mar 2009 22:36:41 -0700

> Signed-off-by: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 75/77] hostap: convert to internal net_device_stats
  2009-03-21  5:36 ` [PATCH 75/77] hostap: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22  5:57   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:57 UTC (permalink / raw)
  To: shemminger; +Cc: j, netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:42 -0700

> Use pre-existing net_device_stats in network_device struct.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 76/77] hostap: convert to net_device_ops
  2009-03-21  5:36 ` [PATCH 76/77] hostap: convert to net_device_ops Stephen Hemminger
@ 2009-03-22  5:57   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:57 UTC (permalink / raw)
  To: shemminger; +Cc: j, netdev, linux-wireless

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:43 -0700

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

Applied.

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

* Re: [PATCH 77/77] netdev: expose net_device_ops compat as config option
  2009-03-21  5:36 ` [PATCH 77/77] netdev: expose net_device_ops compat as config option Stephen Hemminger
@ 2009-03-22  5:57   ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-22  5:57 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:44 -0700

> Now that most network device drivers in (all but one in x86_64 allmodconfig)
> support net_device_ops. Expose it as a configuration parameter. Still
> need to address even older 32 bit drivers, and other arch before
> compatiablity can be scheduled for removal in some future release.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [ofa-general] [PATCH 03/77] infiniband: convert c2 to net_device_ops
  2009-03-21  5:35 ` [ofa-general] [PATCH 03/77] infiniband: convert c2 " Stephen Hemminger
  2009-03-21 18:26   ` [ofa-general] " Steve Wise
  2009-03-22  2:34   ` David Miller
@ 2009-03-22 16:12   ` Roland Dreier
  2009-03-23  4:17     ` David Miller
  2 siblings, 1 reply; 197+ messages in thread
From: Roland Dreier @ 2009-03-22 16:12 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, general, David Miller

Don't I already have this queued in my for-next branch?

Or is this an updated version?

[And same applies to the nes driver changes]

 - R.

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

* Re: [ofa-general] [PATCH 03/77] infiniband: convert c2 to net_device_ops
  2009-03-22 16:12   ` [ofa-general] " Roland Dreier
@ 2009-03-23  4:17     ` David Miller
  0 siblings, 0 replies; 197+ messages in thread
From: David Miller @ 2009-03-23  4:17 UTC (permalink / raw)
  To: rdreier; +Cc: netdev, shemminger, general

From: Roland Dreier <rdreier@cisco.com>
Date: Sun, 22 Mar 2009 09:12:57 -0700

> Don't I already have this queued in my for-next branch?
> 
> Or is this an updated version?
> 
> [And same applies to the nes driver changes]

Any chance you can drop the copies in your tree?

The reason I'm asking is that once all the conversions are in
net-next-2.6 which hit the i386 allmodconfig build there is a change
we can add (which in fast is in net-next-2.6 now) which exposes a
config option to turn all of the pre-netdev_ops compatibility stuff
off.

We can't do that until i386 builds in all configurations.

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

* Re: [PATCH 24/77] usbnet: convert rtl driver to net_device_ops
  2009-03-21  9:03   ` David Brownell
@ 2009-03-23  9:17     ` Petko Manolov
  0 siblings, 0 replies; 197+ messages in thread
From: Petko Manolov @ 2009-03-23  9:17 UTC (permalink / raw)
  To: David Brownell; +Cc: Stephen Hemminger, David Miller, netdev, Petko Manolov

ACK :-)


cheers,
Petko



On Sat, 21 Mar 2009, David Brownell wrote:

> On Friday 20 March 2009, Stephen Hemminger wrote:
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> cc'd the maintainer ... by the way, note that
> "usbnet" != "everything in drivers/net/usb" ...
>
>
>> --- a/drivers/net/usb/rtl8150.c	2009-03-20 12:12:47.085715442 -0700
>> +++ b/drivers/net/usb/rtl8150.c	2009-03-20 12:13:41.757841762 -0700
>> @@ -891,6 +891,19 @@ static int rtl8150_ioctl(struct net_devi
>>  	return res;
>>  }
>>
>> +static const struct net_device_ops rtl8150_netdev_ops = {
>> +	.ndo_open		= rtl8150_open,
>> +	.ndo_stop		= rtl8150_close,
>> +	.ndo_do_ioctl		= rtl8150_ioctl,
>> +	.ndo_start_xmit		= rtl8150_start_xmit,
>> +	.ndo_tx_timeout 	= rtl8150_tx_timeout,
>> +	.ndo_set_multicast_list = rtl8150_set_multicast,
>> +	.ndo_set_mac_address	= rtl8150_set_mac_address,
>> +
>> +	.ndo_change_mtu		= eth_change_mtu,
>> +	.ndo_validate_addr	= eth_validate_addr,
>> +};
>> +
>>  static int rtl8150_probe(struct usb_interface *intf,
>>  			 const struct usb_device_id *id)
>>  {
>> @@ -917,15 +930,8 @@ static int rtl8150_probe(struct usb_inte
>>
>>  	dev->udev = udev;
>>  	dev->netdev = netdev;
>> -	netdev->open = rtl8150_open;
>> -	netdev->stop = rtl8150_close;
>> -	netdev->do_ioctl = rtl8150_ioctl;
>> +	netdev->netdev_ops = &rtl8150_netdev_ops;
>>  	netdev->watchdog_timeo = RTL8150_TX_TIMEOUT;
>> -	netdev->tx_timeout = rtl8150_tx_timeout;
>> -	netdev->hard_start_xmit = rtl8150_start_xmit;
>> -	netdev->set_multicast_list = rtl8150_set_multicast;
>> -	netdev->set_mac_address = rtl8150_set_mac_address;
>> -
>>  	SET_ETHTOOL_OPS(netdev, &ops);
>>  	dev->intr_interval = 100;	/* 100ms */
>>
>>
>> --
>>
>>
>
>
>

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

* Re: [PATCH 06/77] irda: net_device_ops ioctl fix
  2009-03-21  5:35 ` [PATCH 06/77] irda: net_device_ops ioctl fix Stephen Hemminger
  2009-03-22  2:34   ` David Miller
@ 2009-03-23 11:33   ` Samuel Ortiz
  2009-03-23 11:33   ` Samuel Ortiz
  2 siblings, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

Thanks Stephen...

On Fri, Mar 20, 2009 at 10:35:33PM -0700, Stephen Hemminger wrote:
> Need to reference net_device_ops not old pointer.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>
 
> 
> ---
>  net/irda/irda_device.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- a/net/irda/irda_device.c	2009-03-19 22:40:30.469964248 -0700
> +++ b/net/irda/irda_device.c	2009-03-19 22:42:44.867089916 -0700
> @@ -149,13 +149,14 @@ int irda_device_is_receiving(struct net_
>  
>  	IRDA_DEBUG(2, "%s()\n", __func__);
>  
> -	if (!dev->do_ioctl) {
> +	if (!dev->netdev_ops->ndo_do_ioctl) {
>  		IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
>  			   __func__);
>  		return -1;
>  	}
>  
> -	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCGRECEIVING);
> +	ret = (dev->netdev_ops->ndo_do_ioctl)(dev, (struct ifreq *) &req,
> +					      SIOCGRECEIVING);
>  	if (ret < 0)
>  		return ret;
>  
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 06/77] irda: net_device_ops ioctl fix
  2009-03-21  5:35 ` [PATCH 06/77] irda: net_device_ops ioctl fix Stephen Hemminger
  2009-03-22  2:34   ` David Miller
  2009-03-23 11:33   ` Samuel Ortiz
@ 2009-03-23 11:33   ` Samuel Ortiz
  2 siblings, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:33PM -0700, Stephen Hemminger wrote:
> Need to reference net_device_ops not old pointer.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> 
> ---
>  net/irda/irda_device.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- a/net/irda/irda_device.c	2009-03-19 22:40:30.469964248 -0700
> +++ b/net/irda/irda_device.c	2009-03-19 22:42:44.867089916 -0700
> @@ -149,13 +149,14 @@ int irda_device_is_receiving(struct net_
>  
>  	IRDA_DEBUG(2, "%s()\n", __func__);
>  
> -	if (!dev->do_ioctl) {
> +	if (!dev->netdev_ops->ndo_do_ioctl) {
>  		IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
>  			   __func__);
>  		return -1;
>  	}
>  
> -	ret = dev->do_ioctl(dev, (struct ifreq *) &req, SIOCGRECEIVING);
> +	ret = (dev->netdev_ops->ndo_do_ioctl)(dev, (struct ifreq *) &req,
> +					      SIOCGRECEIVING);
>  	if (ret < 0)
>  		return ret;
>  
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 07/77] irlan: convert to net_device_ops
  2009-03-21  5:35 ` [PATCH 07/77] irlan: convert to net_device_ops Stephen Hemminger
  2009-03-22  2:34   ` David Miller
@ 2009-03-23 11:33   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:34PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> ---
>  net/irda/irlan/irlan_eth.c |   19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> --- a/net/irda/irlan/irlan_eth.c	2009-03-19 22:40:30.449963919 -0700
> +++ b/net/irda/irlan/irlan_eth.c	2009-03-19 22:42:45.749902310 -0700
> @@ -45,6 +45,16 @@ static int  irlan_eth_xmit(struct sk_buf
>  static void irlan_eth_set_multicast_list( struct net_device *dev);
>  static struct net_device_stats *irlan_eth_get_stats(struct net_device *dev);
>  
> +static const struct net_device_ops irlan_eth_netdev_ops = {
> +	.ndo_open               = irlan_eth_open,
> +	.ndo_stop               = irlan_eth_close,
> +	.ndo_start_xmit    	= irlan_eth_xmit,
> +	.ndo_get_stats	        = irlan_eth_get_stats,
> +	.ndo_set_multicast_list = irlan_eth_set_multicast_list,
> +	.ndo_change_mtu		= eth_change_mtu,
> +	.ndo_validate_addr	= eth_validate_addr,
> +};
> +
>  /*
>   * Function irlan_eth_setup (dev)
>   *
> @@ -53,14 +63,11 @@ static struct net_device_stats *irlan_et
>   */
>  static void irlan_eth_setup(struct net_device *dev)
>  {
> -	dev->open               = irlan_eth_open;
> -	dev->stop               = irlan_eth_close;
> -	dev->hard_start_xmit    = irlan_eth_xmit;
> -	dev->get_stats	        = irlan_eth_get_stats;
> -	dev->set_multicast_list = irlan_eth_set_multicast_list;
> +	ether_setup(dev);
> +
> +	dev->netdev_ops		= &irlan_eth_netdev_ops;
>  	dev->destructor		= free_netdev;
>  
> -	ether_setup(dev);
>  
>  	/*
>  	 * Lets do all queueing in IrTTP instead of this device driver.
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 08/77] irda: convert irda_usb to net_device_ops
  2009-03-21  5:35 ` [PATCH 08/77] irda: convert irda_usb " Stephen Hemminger
  2009-03-22  2:34   ` David Miller
@ 2009-03-23 11:34   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:35PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> 
> ---
>  drivers/net/irda/irda-usb.c |   18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> --- a/drivers/net/irda/irda-usb.c	2009-03-19 22:40:30.429651929 -0700
> +++ b/drivers/net/irda/irda-usb.c	2009-03-19 22:42:46.433089198 -0700
> @@ -1401,6 +1401,14 @@ static inline void irda_usb_init_qos(str
>  }
>  
>  /*------------------------------------------------------------------*/
> +static const struct net_device_ops irda_usb_netdev_ops = {
> +	.ndo_open       = irda_usb_net_open,
> +	.ndo_stop       = irda_usb_net_close,
> +	.ndo_do_ioctl   = irda_usb_net_ioctl,
> +	.ndo_start_xmit = irda_usb_hard_xmit,
> +	.ndo_tx_timeout	= irda_usb_net_timeout,
> +};
> +
>  /*
>   * Initialise the network side of the irda-usb instance
>   * Called when a new USB instance is registered in irda_usb_probe()
> @@ -1411,15 +1419,9 @@ static inline int irda_usb_open(struct i
>  
>  	IRDA_DEBUG(1, "%s()\n", __func__);
>  
> -	irda_usb_init_qos(self);
> +	netdev->netdev_ops = &irda_usb_netdev_ops;
>  
> -	/* Override the network functions we need to use */
> -	netdev->hard_start_xmit = irda_usb_hard_xmit;
> -	netdev->tx_timeout	= irda_usb_net_timeout;
> -	netdev->watchdog_timeo  = 250*HZ/1000;	/* 250 ms > USB timeout */
> -	netdev->open            = irda_usb_net_open;
> -	netdev->stop            = irda_usb_net_close;
> -	netdev->do_ioctl        = irda_usb_net_ioctl;
> +	irda_usb_init_qos(self);
>  
>  	return register_netdev(netdev);
>  }
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 09/77] irda: convert mcs driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 09/77] irda: convert mcs driver " Stephen Hemminger
  2009-03-22  2:34   ` David Miller
@ 2009-03-23 11:34   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:36PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> ---
>  drivers/net/irda/mcs7780.c |   13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> --- a/drivers/net/irda/mcs7780.c	2009-03-19 22:40:30.408964174 -0700
> +++ b/drivers/net/irda/mcs7780.c	2009-03-19 22:42:47.157714010 -0700
> @@ -873,6 +873,13 @@ static int mcs_hard_xmit(struct sk_buff 
>  	return ret;
>  }
>  
> +static const struct net_device_ops mcs_netdev_ops = {
> +	.ndo_open = mcs_net_open,
> +	.ndo_stop = mcs_net_close,
> +	.ndo_start_xmit = mcs_hard_xmit,
> +	.ndo_do_ioctl = mcs_net_ioctl,
> +};
> +
>  /*
>   * This function is called by the USB subsystem for each new device in the
>   * system.  Need to verify the device and if it is, then start handling it.
> @@ -919,11 +926,7 @@ static int mcs_probe(struct usb_interfac
>  	/* Speed change work initialisation*/
>  	INIT_WORK(&mcs->work, mcs_speed_work);
>  
> -	/* Override the network functions we need to use */
> -	ndev->hard_start_xmit = mcs_hard_xmit;
> -	ndev->open = mcs_net_open;
> -	ndev->stop = mcs_net_close;
> -	ndev->do_ioctl = mcs_net_ioctl;
> +	ndev->netdev_ops = &mcs_netdev_ops;
>  
>  	if (!intf->cur_altsetting)
>  		goto error2;
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 10/77] stir4200: convert to net_device_ops
  2009-03-21  5:35 ` [PATCH 10/77] stir4200: convert " Stephen Hemminger
  2009-03-22  2:34   ` David Miller
@ 2009-03-23 11:34   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:37PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> --- a/drivers/net/irda/stir4200.c	2009-03-19 22:40:30.388964511 -0700
> +++ b/drivers/net/irda/stir4200.c	2009-03-19 22:42:47.828091113 -0700
> @@ -1007,6 +1007,13 @@ static int stir_net_ioctl(struct net_dev
>  	return ret;
>  }
>  
> +static const struct net_device_ops stir_netdev_ops = {
> +	.ndo_open       = stir_net_open,
> +	.ndo_stop       = stir_net_close,
> +	.ndo_start_xmit = stir_hard_xmit,
> +	.ndo_do_ioctl   = stir_net_ioctl,
> +};
> +
>  /*
>   * This routine is called by the USB subsystem for each new device
>   * in the system. We need to check if the device is ours, and in
> @@ -1054,10 +1061,7 @@ static int stir_probe(struct usb_interfa
>  	irda_qos_bits_to_value(&stir->qos);
>  
>  	/* Override the network functions we need to use */
> -	net->hard_start_xmit = stir_hard_xmit;
> -	net->open            = stir_net_open;
> -	net->stop            = stir_net_close;
> -	net->do_ioctl        = stir_net_ioctl;
> +	net->netdev_ops = &stir_netdev_ops;
>  
>  	ret = register_netdev(net);
>  	if (ret != 0)
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 11/77] irda: convert w83977af_ir to net_device_ops
  2009-03-21  5:35 ` [PATCH 11/77] irda: convert w83977af_ir " Stephen Hemminger
  2009-03-22  2:36   ` David Miller
@ 2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:38PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> --- a/drivers/net/irda/w83977af_ir.c	2009-03-19 22:40:30.367964328 -0700
> +++ b/drivers/net/irda/w83977af_ir.c	2009-03-19 22:42:48.582901908 -0700
> @@ -140,6 +140,13 @@ static void __exit w83977af_cleanup(void
>  	}
>  }
>  
> +static const struct net_device_ops w83977_netdev_ops = {
> +	.ndo_open       = w83977af_net_open,
> +	.ndo_stop       = w83977af_net_close,
> +	.ndo_start_xmit = w83977af_hard_xmit,
> +	.ndo_do_ioctl   = w83977af_net_ioctl,
> +};
> +
>  /*
>   * Function w83977af_open (iobase, irq)
>   *
> @@ -231,11 +238,7 @@ static int w83977af_open(int i, unsigned
>  	self->rx_buff.data = self->rx_buff.head;
>  	self->netdev = dev;
>  
> -	/* Override the network functions we need to use */
> -	dev->hard_start_xmit = w83977af_hard_xmit;
> -	dev->open            = w83977af_net_open;
> -	dev->stop            = w83977af_net_close;
> -	dev->do_ioctl        = w83977af_net_ioctl;
> +	dev->netdev_ops	= &w83977_netdev_ops;
>  
>  	err = register_netdev(dev);
>  	if (err) {
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 12/77] irda: convert nsc_ircc driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 12/77] irda: convert nsc_ircc driver " Stephen Hemminger
  2009-03-22  2:36   ` David Miller
@ 2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:39PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> --- a/drivers/net/irda/nsc-ircc.c	2009-03-19 22:40:30.326964540 -0700
> +++ b/drivers/net/irda/nsc-ircc.c	2009-03-19 22:42:49.228901973 -0700
> @@ -331,6 +331,20 @@ static void __exit nsc_ircc_cleanup(void
>  	pnp_registered = 0;
>  }
>  
> +static const struct net_device_ops nsc_ircc_sir_ops = {
> +	.ndo_open       = nsc_ircc_net_open,
> +	.ndo_stop       = nsc_ircc_net_close,
> +	.ndo_start_xmit = nsc_ircc_hard_xmit_sir,
> +	.ndo_do_ioctl   = nsc_ircc_net_ioctl,
> +};
> +
> +static const struct net_device_ops nsc_ircc_fir_ops = {
> +	.ndo_open       = nsc_ircc_net_open,
> +	.ndo_stop       = nsc_ircc_net_close,
> +	.ndo_start_xmit = nsc_ircc_hard_xmit_fir,
> +	.ndo_do_ioctl   = nsc_ircc_net_ioctl,
> +};
> +
>  /*
>   * Function nsc_ircc_open (iobase, irq)
>   *
> @@ -441,10 +455,7 @@ static int __init nsc_ircc_open(chipio_t
>  	self->tx_fifo.tail = self->tx_buff.head;
>  
>  	/* Override the network functions we need to use */
> -	dev->hard_start_xmit = nsc_ircc_hard_xmit_sir;
> -	dev->open            = nsc_ircc_net_open;
> -	dev->stop            = nsc_ircc_net_close;
> -	dev->do_ioctl        = nsc_ircc_net_ioctl;
> +	dev->netdev_ops = &nsc_ircc_sir_ops;
>  
>  	err = register_netdev(dev);
>  	if (err) {
> @@ -1320,12 +1331,12 @@ static __u8 nsc_ircc_change_speed(struct
>  	switch_bank(iobase, BANK0); 
>  	if (speed > 115200) {
>  		/* Install FIR xmit handler */
> -		dev->hard_start_xmit = nsc_ircc_hard_xmit_fir;
> +		dev->netdev_ops = &nsc_ircc_fir_ops;
>  		ier = IER_SFIF_IE;
>  		nsc_ircc_dma_receive(self);
>  	} else {
>  		/* Install SIR xmit handler */
> -		dev->hard_start_xmit = nsc_ircc_hard_xmit_sir;
> +		dev->netdev_ops = &nsc_ircc_sir_ops;
>  		ier = IER_RXHDL_IE;
>  	}
>  	/* Set our current interrupt mask */
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 13/77] irda: convert ali driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 13/77] irda: convert ali " Stephen Hemminger
  2009-03-22  2:36   ` David Miller
@ 2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:40PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> ---
>  drivers/net/irda/ali-ircc.c |   23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 
> --- a/drivers/net/irda/ali-ircc.c	2009-03-19 22:40:30.305965477 -0700
> +++ b/drivers/net/irda/ali-ircc.c	2009-03-19 22:42:49.992901415 -0700
> @@ -259,6 +259,20 @@ static void __exit ali_ircc_cleanup(void
>  	IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
>  }
>  
> +static const struct net_device_ops ali_ircc_sir_ops = {
> +	.ndo_open       = ali_ircc_net_open,
> +	.ndo_stop       = ali_ircc_net_close,
> +	.ndo_start_xmit = ali_ircc_sir_hard_xmit,
> +	.ndo_do_ioctl   = ali_ircc_net_ioctl,
> +};
> +
> +static const struct net_device_ops ali_ircc_fir_ops = {
> +	.ndo_open       = ali_ircc_net_open,
> +	.ndo_stop       = ali_ircc_net_close,
> +	.ndo_start_xmit = ali_ircc_fir_hard_xmit,
> +	.ndo_do_ioctl   = ali_ircc_net_ioctl,
> +};
> +
>  /*
>   * Function ali_ircc_open (int i, chipio_t *inf)
>   *
> @@ -361,10 +375,7 @@ static int ali_ircc_open(int i, chipio_t
>  	self->tx_fifo.tail = self->tx_buff.head;
>  
>  	/* Override the network functions we need to use */
> -	dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
> -	dev->open            = ali_ircc_net_open;
> -	dev->stop            = ali_ircc_net_close;
> -	dev->do_ioctl        = ali_ircc_net_ioctl;
> +	dev->netdev_ops = &ali_ircc_sir_ops;
>  
>  	err = register_netdev(dev);
>  	if (err) {
> @@ -974,7 +985,7 @@ static void ali_ircc_change_speed(struct
>  		ali_ircc_fir_change_speed(self, baud);			
>  		
>  		/* Install FIR xmit handler*/
> -		dev->hard_start_xmit = ali_ircc_fir_hard_xmit;		
> +		dev->netdev_ops = &ali_ircc_fir_ops;
>  				
>  		/* Enable Interuupt */
>  		self->ier = IER_EOM; // benjamin 2000/11/20 07:24PM					
> @@ -988,7 +999,7 @@ static void ali_ircc_change_speed(struct
>  		ali_ircc_sir_change_speed(self, baud);
>  				
>  		/* Install SIR xmit handler*/
> -		dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
> +		dev->netdev_ops = &ali_ircc_sir_ops;
>  	}
>  	
>  		
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 14/77] irda: convert vlsi driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 14/77] irda: convert vlsi " Stephen Hemminger
  2009-03-22  2:36   ` David Miller
@ 2009-03-23 11:35   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:41PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> 
> ---
>  drivers/net/irda/vlsi_ir.c |   14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> --- a/drivers/net/irda/vlsi_ir.c	2009-03-19 22:40:30.270902366 -0700
> +++ b/drivers/net/irda/vlsi_ir.c	2009-03-19 22:42:50.764027628 -0700
> @@ -1573,6 +1573,14 @@ static int vlsi_close(struct net_device 
>  	return 0;
>  }
>  
> +static const struct net_device_ops vlsi_netdev_ops = {
> +	.ndo_open       = vlsi_open,
> +	.ndo_stop       = vlsi_close,
> +	.ndo_start_xmit = vlsi_hard_start_xmit,
> +	.ndo_do_ioctl   = vlsi_ioctl,
> +	.ndo_tx_timeout = vlsi_tx_timeout,
> +};
> +
>  static int vlsi_irda_init(struct net_device *ndev)
>  {
>  	vlsi_irda_dev_t *idev = netdev_priv(ndev);
> @@ -1608,11 +1616,7 @@ static int vlsi_irda_init(struct net_dev
>  	ndev->flags |= IFF_PORTSEL | IFF_AUTOMEDIA;
>  	ndev->if_port = IF_PORT_UNKNOWN;
>   
> -	ndev->open	      = vlsi_open;
> -	ndev->stop	      = vlsi_close;
> -	ndev->hard_start_xmit = vlsi_hard_start_xmit;
> -	ndev->do_ioctl	      = vlsi_ioctl;
> -	ndev->tx_timeout      = vlsi_tx_timeout;
> +	ndev->netdev_ops = &vlsi_netdev_ops;
>  	ndev->watchdog_timeo  = 500*HZ/1000;	/* max. allowed turn time for IrLAP */
>  
>  	SET_NETDEV_DEV(ndev, &pdev->dev);
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 15/77] irda: convert smsc driver to net_device_ops
  2009-03-21  5:35 ` [PATCH 15/77] irda: convert smsc " Stephen Hemminger
  2009-03-22  2:36   ` David Miller
@ 2009-03-23 11:36   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:42PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> 
> ---
>  drivers/net/irda/smsc-ircc2.c |   33 +++++++++++++++++++++------------
>  1 file changed, 21 insertions(+), 12 deletions(-)
> 
> --- a/drivers/net/irda/smsc-ircc2.c	2009-03-20 12:00:24.525964199 -0700
> +++ b/drivers/net/irda/smsc-ircc2.c	2009-03-20 12:04:46.972777223 -0700
> @@ -486,6 +486,26 @@ static int __init smsc_ircc_init(void)
>  	return ret;
>  }
>  
> +static int smsc_ircc_net_xmit(struct sk_buff *skb, struct net_device *dev)
> +{
> +	struct smsc_ircc_cb *self = netdev_priv(dev);
> +
> +	if (self->io.speed > 115200)
> +		return 	smsc_ircc_hard_xmit_fir(skb, dev);
> +	else
> +		return 	smsc_ircc_hard_xmit_sir(skb, dev);
> +}
> +
> +static const struct net_device_ops smsc_ircc_netdev_ops = {
> +	.ndo_open       = smsc_ircc_net_open,
> +	.ndo_stop       = smsc_ircc_net_close,
> +	.ndo_do_ioctl   = smsc_ircc_net_ioctl,
> +	.ndo_start_xmit = smsc_ircc_net_xmit,
> +#if SMSC_IRCC2_C_NET_TIMEOUT
> +	.ndo_tx_timeout	= smsc_ircc_timeout,
> +#endif
> +};
> +
>  /*
>   * Function smsc_ircc_open (firbase, sirbase, dma, irq)
>   *
> @@ -519,14 +539,10 @@ static int __init smsc_ircc_open(unsigne
>  		goto err_out1;
>  	}
>  
> -	dev->hard_start_xmit = smsc_ircc_hard_xmit_sir;
>  #if SMSC_IRCC2_C_NET_TIMEOUT
> -	dev->tx_timeout	     = smsc_ircc_timeout;
>  	dev->watchdog_timeo  = HZ * 2;  /* Allow enough time for speed change */
>  #endif
> -	dev->open            = smsc_ircc_net_open;
> -	dev->stop            = smsc_ircc_net_close;
> -	dev->do_ioctl        = smsc_ircc_net_ioctl;
> +	dev->netdev_ops = &smsc_ircc_netdev_ops;
>  
>  	self = netdev_priv(dev);
>  	self->netdev = dev;
> @@ -995,9 +1011,6 @@ static void smsc_ircc_fir_start(struct s
>  
>  	/* Reset everything */
>  
> -	/* Install FIR transmit handler */
> -	dev->hard_start_xmit = smsc_ircc_hard_xmit_fir;
> -
>  	/* Clear FIFO */
>  	outb(inb(fir_base + IRCC_LCR_A) | IRCC_LCR_A_FIFO_RESET, fir_base + IRCC_LCR_A);
>  
> @@ -1894,7 +1907,6 @@ static void smsc_ircc_sir_start(struct s
>  	IRDA_ASSERT(self != NULL, return;);
>  	dev = self->netdev;
>  	IRDA_ASSERT(dev != NULL, return;);
> -	dev->hard_start_xmit = &smsc_ircc_hard_xmit_sir;
>  
>  	fir_base = self->io.fir_base;
>  	sir_base = self->io.sir_base;
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 16/77] irda: convert via-ircc to net_device_ops
  2009-03-21  5:35 ` [PATCH 16/77] irda: convert via-ircc " Stephen Hemminger
  2009-03-22  2:36   ` David Miller
@ 2009-03-23 11:36   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:43PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> 
> ---
>  drivers/net/irda/via-ircc.c |   22 ++++++++++++++++------
>  1 file changed, 16 insertions(+), 6 deletions(-)
> 
> --- a/drivers/net/irda/via-ircc.c	2009-03-19 22:44:21.282901713 -0700
> +++ b/drivers/net/irda/via-ircc.c	2009-03-19 22:46:36.823964988 -0700
> @@ -310,6 +310,19 @@ static void __exit via_ircc_cleanup(void
>  	pci_unregister_driver (&via_driver); 
>  }
>  
> +static const struct net_device_ops via_ircc_sir_ops = {
> +	.ndo_start_xmit = via_ircc_hard_xmit_sir,
> +	.ndo_open = via_ircc_net_open,
> +	.ndo_stop = via_ircc_net_close,
> +	.ndo_do_ioctl = via_ircc_net_ioctl,
> +};
> +static const struct net_device_ops via_ircc_fir_ops = {
> +	.ndo_start_xmit = via_ircc_hard_xmit_fir,
> +	.ndo_open = via_ircc_net_open,
> +	.ndo_stop = via_ircc_net_close,
> +	.ndo_do_ioctl = via_ircc_net_ioctl,
> +};
> +
>  /*
>   * Function via_ircc_open (iobase, irq)
>   *
> @@ -428,10 +441,7 @@ static __devinit int via_ircc_open(int i
>  	self->tx_fifo.tail = self->tx_buff.head;
>  
>  	/* Override the network functions we need to use */
> -	dev->hard_start_xmit = via_ircc_hard_xmit_sir;
> -	dev->open = via_ircc_net_open;
> -	dev->stop = via_ircc_net_close;
> -	dev->do_ioctl = via_ircc_net_ioctl;
> +	dev->netdev_ops = &via_ircc_sir_ops;
>  
>  	err = register_netdev(dev);
>  	if (err)
> @@ -798,11 +808,11 @@ static void via_ircc_change_speed(struct
>  
>  	if (speed > 115200) {
>  		/* Install FIR xmit handler */
> -		dev->hard_start_xmit = via_ircc_hard_xmit_fir;
> +		dev->netdev_ops = &via_ircc_fir_ops;
>  		via_ircc_dma_receive(self);
>  	} else {
>  		/* Install SIR xmit handler */
> -		dev->hard_start_xmit = via_ircc_hard_xmit_sir;
> +		dev->netdev_ops = &via_ircc_sir_ops;
>  	}
>  	netif_wake_queue(dev);
>  }
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 17/77] irda: convert sir device to net_device_ops
  2009-03-21  5:35 ` [PATCH 17/77] irda: convert sir device " Stephen Hemminger
  2009-03-22  2:36   ` David Miller
@ 2009-03-23 11:36   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:44PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> 
> --- a/drivers/net/irda/sir_dev.c	2009-03-19 22:52:52.826089334 -0700
> +++ b/drivers/net/irda/sir_dev.c	2009-03-19 23:09:32.268774083 -0700
> @@ -865,6 +865,12 @@ out:
>  	return 0;
>  }
>  
> +static const struct net_device_ops sirdev_ops = {
> +	.ndo_start_xmit	= sirdev_hard_xmit,
> +	.ndo_open	= sirdev_open,
> +	.ndo_stop	= sirdev_close,
> +	.ndo_do_ioctl	= sirdev_ioctl,
> +};
>  /* ----------------------------------------------------------------------------- */
>  
>  struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name)
> @@ -908,10 +914,7 @@ struct sir_dev * sirdev_get_instance(con
>  	dev->netdev = ndev;
>  
>  	/* Override the network functions we need to use */
> -	ndev->hard_start_xmit = sirdev_hard_xmit;
> -	ndev->open = sirdev_open;
> -	ndev->stop = sirdev_close;
> -	ndev->do_ioctl = sirdev_ioctl;
> +	ndev->netdev_ops = &sirdev_ops;
>  
>  	if (register_netdev(ndev)) {
>  		IRDA_ERROR("%s(), register_netdev() failed!\n", __func__);
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 18/77] irda: convert kignsun device to net_device_ops
  2009-03-21  5:35 ` [PATCH 18/77] irda: convert kignsun " Stephen Hemminger
  2009-03-22  2:37   ` David Miller
@ 2009-03-23 11:37   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:37 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:45PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> --- a/drivers/net/irda/kingsun-sir.c	2009-03-19 22:49:39.434901885 -0700
> +++ b/drivers/net/irda/kingsun-sir.c	2009-03-19 22:52:44.909902552 -0700
> @@ -418,6 +418,12 @@ static int kingsun_net_ioctl(struct net_
>  	return ret;
>  }
>  
> +static const struct net_device_ops kingsun_ops = {
> +	.ndo_start_xmit = kingsun_hard_xmit,
> +	.ndo_open            = kingsun_net_open,
> +	.ndo_stop            = kingsun_net_close,
> +	.ndo_do_ioctl        = kingsun_net_ioctl,
> +};
>  
>  /*
>   * This routine is called by the USB subsystem for each new device
> @@ -520,10 +526,7 @@ static int kingsun_probe(struct usb_inte
>  	irda_qos_bits_to_value(&kingsun->qos);
>  
>  	/* Override the network functions we need to use */
> -	net->hard_start_xmit = kingsun_hard_xmit;
> -	net->open            = kingsun_net_open;
> -	net->stop            = kingsun_net_close;
> -	net->do_ioctl        = kingsun_net_ioctl;
> +	net->netdev_ops = &kingsun_ops;
>  
>  	ret = register_netdev(net);
>  	if (ret != 0)
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 19/77] irda: convert ksdazzle device to net_device_ops
  2009-03-21  5:35 ` [PATCH 19/77] irda: convert ksdazzle " Stephen Hemminger
  2009-03-22  2:37   ` David Miller
@ 2009-03-23 11:37   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:37 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:46PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> --- a/drivers/net/irda/ksdazzle-sir.c	2009-03-19 22:52:37.149901612 -0700
> +++ b/drivers/net/irda/ksdazzle-sir.c	2009-03-19 23:08:49.416839813 -0700
> @@ -562,6 +562,13 @@ static int ksdazzle_net_ioctl(struct net
>  	return ret;
>  }
>  
> +static const struct net_device_ops ksdazzle_ops = {
> +	.ndo_start_xmit	= ksdazzle_hard_xmit,
> +	.ndo_open	= ksdazzle_net_open,
> +	.ndo_stop	= ksdazzle_net_close,
> +	.ndo_do_ioctl	= ksdazzle_net_ioctl,
> +};
> +
>  /*
>   * This routine is called by the USB subsystem for each new device
>   * in the system. We need to check if the device is ours, and in
> @@ -684,10 +691,7 @@ static int ksdazzle_probe(struct usb_int
>  	irda_qos_bits_to_value(&kingsun->qos);
>  
>  	/* Override the network functions we need to use */
> -	net->hard_start_xmit = ksdazzle_hard_xmit;
> -	net->open = ksdazzle_net_open;
> -	net->stop = ksdazzle_net_close;
> -	net->do_ioctl = ksdazzle_net_ioctl;
> +	net->netdev_ops = &ksdazzle_ops;
>  
>  	ret = register_netdev(net);
>  	if (ret != 0)
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 20/77] irda: convert ks959 device to net_device_ops
  2009-03-21  5:35 ` [PATCH 20/77] irda: convert ks959 " Stephen Hemminger
  2009-03-22  2:37   ` David Miller
@ 2009-03-23 11:37   ` Samuel Ortiz
  1 sibling, 0 replies; 197+ messages in thread
From: Samuel Ortiz @ 2009-03-23 11:37 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Fri, Mar 20, 2009 at 10:35:47PM -0700, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Samuel Ortiz <samuel@sortiz.org>

> 
> --- a/drivers/net/irda/ks959-sir.c	2009-03-19 23:10:00.793089980 -0700
> +++ b/drivers/net/irda/ks959-sir.c	2009-03-19 23:11:27.344651666 -0700
> @@ -668,6 +668,12 @@ static int ks959_net_ioctl(struct net_de
>  	return ret;
>  }
>  
> +static const struct net_device_ops ks959_ops = {
> +	.ndo_start_xmit	= ks959_hard_xmit,
> +	.ndo_open	= ks959_net_open,
> +	.ndo_stop	= ks959_net_close,
> +	.ndo_do_ioctl	= ks959_net_ioctl,
> +};
>  /*
>   * This routine is called by the USB subsystem for each new device
>   * in the system. We need to check if the device is ours, and in
> @@ -780,10 +786,7 @@ static int ks959_probe(struct usb_interf
>  	irda_qos_bits_to_value(&kingsun->qos);
>  
>  	/* Override the network functions we need to use */
> -	net->hard_start_xmit = ks959_hard_xmit;
> -	net->open = ks959_net_open;
> -	net->stop = ks959_net_close;
> -	net->do_ioctl = ks959_net_ioctl;
> +	net->netdev_ops = &ks959_ops;
>  
>  	ret = register_netdev(net);
>  	if (ret != 0)
> 
> -- 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

end of thread, other threads:[~2009-03-23 11:35 UTC | newest]

Thread overview: 197+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-21  5:35 [PATCH 00/77] Convert most of the rest of the devices to net_device_ops Stephen Hemminger
2009-03-21  5:35 ` [PATCH 01/77] atm: convert mpc device to using netdev_ops Stephen Hemminger
2009-03-21 11:44   ` Chas Williams (CONTRACTOR)
2009-03-22  2:34   ` David Miller
2009-03-21  5:35 ` [PATCH 02/77] atm: cconvert clip driver to net_device_ops Stephen Hemminger
2009-03-22  2:34   ` David Miller
2009-03-21  5:35 ` [ofa-general] [PATCH 03/77] infiniband: convert c2 " Stephen Hemminger
2009-03-21 18:26   ` [ofa-general] " Steve Wise
2009-03-22  2:34   ` David Miller
2009-03-22 16:12   ` [ofa-general] " Roland Dreier
2009-03-23  4:17     ` David Miller
2009-03-21  5:35 ` [ofa-general] [PATCH 04/77] infiniband: convert nes driver " Stephen Hemminger
2009-03-22  2:34   ` David Miller
2009-03-21  5:35 ` [ofa-general] [PATCH 05/77] infiniband: convert ipoib " Stephen Hemminger
2009-03-22  2:34   ` [ofa-general] " David Miller
2009-03-21  5:35 ` [PATCH 06/77] irda: net_device_ops ioctl fix Stephen Hemminger
2009-03-22  2:34   ` David Miller
2009-03-23 11:33   ` Samuel Ortiz
2009-03-23 11:33   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 07/77] irlan: convert to net_device_ops Stephen Hemminger
2009-03-22  2:34   ` David Miller
2009-03-23 11:33   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 08/77] irda: convert irda_usb " Stephen Hemminger
2009-03-22  2:34   ` David Miller
2009-03-23 11:34   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 09/77] irda: convert mcs driver " Stephen Hemminger
2009-03-22  2:34   ` David Miller
2009-03-23 11:34   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 10/77] stir4200: convert " Stephen Hemminger
2009-03-22  2:34   ` David Miller
2009-03-23 11:34   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 11/77] irda: convert w83977af_ir " Stephen Hemminger
2009-03-22  2:36   ` David Miller
2009-03-23 11:35   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 12/77] irda: convert nsc_ircc driver " Stephen Hemminger
2009-03-22  2:36   ` David Miller
2009-03-23 11:35   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 13/77] irda: convert ali " Stephen Hemminger
2009-03-22  2:36   ` David Miller
2009-03-23 11:35   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 14/77] irda: convert vlsi " Stephen Hemminger
2009-03-22  2:36   ` David Miller
2009-03-23 11:35   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 15/77] irda: convert smsc " Stephen Hemminger
2009-03-22  2:36   ` David Miller
2009-03-23 11:36   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 16/77] irda: convert via-ircc " Stephen Hemminger
2009-03-22  2:36   ` David Miller
2009-03-23 11:36   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 17/77] irda: convert sir device " Stephen Hemminger
2009-03-22  2:36   ` David Miller
2009-03-23 11:36   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 18/77] irda: convert kignsun " Stephen Hemminger
2009-03-22  2:37   ` David Miller
2009-03-23 11:37   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 19/77] irda: convert ksdazzle " Stephen Hemminger
2009-03-22  2:37   ` David Miller
2009-03-23 11:37   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 20/77] irda: convert ks959 " Stephen Hemminger
2009-03-22  2:37   ` David Miller
2009-03-23 11:37   ` Samuel Ortiz
2009-03-21  5:35 ` [PATCH 21/77] usbnet: convert catc to internal net_device_stats Stephen Hemminger
2009-03-22  2:45   ` David Miller
2009-03-21  5:35 ` [PATCH 22/77] usbnet: convert catc device to net_device_ops Stephen Hemminger
2009-03-21  9:01   ` David Brownell
2009-03-21 13:02     ` Vojtech Pavlik
2009-03-21 10:17   ` Jiri Pirko
2009-03-22  2:40     ` David Miller
2009-03-22  2:45   ` David Miller
2009-03-21  5:35 ` [PATCH 23/77] usbnet: convert to internal net_device stats Stephen Hemminger
2009-03-21  9:01   ` David Brownell
2009-03-21 13:02     ` Vojtech Pavlik
2009-03-22  2:45   ` David Miller
2009-03-21  5:35 ` [PATCH 24/77] usbnet: convert rtl driver to net_device_ops Stephen Hemminger
2009-03-21  9:03   ` David Brownell
2009-03-23  9:17     ` Petko Manolov
2009-03-22  2:45   ` David Miller
2009-03-21  5:35 ` [PATCH 25/77] usbnet: convert hso " Stephen Hemminger
2009-03-21  9:08   ` David Brownell
2009-03-22  2:45   ` David Miller
2009-03-21  5:35 ` [PATCH 26/77] usbnet: convert to internal net_device_stats Stephen Hemminger
2009-03-21  9:09   ` David Brownell
2009-03-22  2:46   ` David Miller
2009-03-21  5:35 ` [PATCH 27/77] usbnet: support net_device_ops Stephen Hemminger
2009-03-21  9:11   ` David Brownell
2009-03-22  2:46   ` David Miller
2009-03-21  5:35 ` [PATCH 28/77] usbnet: convert asix driver to net_device_ops Stephen Hemminger
2009-03-21  9:12   ` David Brownell
2009-03-22  2:46   ` David Miller
2009-03-21  5:35 ` [PATCH 29/77] usbnet: convert dms9601 " Stephen Hemminger
2009-03-21  9:14   ` David Brownell
2009-03-21 10:57     ` Peter Korsgaard
2009-03-21 11:28       ` Peter Korsgaard
2009-03-22  3:00   ` David Miller
2009-03-21  5:35 ` [PATCH 30/77] usbnet: convert msc7830 " Stephen Hemminger
2009-03-21  9:19   ` David Brownell
2009-03-22  3:00   ` David Miller
2009-03-21  5:35 ` [PATCH 31/77] usbnet: convert sms95xx " Stephen Hemminger
2009-03-21  9:20   ` David Brownell
2009-03-21 15:53     ` Steve.Glendinning
2009-03-22  3:01   ` David Miller
2009-03-21  5:35 ` [PATCH 32/77] usbnet: convert rndis driver to use dev_get_stats Stephen Hemminger
2009-03-21  9:22   ` David Brownell
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 33/77] usbnet: convert rndis driver to net_device_ops Stephen Hemminger
2009-03-21  9:23   ` David Brownell
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 34/77] pcmcia: convert 3c589 " Stephen Hemminger
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 35/77] pcmcia: convert 3c574 " Stephen Hemminger
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 36/77] pcmcia: convert fmvj18x driver to internal net_device_stats Stephen Hemminger
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 37/77] pcmcia: convert fmvj18x driver to net_device_ops Stephen Hemminger
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 38/77] pcmcia: convert nmclan " Stephen Hemminger
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 39/77] pcnet: convert " Stephen Hemminger
2009-03-22  3:01   ` David Miller
2009-03-21  5:36 ` [PATCH 40/77] xir2cps: convert to internal net_device stats Stephen Hemminger
2009-03-22  3:02   ` David Miller
2009-03-21  5:36 ` [PATCH 41/77] xirc2ps: convert to net_device_ops Stephen Hemminger
2009-03-22  5:42   ` David Miller
2009-03-21  5:36 ` [PATCH 42/77] smc91c92: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:42   ` David Miller
2009-03-21  5:36 ` [PATCH 43/77] smc91c92: convert to net_device_ops Stephen Hemminger
2009-03-22  5:42   ` David Miller
2009-03-21  5:36 ` [PATCH 44/77] axnet: convert ot net_device_ops Stephen Hemminger
2009-03-22  5:42   ` David Miller
2009-03-21  5:36 ` [PATCH 45/77] x25_asy: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:42   ` David Miller
2009-03-21  5:36 ` [PATCH 46/77] x25_asy: convert to net_device_ops Stephen Hemminger
2009-03-22  5:43   ` David Miller
2009-03-21  5:36 ` [PATCH 47/77] dlci: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:43   ` David Miller
2009-03-21  5:36 ` [PATCH 48/77] dlci: convert to net_device_ops Stephen Hemminger
2009-03-22  5:43   ` David Miller
2009-03-21  5:36 ` [PATCH 49/77] cycx: " Stephen Hemminger
2009-03-22  5:43   ` David Miller
2009-03-21  5:36 ` [PATCH 50/77] lapbether: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:43   ` David Miller
2009-03-21  5:36 ` [PATCH 51/77] labether: convert to net_device_ops Stephen Hemminger
2009-03-22  5:47   ` David Miller
2009-03-21  5:36 ` [PATCH 52/77] sbni: use internal net_device_stats Stephen Hemminger
2009-03-22  5:47   ` David Miller
2009-03-21  5:36 ` [PATCH 53/77] sbni: convert to net_device_ops Stephen Hemminger
2009-03-22  5:47   ` David Miller
2009-03-21  5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
     [not found]   ` <20090321053716.656878050-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
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
     [not found]   ` <20090321053716.884788530-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
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 ` [PATCH 59/77] airo: " Stephen Hemminger
     [not found]   ` <20090321053717.048069302-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-03-22  5:48     ` David Miller
2009-03-21  5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
     [not found]   ` <20090321053717.126155878-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
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 62/77] wl3501: convert to internal net_device_stats Stephen Hemminger
2009-03-22  5:53   ` David Miller
2009-03-21  5:36 ` [PATCH 63/77] wl3501: convert to net_device_ops 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
     [not found]   ` <20090321053717.440414565-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-03-22  5:53     ` David Miller
2009-03-21  5:36 ` [PATCH 65/77] zd1201: convert to net_device_ops Stephen Hemminger
     [not found]   ` <20090321053717.514936473-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
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
     [not found]   ` <20090321053717.601771143-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
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
     [not found]   ` <20090321053717.682860987-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
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
     [not found]   ` <20090321053718.145743314-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-03-22  5:57     ` David Miller
2009-03-21  5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
     [not found]   ` <20090321053718.224939952-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
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
2009-03-21  5:36 ` [PATCH 77/77] netdev: expose net_device_ops compat as config option Stephen Hemminger
2009-03-22  5:57   ` David Miller

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