Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102527
b: refs/heads/master
c: de0561c
h: refs/heads/master
i:
  102525: e77eabe
  102523: 8332868
  102519: 9fa03ca
  102511: c2187f7
  102495: 66e9a01
  102463: 12abf70
  102399: 63fdcda
v: v3
  • Loading branch information
Paulius Zaleckas authored and Jeff Garzik committed May 13, 2008
1 parent eac5e0c commit a7629c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 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: cd65284f6ec482622d2b30cd9996712d830ba228
refs/heads/master: de0561c43550f78cd837a24179f1859817f24578
24 changes: 7 additions & 17 deletions trunk/drivers/net/hamradio/6pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ struct sixpack {
unsigned int rx_count;
unsigned int rx_count_cooked;

/* 6pack interface statistics. */
struct net_device_stats stats;

int mtu; /* Our mtu (to spot changes!) */
int buffsize; /* Max buffers sizes */

Expand Down Expand Up @@ -237,7 +234,7 @@ static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len)
return;

out_drop:
sp->stats.tx_dropped++;
sp->dev->stats.tx_dropped++;
netif_start_queue(sp->dev);
if (net_ratelimit())
printk(KERN_DEBUG "%s: %s - dropped.\n", sp->dev->name, msg);
Expand All @@ -252,7 +249,7 @@ static int sp_xmit(struct sk_buff *skb, struct net_device *dev)
spin_lock_bh(&sp->lock);
/* We were not busy, so we are now... :-) */
netif_stop_queue(dev);
sp->stats.tx_bytes += skb->len;
dev->stats.tx_bytes += skb->len;
sp_encaps(sp, skb->data, skb->len);
spin_unlock_bh(&sp->lock);

Expand Down Expand Up @@ -298,12 +295,6 @@ static int sp_header(struct sk_buff *skb, struct net_device *dev,
return 0;
}

static struct net_device_stats *sp_get_stats(struct net_device *dev)
{
struct sixpack *sp = netdev_priv(dev);
return &sp->stats;
}

static int sp_set_mac_address(struct net_device *dev, void *addr)
{
struct sockaddr_ax25 *sa = addr;
Expand Down Expand Up @@ -338,7 +329,6 @@ static void sp_setup(struct net_device *dev)
dev->destructor = free_netdev;
dev->stop = sp_close;

dev->get_stats = sp_get_stats;
dev->set_mac_address = sp_set_mac_address;
dev->hard_header_len = AX25_MAX_HEADER_LEN;
dev->header_ops = &sp_header_ops;
Expand Down Expand Up @@ -370,7 +360,7 @@ static void sp_bump(struct sixpack *sp, char cmd)

count = sp->rcount + 1;

sp->stats.rx_bytes += count;
sp->dev->stats.rx_bytes += count;

if ((skb = dev_alloc_skb(count)) == NULL)
goto out_mem;
Expand All @@ -382,12 +372,12 @@ static void sp_bump(struct sixpack *sp, char cmd)
skb->protocol = ax25_type_trans(skb, sp->dev);
netif_rx(skb);
sp->dev->last_rx = jiffies;
sp->stats.rx_packets++;
sp->dev->stats.rx_packets++;

return;

out_mem:
sp->stats.rx_dropped++;
sp->dev->stats.rx_dropped++;
}


Expand Down Expand Up @@ -436,7 +426,7 @@ static void sixpack_write_wakeup(struct tty_struct *tty)
if (sp->xleft <= 0) {
/* Now serial buffer is almost free & we can start
* transmission of another packet */
sp->stats.tx_packets++;
sp->dev->stats.tx_packets++;
clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
sp->tx_enable = 0;
netif_wake_queue(sp->dev);
Expand Down Expand Up @@ -484,7 +474,7 @@ static void sixpack_receive_buf(struct tty_struct *tty,
count--;
if (fp && *fp++) {
if (!test_and_set_bit(SIXPF_ERROR, &sp->flags))
sp->stats.rx_errors++;
sp->dev->stats.rx_errors++;
continue;
}
}
Expand Down

0 comments on commit a7629c9

Please sign in to comment.