Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135437
b: refs/heads/master
c: 4255d41
h: refs/heads/master
i:
  135435: 4f9b3fa
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent cc9f4b1 commit 2057a66
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 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: 32f5a330090fdf7d4d663ff5bd979e186fe6aab6
refs/heads/master: 4255d411452f1fe4dbcb2de4de35a7a028c5415a
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl3501.h
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ struct wl3501_card {
u8 reg_domain;
u8 version[2];
struct wl3501_scan_confirm bss_set[20];
struct net_device_stats stats;

struct iw_statistics wstats;
struct iw_spy_data spy_data;
struct iw_public_data wireless_data;
Expand Down
25 changes: 10 additions & 15 deletions trunk/drivers/net/wireless/wl3501_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,16 +1000,16 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
if (!skb) {
printk(KERN_WARNING "%s: Can't alloc a sk_buff of size %d.\n",
dev->name, pkt_len);
this->stats.rx_dropped++;
dev->stats.rx_dropped++;
} else {
skb->dev = dev;
skb_reserve(skb, 2); /* IP headers on 16 bytes boundaries */
skb_copy_to_linear_data(skb, (unsigned char *)&sig.daddr, 12);
wl3501_receive(this, skb->data, pkt_len);
skb_put(skb, pkt_len);
skb->protocol = eth_type_trans(skb, dev);
this->stats.rx_packets++;
this->stats.rx_bytes += skb->len;
dev->stats.rx_packets++;
dev->stats.rx_bytes += skb->len;
netif_rx(skb);
}
}
Expand Down Expand Up @@ -1311,7 +1311,7 @@ static int wl3501_reset(struct net_device *dev)
static void wl3501_tx_timeout(struct net_device *dev)
{
struct wl3501_card *this = netdev_priv(dev);
struct net_device_stats *stats = &this->stats;
struct net_device_stats *stats = &dev->stats;
unsigned long flags;
int rc;

Expand Down Expand Up @@ -1346,11 +1346,11 @@ static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (enabled)
wl3501_unblock_interrupt(this);
if (rc) {
++this->stats.tx_dropped;
++dev->stats.tx_dropped;
netif_stop_queue(dev);
} else {
++this->stats.tx_packets;
this->stats.tx_bytes += skb->len;
++dev->stats.tx_packets;
dev->stats.tx_bytes += skb->len;
kfree_skb(skb);

if (this->tx_buffer_cnt < 2)
Expand Down Expand Up @@ -1400,13 +1400,6 @@ static int wl3501_open(struct net_device *dev)
goto out;
}

static struct net_device_stats *wl3501_get_stats(struct net_device *dev)
{
struct wl3501_card *this = netdev_priv(dev);

return &this->stats;
}

static struct iw_statistics *wl3501_get_wireless_stats(struct net_device *dev)
{
struct wl3501_card *this = netdev_priv(dev);
Expand Down Expand Up @@ -1922,12 +1915,14 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
dev = alloc_etherdev(sizeof(struct wl3501_card));
if (!dev)
goto out_link;


dev->open = wl3501_open;
dev->stop = wl3501_close;
dev->hard_start_xmit = wl3501_hard_start_xmit;
dev->tx_timeout = wl3501_tx_timeout;
dev->watchdog_timeo = 5 * HZ;
dev->get_stats = wl3501_get_stats;

this = netdev_priv(dev);
this->wireless_data.spy_data = &this->spy_data;
this->p_dev = p_dev;
Expand Down

0 comments on commit 2057a66

Please sign in to comment.