diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-08-24 14:29:34 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:31 -0400 |
commit | 68aae11674b9d6598b660d1148ffba9eef3f895f (patch) | |
tree | d5213c5b624e9908b948f2642b7e15721021b4ee /net/mac80211/rx.c | |
parent | 24338793eea9dcc0865826e1115af86a19af8d18 (diff) |
[MAC80211]: use internal network device stats
Stats are now available for device usage inside network_device
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 28b8b6af4c42..a5619d1f9a3b 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -137,7 +137,6 @@ ieee80211_rx_monitor(struct net_device *dev, struct sk_buff *skb, | |||
137 | struct ieee80211_rx_status *status) | 137 | struct ieee80211_rx_status *status) |
138 | { | 138 | { |
139 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 139 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
140 | struct ieee80211_sub_if_data *sdata; | ||
141 | struct ieee80211_rate *rate; | 140 | struct ieee80211_rate *rate; |
142 | struct ieee80211_rtap_hdr { | 141 | struct ieee80211_rtap_hdr { |
143 | struct ieee80211_radiotap_header hdr; | 142 | struct ieee80211_radiotap_header hdr; |
@@ -150,8 +149,6 @@ ieee80211_rx_monitor(struct net_device *dev, struct sk_buff *skb, | |||
150 | 149 | ||
151 | skb->dev = dev; | 150 | skb->dev = dev; |
152 | 151 | ||
153 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
154 | |||
155 | if (status->flag & RX_FLAG_RADIOTAP) | 152 | if (status->flag & RX_FLAG_RADIOTAP) |
156 | goto out; | 153 | goto out; |
157 | 154 | ||
@@ -184,8 +181,8 @@ ieee80211_rx_monitor(struct net_device *dev, struct sk_buff *skb, | |||
184 | rthdr->antsignal = status->ssi; | 181 | rthdr->antsignal = status->ssi; |
185 | 182 | ||
186 | out: | 183 | out: |
187 | sdata->stats.rx_packets++; | 184 | dev->stats.rx_packets++; |
188 | sdata->stats.rx_bytes += skb->len; | 185 | dev->stats.rx_bytes += skb->len; |
189 | 186 | ||
190 | skb_set_mac_header(skb, 0); | 187 | skb_set_mac_header(skb, 0); |
191 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 188 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -1053,8 +1050,8 @@ ieee80211_rx_h_data(struct ieee80211_txrx_data *rx) | |||
1053 | 1050 | ||
1054 | skb2 = NULL; | 1051 | skb2 = NULL; |
1055 | 1052 | ||
1056 | sdata->stats.rx_packets++; | 1053 | dev->stats.rx_packets++; |
1057 | sdata->stats.rx_bytes += skb->len; | 1054 | dev->stats.rx_bytes += skb->len; |
1058 | 1055 | ||
1059 | if (local->bridge_packets && (sdata->type == IEEE80211_IF_TYPE_AP | 1056 | if (local->bridge_packets && (sdata->type == IEEE80211_IF_TYPE_AP |
1060 | || sdata->type == IEEE80211_IF_TYPE_VLAN) && | 1057 | || sdata->type == IEEE80211_IF_TYPE_VLAN) && |