aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c19
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c12
-rw-r--r--drivers/net/wireless/hostap/hostap_main.c10
-rw-r--r--drivers/net/wireless/hostap/hostap_wlan.h1
5 files changed, 11 insertions, 33 deletions
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index 7ba318e84dec..3816df96a663 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
207static void monitor_rx(struct net_device *dev, struct sk_buff *skb, 207static void monitor_rx(struct net_device *dev, struct sk_buff *skb,
208 struct hostap_80211_rx_status *rx_stats) 208 struct hostap_80211_rx_status *rx_stats)
209{ 209{
210 struct net_device_stats *stats;
211 int len; 210 int len;
212 211
213 len = prism2_rx_80211(dev, skb, rx_stats, PRISM2_RX_MONITOR); 212 len = prism2_rx_80211(dev, skb, rx_stats, PRISM2_RX_MONITOR);
214 stats = hostap_get_stats(dev); 213 dev->stats.rx_packets++;
215 stats->rx_packets++; 214 dev->stats.rx_bytes += len;
216 stats->rx_bytes += len;
217} 215}
218 216
219 217
@@ -724,7 +722,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
724 size_t hdrlen; 722 size_t hdrlen;
725 u16 fc, type, stype, sc; 723 u16 fc, type, stype, sc;
726 struct net_device *wds = NULL; 724 struct net_device *wds = NULL;
727 struct net_device_stats *stats;
728 unsigned int frag; 725 unsigned int frag;
729 u8 *payload; 726 u8 *payload;
730 struct sk_buff *skb2 = NULL; 727 struct sk_buff *skb2 = NULL;
@@ -748,7 +745,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
748 iface = netdev_priv(dev); 745 iface = netdev_priv(dev);
749 746
750 hdr = (struct ieee80211_hdr *) skb->data; 747 hdr = (struct ieee80211_hdr *) skb->data;
751 stats = hostap_get_stats(dev);
752 748
753 if (skb->len < 10) 749 if (skb->len < 10)
754 goto rx_dropped; 750 goto rx_dropped;
@@ -866,10 +862,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
866 862
867 if (hostap_rx_frame_wds(local, hdr, fc, &wds)) 863 if (hostap_rx_frame_wds(local, hdr, fc, &wds))
868 goto rx_dropped; 864 goto rx_dropped;
869 if (wds) { 865 if (wds)
870 skb->dev = dev = wds; 866 skb->dev = dev = wds;
871 stats = hostap_get_stats(dev);
872 }
873 867
874 if (local->iw_mode == IW_MODE_MASTER && !wds && 868 if (local->iw_mode == IW_MODE_MASTER && !wds &&
875 (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == 869 (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
@@ -878,7 +872,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
878 memcmp(hdr->addr2, local->assoc_ap_addr, ETH_ALEN) == 0) { 872 memcmp(hdr->addr2, local->assoc_ap_addr, ETH_ALEN) == 0) {
879 /* Frame from BSSID of the AP for which we are a client */ 873 /* Frame from BSSID of the AP for which we are a client */
880 skb->dev = dev = local->stadev; 874 skb->dev = dev = local->stadev;
881 stats = hostap_get_stats(dev);
882 from_assoc_ap = 1; 875 from_assoc_ap = 1;
883 } 876 }
884 877
@@ -1069,8 +1062,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
1069 skb_trim(skb, skb->len - ETH_ALEN); 1062 skb_trim(skb, skb->len - ETH_ALEN);
1070 } 1063 }
1071 1064
1072 stats->rx_packets++; 1065 dev->stats.rx_packets++;
1073 stats->rx_bytes += skb->len; 1066 dev->stats.rx_bytes += skb->len;
1074 1067
1075 if (local->iw_mode == IW_MODE_MASTER && !wds && 1068 if (local->iw_mode == IW_MODE_MASTER && !wds &&
1076 local->ap->bridge_packets) { 1069 local->ap->bridge_packets) {
@@ -1115,7 +1108,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
1115 rx_dropped: 1108 rx_dropped:
1116 dev_kfree_skb(skb); 1109 dev_kfree_skb(skb);
1117 1110
1118 stats->rx_dropped++; 1111 dev->stats.rx_dropped++;
1119 goto rx_exit; 1112 goto rx_exit;
1120} 1113}
1121 1114
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 645862fd37d1..a2a203c90ba3 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -2262,7 +2262,7 @@ void hostap_rx(struct net_device *dev, struct sk_buff *skb,
2262 if (skb->len < 16) 2262 if (skb->len < 16)
2263 goto drop; 2263 goto drop;
2264 2264
2265 local->stats.rx_packets++; 2265 dev->stats.rx_packets++;
2266 2266
2267 hdr = (struct ieee80211_hdr *) skb->data; 2267 hdr = (struct ieee80211_hdr *) skb->data;
2268 2268
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);
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 5d55f92f654b..792dd14c894e 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -607,14 +607,6 @@ int hostap_80211_get_hdrlen(__le16 fc)
607} 607}
608 608
609 609
610struct net_device_stats *hostap_get_stats(struct net_device *dev)
611{
612 struct hostap_interface *iface;
613 iface = netdev_priv(dev);
614 return &iface->stats;
615}
616
617
618static int prism2_close(struct net_device *dev) 610static int prism2_close(struct net_device *dev)
619{ 611{
620 struct hostap_interface *iface; 612 struct hostap_interface *iface;
@@ -832,7 +824,6 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
832 ether_setup(dev); 824 ether_setup(dev);
833 825
834 /* kernel callbacks */ 826 /* kernel callbacks */
835 dev->get_stats = hostap_get_stats;
836 if (iface) { 827 if (iface) {
837 /* Currently, we point to the proper spy_data only on 828 /* Currently, we point to the proper spy_data only on
838 * the main_dev. This could be fixed. Jean II */ 829 * the main_dev. This could be fixed. Jean II */
@@ -1112,7 +1103,6 @@ EXPORT_SYMBOL(hostap_set_auth_algs);
1112EXPORT_SYMBOL(hostap_dump_rx_header); 1103EXPORT_SYMBOL(hostap_dump_rx_header);
1113EXPORT_SYMBOL(hostap_dump_tx_header); 1104EXPORT_SYMBOL(hostap_dump_tx_header);
1114EXPORT_SYMBOL(hostap_80211_get_hdrlen); 1105EXPORT_SYMBOL(hostap_80211_get_hdrlen);
1115EXPORT_SYMBOL(hostap_get_stats);
1116EXPORT_SYMBOL(hostap_setup_dev); 1106EXPORT_SYMBOL(hostap_setup_dev);
1117EXPORT_SYMBOL(hostap_set_multicast_list_queue); 1107EXPORT_SYMBOL(hostap_set_multicast_list_queue);
1118EXPORT_SYMBOL(hostap_set_hostapd); 1108EXPORT_SYMBOL(hostap_set_hostapd);
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
index 4d8d51a353cd..3d238917af07 100644
--- a/drivers/net/wireless/hostap/hostap_wlan.h
+++ b/drivers/net/wireless/hostap/hostap_wlan.h
@@ -684,7 +684,6 @@ struct local_info {
684 u16 channel_mask; /* mask of allowed channels */ 684 u16 channel_mask; /* mask of allowed channels */
685 u16 scan_channel_mask; /* mask of channels to be scanned */ 685 u16 scan_channel_mask; /* mask of channels to be scanned */
686 struct comm_tallies_sums comm_tallies; 686 struct comm_tallies_sums comm_tallies;
687 struct net_device_stats stats;
688 struct proc_dir_entry *proc; 687 struct proc_dir_entry *proc;
689 int iw_mode; /* operating mode (IW_MODE_*) */ 688 int iw_mode; /* operating mode (IW_MODE_*) */
690 int pseudo_adhoc; /* 0: IW_MODE_ADHOC is real 802.11 compliant IBSS 689 int pseudo_adhoc; /* 0: IW_MODE_ADHOC is real 802.11 compliant IBSS