Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135432
b: refs/heads/master
c: 385e63f
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent 9f94807 commit 9531190
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1cc5920f0f6077e36e259e149548ef9a94335382
refs/heads/master: 385e63fb1e469739e90b32f4c07fed48baf2721a
50 changes: 17 additions & 33 deletions trunk/drivers/net/wireless/wavelan_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*------------------------------------------------------------------*/
/*
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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)
{
Expand All @@ -4170,29 +4155,29 @@ 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)
{
#ifdef DEBUG_TX_FAIL
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)
{
Expand All @@ -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 */
Expand Down Expand Up @@ -4514,7 +4499,6 @@ wavelan_probe(struct pcmcia_device *p_dev)
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;
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/net/wireless/wavelan_cs.p.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -592,16 +591,13 @@ typedef u_char mac_addr[WAVELAN_ADDR_SIZE]; /* Hardware address */
* 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
{
dev_node_t node; /* ???? What is this stuff ???? */
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 */
Expand Down Expand Up @@ -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 ----------------------- */
Expand Down

0 comments on commit 9531190

Please sign in to comment.