diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:36:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 01:55:34 -0400 |
commit | 4cfa8e45f4bb26ff38155f94a810a876b739958d (patch) | |
tree | c34fff3c9ada21c12787e684ec22cc14f2722001 /drivers/net/wireless/hostap/hostap_hw.c | |
parent | 44e9ad0b5a9bd4de7ff3ac28b27d6577eb58fd91 (diff) |
hostap: convert to internal net_device_stats
Use pre-existing net_device_stats in network_device struct.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_hw.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 3d9e7b7a17b0..e80ff608dd2a 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -1682,7 +1682,7 @@ static int prism2_get_txfid_idx(local_info_t *local) | |||
1682 | 1682 | ||
1683 | PDEBUG(DEBUG_EXTRA2, "prism2_get_txfid_idx: no room in txfid buf: " | 1683 | PDEBUG(DEBUG_EXTRA2, "prism2_get_txfid_idx: no room in txfid buf: " |
1684 | "packet dropped\n"); | 1684 | "packet dropped\n"); |
1685 | local->stats.tx_dropped++; | 1685 | local->dev->stats.tx_dropped++; |
1686 | 1686 | ||
1687 | return -1; | 1687 | return -1; |
1688 | } | 1688 | } |
@@ -1787,11 +1787,9 @@ static int prism2_transmit(struct net_device *dev, int idx) | |||
1787 | prism2_transmit_cb, (long) idx); | 1787 | prism2_transmit_cb, (long) idx); |
1788 | 1788 | ||
1789 | if (res) { | 1789 | if (res) { |
1790 | struct net_device_stats *stats; | ||
1791 | printk(KERN_DEBUG "%s: prism2_transmit: CMDCODE_TRANSMIT " | 1790 | printk(KERN_DEBUG "%s: prism2_transmit: CMDCODE_TRANSMIT " |
1792 | "failed (res=%d)\n", dev->name, res); | 1791 | "failed (res=%d)\n", dev->name, res); |
1793 | stats = hostap_get_stats(dev); | 1792 | dev->stats.tx_dropped++; |
1794 | stats->tx_dropped++; | ||
1795 | netif_wake_queue(dev); | 1793 | netif_wake_queue(dev); |
1796 | return -1; | 1794 | return -1; |
1797 | } | 1795 | } |
@@ -1939,12 +1937,10 @@ static void prism2_rx(local_info_t *local) | |||
1939 | struct net_device *dev = local->dev; | 1937 | struct net_device *dev = local->dev; |
1940 | int res, rx_pending = 0; | 1938 | int res, rx_pending = 0; |
1941 | u16 len, hdr_len, rxfid, status, macport; | 1939 | u16 len, hdr_len, rxfid, status, macport; |
1942 | struct net_device_stats *stats; | ||
1943 | struct hfa384x_rx_frame rxdesc; | 1940 | struct hfa384x_rx_frame rxdesc; |
1944 | struct sk_buff *skb = NULL; | 1941 | struct sk_buff *skb = NULL; |
1945 | 1942 | ||
1946 | prism2_callback(local, PRISM2_CALLBACK_RX_START); | 1943 | prism2_callback(local, PRISM2_CALLBACK_RX_START); |
1947 | stats = hostap_get_stats(dev); | ||
1948 | 1944 | ||
1949 | rxfid = prism2_read_fid_reg(dev, HFA384X_RXFID_OFF); | 1945 | rxfid = prism2_read_fid_reg(dev, HFA384X_RXFID_OFF); |
1950 | #ifndef final_version | 1946 | #ifndef final_version |
@@ -2031,7 +2027,7 @@ static void prism2_rx(local_info_t *local) | |||
2031 | return; | 2027 | return; |
2032 | 2028 | ||
2033 | rx_dropped: | 2029 | rx_dropped: |
2034 | stats->rx_dropped++; | 2030 | dev->stats.rx_dropped++; |
2035 | if (skb) | 2031 | if (skb) |
2036 | dev_kfree_skb(skb); | 2032 | dev_kfree_skb(skb); |
2037 | goto rx_exit; | 2033 | goto rx_exit; |
@@ -2335,7 +2331,7 @@ static void prism2_txexc(local_info_t *local) | |||
2335 | struct hfa384x_tx_frame txdesc; | 2331 | struct hfa384x_tx_frame txdesc; |
2336 | 2332 | ||
2337 | show_dump = local->frame_dump & PRISM2_DUMP_TXEXC_HDR; | 2333 | show_dump = local->frame_dump & PRISM2_DUMP_TXEXC_HDR; |
2338 | local->stats.tx_errors++; | 2334 | dev->stats.tx_errors++; |
2339 | 2335 | ||
2340 | res = hostap_tx_compl_read(local, 1, &txdesc, &payload); | 2336 | res = hostap_tx_compl_read(local, 1, &txdesc, &payload); |
2341 | HFA384X_OUTW(HFA384X_EV_TXEXC, HFA384X_EVACK_OFF); | 2337 | HFA384X_OUTW(HFA384X_EV_TXEXC, HFA384X_EVACK_OFF); |