aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/hostap/hostap_80211_rx.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 19:36:42 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:55:34 -0700
commit4cfa8e45f4bb26ff38155f94a810a876b739958d (patch)
treec34fff3c9ada21c12787e684ec22cc14f2722001 /drivers/net/wireless/hostap/hostap_80211_rx.c
parent44e9ad0b5a9bd4de7ff3ac28b27d6577eb58fd91 (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_80211_rx.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index 7ba318e84de..3816df96a66 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -207,13 +207,11 @@ hdr->f.status = s; hdr->f.len = l; hdr->f.data = d
static void monitor_rx(struct net_device *dev, struct sk_buff *skb,
struct hostap_80211_rx_status *rx_stats)
{
- struct net_device_stats *stats;
int len;
len = prism2_rx_80211(dev, skb, rx_stats, PRISM2_RX_MONITOR);
- stats = hostap_get_stats(dev);
- stats->rx_packets++;
- stats->rx_bytes += len;
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += len;
}
@@ -724,7 +722,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
size_t hdrlen;
u16 fc, type, stype, sc;
struct net_device *wds = NULL;
- struct net_device_stats *stats;
unsigned int frag;
u8 *payload;
struct sk_buff *skb2 = NULL;
@@ -748,7 +745,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
iface = netdev_priv(dev);
hdr = (struct ieee80211_hdr *) skb->data;
- stats = hostap_get_stats(dev);
if (skb->len < 10)
goto rx_dropped;
@@ -866,10 +862,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
if (hostap_rx_frame_wds(local, hdr, fc, &wds))
goto rx_dropped;
- if (wds) {
+ if (wds)
skb->dev = dev = wds;
- stats = hostap_get_stats(dev);
- }
if (local->iw_mode == IW_MODE_MASTER && !wds &&
(fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
@@ -878,7 +872,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
memcmp(hdr->addr2, local->assoc_ap_addr, ETH_ALEN) == 0) {
/* Frame from BSSID of the AP for which we are a client */
skb->dev = dev = local->stadev;
- stats = hostap_get_stats(dev);
from_assoc_ap = 1;
}
@@ -1069,8 +1062,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
skb_trim(skb, skb->len - ETH_ALEN);
}
- stats->rx_packets++;
- stats->rx_bytes += skb->len;
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += skb->len;
if (local->iw_mode == IW_MODE_MASTER && !wds &&
local->ap->bridge_packets) {
@@ -1115,7 +1108,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
rx_dropped:
dev_kfree_skb(skb);
- stats->rx_dropped++;
+ dev->stats.rx_dropped++;
goto rx_exit;
}