Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2008 01:35:51 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 135862 for review
Message-ID:  <200802210135.m1L1Zp5T033053@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135862

Change 135862 by sam@sam_ebb on 2008/02/21 01:35:15

	o fix old references to ic_stats to count things per-vap
	o change SIOCG80211STATS to return the vap stats so wlanstats
	  works again

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#12 edit
.. //depot/projects/vap/sys/net80211/ieee80211_ht.c#16 edit
.. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#31 edit
.. //depot/projects/vap/sys/net80211/ieee80211_output.c#32 edit
.. //depot/projects/vap/sys/net80211/ieee80211_sta.c#6 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#12 (text+ko) ====

@@ -1651,7 +1651,7 @@
 		 */ 
 		if ((ic->ic_flags & IEEE80211_F_SCAN) == 0 &&
 		    subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP) {
-			ic->ic_stats.is_rx_mgtdiscard++;
+			vap->iv_stats.is_rx_mgtdiscard++;
 			return;
 		}
 		/* NB: accept off-channel frames */

==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#16 (text+ko) ====

@@ -1714,7 +1714,7 @@
 ieee80211_send_bar(struct ieee80211_node *ni,
 	const struct ieee80211_tx_ampdu *tap)
 {
-#define	senderr(_x, _v)	do { ic->ic_stats._v++; ret = _x; goto bad; } while (0)
+#define	senderr(_x, _v)	do { vap->iv_stats._v++; ret = _x; goto bad; } while (0)
 #define	ADDSHORT(frm, v) do {			\
 	frm[0] = (v) & 0xff;			\
 	frm[1] = (v) >> 8;			\
@@ -1786,7 +1786,7 @@
 ieee80211_send_action(struct ieee80211_node *ni,
 	int category, int action, uint16_t args[4])
 {
-#define	senderr(_x, _v)	do { ic->ic_stats._v++; ret = _x; goto bad; } while (0)
+#define	senderr(_x, _v)	do { vap->iv_stats._v++; ret = _x; goto bad; } while (0)
 #define	ADDSHORT(frm, v) do {			\
 	frm[0] = (v) & 0xff;			\
 	frm[1] = (v) >> 8;			\

==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#31 (text+ko) ====

@@ -3088,7 +3088,7 @@
 		break;
 	case SIOCG80211STATS:
 		ifr = (struct ifreq *)data;
-		copyout(&ic->ic_stats, ifr->ifr_data, sizeof (ic->ic_stats));
+		copyout(&vap->iv_stats, ifr->ifr_data, sizeof (vap->iv_stats));
 		break;
 	case SIOCSIFMTU:
 		ifr = (struct ifreq *)data;

==== //depot/projects/vap/sys/net80211/ieee80211_output.c#32 (text+ko) ====

@@ -1716,7 +1716,7 @@
 ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg)
 {
 #define	HTFLAGS (IEEE80211_NODE_HT | IEEE80211_NODE_HTCOMPAT)
-#define	senderr(_x, _v)	do { ic->ic_stats._v++; ret = _x; goto bad; } while (0)
+#define	senderr(_x, _v)	do { vap->iv_stats._v++; ret = _x; goto bad; } while (0)
 	struct ieee80211vap *vap = ni->ni_vap;
 	struct ieee80211com *ic = ni->ni_ic;
 	struct ieee80211_node *bss = vap->iv_bss;

==== //depot/projects/vap/sys/net80211/ieee80211_sta.c#6 (text+ko) ====

@@ -1204,7 +1204,7 @@
 		 * Frames otherwise received are discarded.
 		 */ 
 		if (!((ic->ic_flags & IEEE80211_F_SCAN) || ni->ni_associd)) {
-			ic->ic_stats.is_rx_mgtdiscard++;
+			vap->iv_stats.is_rx_mgtdiscard++;
 			return;
 		}
 		/* XXX probe response in sta mode when !scanning? */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802210135.m1L1Zp5T033053>