PERFORCE change 134237 for review

Sam Leffler sam at FreeBSD.org
Sun Jan 27 12:35:06 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=134237

Change 134237 by sam at sam_ebb on 2008/01/27 20:34:54

	change get IEEE80211_IOC_AMPDU_DENSITY and IEEE80211_IOC_AMPDU_LIMIT
	to return the negotiated value when in RUN state so ifconfig displays
	the current setting for sta vaps
	MFP4 after:	1 week

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#24 edit

Differences ...

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

@@ -718,6 +718,7 @@
 ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd,
     struct ieee80211req *ireq)
 {
+#define	MS(_v, _f)	(((_v) & _f) >> _f##_S)
 	struct ieee80211com *ic = vap->iv_ic;
 	u_int kid, len;
 	uint8_t tmpkey[IEEE80211_KEYBUF_SIZE];
@@ -953,11 +954,18 @@
 	case IEEE80211_IOC_AMPDU_LIMIT:
 		if (vap->iv_opmode == IEEE80211_M_HOSTAP)
 			ireq->i_val = vap->iv_ampdu_rxmax;
+		else if (vap->iv_state == IEEE80211_S_RUN)
+			ireq->i_val = MS(vap->iv_bss->ni_htparam,
+			    IEEE80211_HTCAP_MAXRXAMPDU);
 		else
 			ireq->i_val = vap->iv_ampdu_limit;
 		break;
 	case IEEE80211_IOC_AMPDU_DENSITY:
-		ireq->i_val = vap->iv_ampdu_density;
+		if (vap->iv_state == IEEE80211_S_RUN)
+			ireq->i_val = MS(vap->iv_bss->ni_htparam,
+			    IEEE80211_HTCAP_MPDUDENSITY);
+		else
+			ireq->i_val = vap->iv_ampdu_density;
 		break;
 	case IEEE80211_IOC_AMSDU:
 		ireq->i_val = 0;
@@ -1027,6 +1035,7 @@
 		break;
 	}
 	return error;
+#undef MS
 }
 
 static int


More information about the p4-projects mailing list