Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135439
b: refs/heads/master
c: 22bc1ce
h: refs/heads/master
i:
  135437: 2057a66
  135435: 4f9b3fa
  135431: 9f94807
  135423: e6f456c
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent 773aa98 commit 168e842
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 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: 85a151b760348e4693e54bc8cece89ab9d3dc81d
refs/heads/master: 22bc1ce4f171f53c27052e1d74d312345487db16
29 changes: 10 additions & 19 deletions trunk/drivers/net/wireless/zd1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -787,7 +787,7 @@ static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
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;
}
Expand Down Expand Up @@ -817,12 +817,12 @@ static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)

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);

Expand All @@ -838,7 +838,7 @@ static void zd1201_tx_timeout(struct net_device *dev)
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;
}
Expand All @@ -861,13 +861,6 @@ static int zd1201_set_mac_address(struct net_device *dev, void *p)
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);
Expand Down Expand Up @@ -1778,9 +1771,7 @@ static int zd1201_probe(struct usb_interface *interface,

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;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/zd1201.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 168e842

Please sign in to comment.