diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:34 -0500 |
commit | f57505fd7ce559bacf5cde26a79ea355fa3bc1ce (patch) | |
tree | d1fd43a05382a8f220fd3ce2e34a4e43b49fa4f7 /drivers/net/hamradio | |
parent | 9772a252b5b2ffbcf163cc07a443a444bf500040 (diff) |
bpqether: convert to internal net_device_stats
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 46f8f3390e7d..b662b67125bc 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -110,7 +110,6 @@ struct bpqdev { | |||
110 | struct list_head bpq_list; /* list of bpq devices chain */ | 110 | struct list_head bpq_list; /* list of bpq devices chain */ |
111 | struct net_device *ethdev; /* link to ethernet device */ | 111 | struct net_device *ethdev; /* link to ethernet device */ |
112 | struct net_device *axdev; /* bpq device (bpq#) */ | 112 | struct net_device *axdev; /* bpq device (bpq#) */ |
113 | struct net_device_stats stats; /* some statistics */ | ||
114 | char dest_addr[6]; /* ether destination address */ | 113 | char dest_addr[6]; /* ether destination address */ |
115 | char acpt_addr[6]; /* accept ether frames from this address only */ | 114 | char acpt_addr[6]; /* accept ether frames from this address only */ |
116 | }; | 115 | }; |
@@ -222,8 +221,8 @@ static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty | |||
222 | skb_pull(skb, 2); /* Remove the length bytes */ | 221 | skb_pull(skb, 2); /* Remove the length bytes */ |
223 | skb_trim(skb, len); /* Set the length of the data */ | 222 | skb_trim(skb, len); /* Set the length of the data */ |
224 | 223 | ||
225 | bpq->stats.rx_packets++; | 224 | dev->stats.rx_packets++; |
226 | bpq->stats.rx_bytes += len; | 225 | dev->stats.rx_bytes += len; |
227 | 226 | ||
228 | ptr = skb_push(skb, 1); | 227 | ptr = skb_push(skb, 1); |
229 | *ptr = 0; | 228 | *ptr = 0; |
@@ -292,7 +291,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev) | |||
292 | bpq = netdev_priv(dev); | 291 | bpq = netdev_priv(dev); |
293 | 292 | ||
294 | if ((dev = bpq_get_ether_dev(dev)) == NULL) { | 293 | if ((dev = bpq_get_ether_dev(dev)) == NULL) { |
295 | bpq->stats.tx_dropped++; | 294 | dev->stats.tx_dropped++; |
296 | kfree_skb(skb); | 295 | kfree_skb(skb); |
297 | return -ENODEV; | 296 | return -ENODEV; |
298 | } | 297 | } |
@@ -300,8 +299,8 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev) | |||
300 | skb->protocol = ax25_type_trans(skb, dev); | 299 | skb->protocol = ax25_type_trans(skb, dev); |
301 | skb_reset_network_header(skb); | 300 | skb_reset_network_header(skb); |
302 | dev_hard_header(skb, dev, ETH_P_BPQ, bpq->dest_addr, NULL, 0); | 301 | dev_hard_header(skb, dev, ETH_P_BPQ, bpq->dest_addr, NULL, 0); |
303 | bpq->stats.tx_packets++; | 302 | dev->stats.tx_packets++; |
304 | bpq->stats.tx_bytes+=skb->len; | 303 | dev->stats.tx_bytes+=skb->len; |
305 | 304 | ||
306 | dev_queue_xmit(skb); | 305 | dev_queue_xmit(skb); |
307 | netif_wake_queue(dev); | 306 | netif_wake_queue(dev); |
@@ -309,16 +308,6 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev) | |||
309 | } | 308 | } |
310 | 309 | ||
311 | /* | 310 | /* |
312 | * Statistics | ||
313 | */ | ||
314 | static struct net_device_stats *bpq_get_stats(struct net_device *dev) | ||
315 | { | ||
316 | struct bpqdev *bpq = netdev_priv(dev); | ||
317 | |||
318 | return &bpq->stats; | ||
319 | } | ||
320 | |||
321 | /* | ||
322 | * Set AX.25 callsign | 311 | * Set AX.25 callsign |
323 | */ | 312 | */ |
324 | static int bpq_set_mac_address(struct net_device *dev, void *addr) | 313 | static int bpq_set_mac_address(struct net_device *dev, void *addr) |