Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133822
b: refs/heads/master
c: 5a7616a
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 21, 2009
1 parent 391f7d6 commit 889f33a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 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: 52db625079e8f231a3e53e89871bd5adb66e8464
refs/heads/master: 5a7616af604caf0d436a1ed0d4298bb25cd77d67
27 changes: 7 additions & 20 deletions trunk/drivers/net/hamradio/hdlcdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ static void hdlc_rx_flag(struct net_device *dev, struct hdlcdrv_state *s)
pkt_len = s->hdlcrx.len - 2 + 1; /* KISS kludge */
if (!(skb = dev_alloc_skb(pkt_len))) {
printk("%s: memory squeeze, dropping packet\n", dev->name);
s->stats.rx_dropped++;
dev->stats.rx_dropped++;
return;
}
cp = skb_put(skb, pkt_len);
*cp++ = 0; /* KISS kludge */
memcpy(cp, s->hdlcrx.buffer, pkt_len - 1);
skb->protocol = ax25_type_trans(skb, dev);
netif_rx(skb);
s->stats.rx_packets++;
dev->stats.rx_packets++;
}

void hdlcdrv_receiver(struct net_device *dev, struct hdlcdrv_state *s)
Expand Down Expand Up @@ -326,7 +326,7 @@ void hdlcdrv_transmitter(struct net_device *dev, struct hdlcdrv_state *s)
s->hdlctx.len = pkt_len+2; /* the appended CRC */
s->hdlctx.tx_state = 2;
s->hdlctx.bitstream = 0;
s->stats.tx_packets++;
dev->stats.tx_packets++;
break;
case 2:
if (!s->hdlctx.len) {
Expand Down Expand Up @@ -426,19 +426,6 @@ static int hdlcdrv_set_mac_address(struct net_device *dev, void *addr)
return 0;
}

/* --------------------------------------------------------------------- */

static struct net_device_stats *hdlcdrv_get_stats(struct net_device *dev)
{
struct hdlcdrv_state *sm = netdev_priv(dev);

/*
* Get the current statistics. This may be called with the
* card open or closed.
*/
return &sm->stats;
}

/* --------------------------------------------------------------------- */
/*
* Open/initialize the board. This is called (in the current kernel)
Expand Down Expand Up @@ -568,10 +555,10 @@ static int hdlcdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
bi.data.cs.ptt = hdlcdrv_ptt(s);
bi.data.cs.dcd = s->hdlcrx.dcd;
bi.data.cs.ptt_keyed = s->ptt_keyed;
bi.data.cs.tx_packets = s->stats.tx_packets;
bi.data.cs.tx_errors = s->stats.tx_errors;
bi.data.cs.rx_packets = s->stats.rx_packets;
bi.data.cs.rx_errors = s->stats.rx_errors;
bi.data.cs.tx_packets = dev->stats.tx_packets;
bi.data.cs.tx_errors = dev->stats.tx_errors;
bi.data.cs.rx_packets = dev->stats.rx_packets;
bi.data.cs.rx_errors = dev->stats.rx_errors;
break;

case HDLCDRVCTL_OLDGETSTAT:
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/hdlcdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ struct hdlcdrv_state {
struct hdlcdrv_bitbuffer bitbuf_hdlc;
#endif /* HDLCDRV_DEBUG */

struct net_device_stats stats;
int ptt_keyed;

/* queued skb for transmission */
Expand Down

0 comments on commit 889f33a

Please sign in to comment.