* [PATCH 54/77] netwave: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
@ 2009-03-21 5:36 ` Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 55/77] netwave: convert to net_device_ops Stephen Hemminger
` (19 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* [PATCH 55/77] netwave: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
2009-03-21 5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21 5:36 ` Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
` (18 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-wireless
Also get rid of unneeded cast
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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);
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 56/77] strip: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
2009-03-21 5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
2009-03-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
` (17 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-wireless
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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;
-
- dev->set_mac_address = strip_set_mac_address;
- dev->get_stats = strip_get_stats;
- dev->change_mtu = strip_change_mtu;
+ dev->header_ops = &strip_header_ops,
+ dev->netdev_ops = &strip_netdev_ops;
}
/*
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 57/77] wavelan: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
` (2 preceding siblings ...)
2009-03-21 5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
@ 2009-03-21 5:36 ` Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 58/77] wavelan: convert to net_device_ops Stephen Hemminger
` (16 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, jt; +Cc: netdev, linux-wireless
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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 ----------------------- */
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 58/77] wavelan: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (3 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
` (15 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, jt; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* [PATCH 59/77] airo: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (4 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
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
` (14 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* [PATCH 60/77] atmel: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (5 preceding siblings ...)
2009-03-21 5:36 ` [PATCH 59/77] airo: " Stephen Hemminger
@ 2009-03-21 5:36 ` Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 61/77] raylan: " Stephen Hemminger
` (13 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-wireless
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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;
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 61/77] raylan: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (6 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 64/77] zd1201: convert to internal net_device_stats Stephen Hemminger
` (12 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, coreythomas; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* [PATCH 64/77] zd1201: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
` (7 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 65/77] zd1201: convert to net_device_ops Stephen Hemminger
` (11 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, pe1rxq; +Cc: netdev, linux-usb, linux-wireless
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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;
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 65/77] zd1201: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (8 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
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
` (10 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, pe1rxq; +Cc: netdev, linux-usb, linux-wireless
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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,
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
` (9 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
2009-03-21 11:08 ` Johannes Berg
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 67/77] prism54: convert to net_device_ops Stephen Hemminger
` (9 subsequent siblings)
20 siblings, 2 replies; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, j; +Cc: netdev, linux-wireless
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 = {
+ .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;
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 67/77] prism54: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (10 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
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 68/77] prism54: convert to internal net_device_stats Stephen Hemminger
` (8 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, mcgrof; +Cc: netdev, linux-wireless
Also, make ethtool_ops const as it should be, and get rid
of useless cast.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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);
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 68/77] prism54: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
` (11 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
` (7 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, mcgrof; +Cc: netdev, linux-wireless
Also, make ethtool_ops const as it should be, and get rid
of useless cast.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
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
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 69/77] libertas: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
` (12 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
` (6 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, dcbw; +Cc: netdev, libertas-dev, linux-wireless
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
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));
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 70/77] libertas: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (13 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
` (5 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, dcbw; +Cc: netdev, libertas-dev, linux-wireless
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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);
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 71/77] ipw2x00: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
` (14 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
` (4 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, jkosina, dstreba; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (15 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
` (3 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, jkosina, dstreba; +Cc: netdev, linux-wireless
Expose routines so drivers can hook. Only set ptrs in netdev
if using old compat code.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
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);
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 73/77] ipw2100: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (16 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
2009-03-22 5:57 ` David Miller
2009-03-21 5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
` (2 subsequent siblings)
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, jkosina, dstreba; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* [PATCH 74/77] ipw2200: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (17 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
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-21 5:36 ` [PATCH 76/77] hostap: convert to net_device_ops Stephen Hemminger
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, jkosina, dstreba; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* [PATCH 75/77] hostap: convert to internal net_device_stats
[not found] <20090321053527.316395697@vyatta.com>
` (18 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
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, j; +Cc: netdev, linux-wireless
Use pre-existing net_device_stats in network_device struct.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
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;
--
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 76/77] hostap: convert to net_device_ops
[not found] <20090321053527.316395697@vyatta.com>
` (19 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
20 siblings, 1 reply; 44+ messages in thread
From: Stephen Hemminger @ 2009-03-21 5:36 UTC (permalink / raw)
To: David Miller, j; +Cc: netdev, linux-wireless
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] 44+ messages in thread
* Re: [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats
2009-03-21 5:36 ` [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-21 11:08 ` Johannes Berg
2009-03-22 5:49 ` David Miller
2009-03-22 5:53 ` David Miller
1 sibling, 1 reply; 44+ messages in thread
From: Johannes Berg @ 2009-03-21 11:08 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, j, netdev, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 579 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@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.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 54/77] netwave: convert to internal net_device_stats
2009-03-21 5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22 5:47 ` David Miller
0 siblings, 0 replies; 44+ 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:21 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ 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; 44+ 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] 44+ messages in thread
* Re: [PATCH 57/77] wavelan: convert to internal net_device_stats
2009-03-21 5:36 ` [PATCH 57/77] wavelan: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22 5:47 ` David Miller
0 siblings, 0 replies; 44+ 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:24 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ 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; 44+ 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] 44+ messages in thread
* Re: [PATCH 59/77] airo: convert to net_device_ops
2009-03-21 5:36 ` [PATCH 59/77] airo: " Stephen Hemminger
@ 2009-03-22 5:48 ` David Miller
0 siblings, 0 replies; 44+ 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:26 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 60/77] atmel: convert to net_device_ops
2009-03-21 5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
@ 2009-03-22 5:48 ` David Miller
0 siblings, 0 replies; 44+ 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:27 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ 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; 44+ 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] 44+ 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; 44+ 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] 44+ 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; 44+ 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] 44+ messages in thread
* Re: [PATCH 64/77] zd1201: convert to internal net_device_stats
2009-03-21 5:36 ` [PATCH 64/77] zd1201: convert to internal net_device_stats Stephen Hemminger
@ 2009-03-22 5:53 ` David Miller
0 siblings, 0 replies; 44+ messages in thread
From: David Miller @ 2009-03-22 5:53 UTC (permalink / raw)
To: shemminger; +Cc: pe1rxq, netdev, linux-usb, linux-wireless
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:31 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 65/77] zd1201: convert to net_device_ops
2009-03-21 5:36 ` [PATCH 65/77] zd1201: convert to net_device_ops Stephen Hemminger
@ 2009-03-22 5:53 ` David Miller
0 siblings, 0 replies; 44+ messages in thread
From: David Miller @ 2009-03-22 5:53 UTC (permalink / raw)
To: shemminger; +Cc: pe1rxq, netdev, linux-usb, linux-wireless
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:32 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats
2009-03-21 5:36 ` [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats Stephen Hemminger
2009-03-21 11:08 ` Johannes Berg
@ 2009-03-22 5:53 ` David Miller
1 sibling, 0 replies; 44+ messages in thread
From: David Miller @ 2009-03-22 5:53 UTC (permalink / raw)
To: shemminger; +Cc: j, netdev, linux-wireless
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:33 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 67/77] prism54: convert to net_device_ops
2009-03-21 5:36 ` [PATCH 67/77] prism54: convert to net_device_ops Stephen Hemminger
@ 2009-03-22 5:53 ` David Miller
0 siblings, 0 replies; 44+ 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:34 -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] 44+ 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; 44+ 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] 44+ 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; 44+ 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] 44+ 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; 44+ 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] 44+ 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; 44+ 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] 44+ 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; 44+ 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] 44+ messages in thread
* Re: [PATCH 73/77] ipw2100: convert to net_device_ops
2009-03-21 5:36 ` [PATCH 73/77] ipw2100: convert to net_device_ops Stephen Hemminger
@ 2009-03-22 5:57 ` David Miller
0 siblings, 0 replies; 44+ messages in thread
From: David Miller @ 2009-03-22 5:57 UTC (permalink / raw)
To: shemminger; +Cc: jkosina, dstreba, netdev, linux-wireless
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:40 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 74/77] ipw2200: convert to net_device_ops
2009-03-21 5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
@ 2009-03-22 5:57 ` David Miller
0 siblings, 0 replies; 44+ messages in thread
From: David Miller @ 2009-03-22 5:57 UTC (permalink / raw)
To: shemminger; +Cc: jkosina, dstreba, netdev, linux-wireless
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:36:41 -0700
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 44+ 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; 44+ 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] 44+ 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; 44+ 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] 44+ messages in thread
end of thread, other threads:[~2009-03-22 5:57 UTC | newest]
Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090321053527.316395697@vyatta.com>
2009-03-21 5:36 ` [PATCH 54/77] netwave: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 55/77] netwave: convert to net_device_ops Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 56/77] strip: " Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 57/77] wavelan: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 58/77] wavelan: convert to net_device_ops Stephen Hemminger
2009-03-22 5:47 ` David Miller
2009-03-21 5:36 ` [PATCH 59/77] airo: " Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 60/77] atmel: " Stephen Hemminger
2009-03-22 5:48 ` David Miller
2009-03-21 5:36 ` [PATCH 61/77] raylan: " Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 64/77] zd1201: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 65/77] zd1201: convert to net_device_ops Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 66/77] mac80211_hwsim: convert to internal net_device_stats Stephen Hemminger
2009-03-21 11:08 ` Johannes Berg
2009-03-22 5:49 ` David Miller
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 67/77] prism54: convert to net_device_ops Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 68/77] prism54: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:53 ` David Miller
2009-03-21 5:36 ` [PATCH 69/77] libertas: " Stephen Hemminger
2009-03-22 5:54 ` David Miller
2009-03-21 5:36 ` [PATCH 70/77] libertas: convert to net_device_ops Stephen Hemminger
2009-03-22 5:54 ` David Miller
2009-03-21 5:36 ` [PATCH 71/77] ipw2x00: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:56 ` David Miller
2009-03-21 5:36 ` [PATCH 72/77] ipw2x00: convert infrastructure for use by net_device_ops Stephen Hemminger
2009-03-22 5:56 ` David Miller
2009-03-21 5:36 ` [PATCH 73/77] ipw2100: convert to net_device_ops Stephen Hemminger
2009-03-22 5:57 ` David Miller
2009-03-21 5:36 ` [PATCH 74/77] ipw2200: " Stephen Hemminger
2009-03-22 5:57 ` David Miller
2009-03-21 5:36 ` [PATCH 75/77] hostap: convert to internal net_device_stats Stephen Hemminger
2009-03-22 5:57 ` David Miller
2009-03-21 5:36 ` [PATCH 76/77] hostap: convert to net_device_ops Stephen Hemminger
2009-03-22 5:57 ` David Miller
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).