PERFORCE change 65739 for review

Sam Leffler sam at FreeBSD.org
Tue Nov 23 22:48:20 GMT 2004


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

Change 65739 by sam at sam_ebb on 2004/11/23 22:48:15

	o split wme parameter update into locked+unlocked versions so
	  there's an unlocked version to call from the beacon update routine
	o update the wme parameter set identifier so stations will install
	  parameters received via beacons

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#9 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#9 (text+ko) ====

@@ -525,6 +525,9 @@
 	}
 }
 
+/*
+ * WME protocol support.  The following parameters come from the spec.
+ */
 typedef struct phyParamType {
 	u_int8_t aifsn; 
 	u_int8_t logcwmin;
@@ -687,8 +690,11 @@
 	}
 }
 
+/*
+ * Update WME parameters for ourself and the BSS.
+ */
 void
-ieee80211_wme_updateparams(struct ieee80211com *ic)
+ieee80211_wme_updateparams_locked(struct ieee80211com *ic)
 {
 	static const paramType phyParam[IEEE80211_MODE_MAX] = {
 		{ 2, 4, 10, 64 },	/* IEEE80211_MODE_AUTO */ 
@@ -704,10 +710,6 @@
 	struct wmeParams *chanp, *bssp;
 	int i;
 
-	if ((ic->ic_caps & IEEE80211_C_WME) == 0)
-		return;
-
-	IEEE80211_BEACON_LOCK(ic);
        	/* set up the channel access parameters for the physical device */
 	for (i = 0; i < WME_NUM_AC; i++) {
 		chanp = &wme->wme_chanParams.cap_wmeParams[i];
@@ -725,6 +727,14 @@
 		chanp->wmep_txopLimit = wmep->wmep_txopLimit;
 	}
 
+	/*
+	 * This implements agressive mode as found in certain
+	 * vendors' AP's.  When there is significant high
+	 * priority (VI/VO) traffic in the BSS throttle back BE
+	 * traffic by using conservative parameters.  Otherwise
+	 * BE uses agressive params to optimize performance of
+	 * legacy/non-QoS traffic.
+	 */
         if ((ic->ic_opmode == IEEE80211_M_HOSTAP &&
 	     (wme->wme_flags & WME_F_AGGRMODE) == 0) ||
 	    (ic->ic_opmode != IEEE80211_M_HOSTAP &&
@@ -776,9 +786,34 @@
 			, chanp->wmep_logcwmin
 		);
     	}	
+	if (ic->ic_opmode == IEEE80211_M_HOSTAP) {	/* XXX ibss? */
+		/*
+		 * Arrange for a beacon update and bump the parameter
+		 * set number so associated stations load the new values.
+		 */
+		wme->wme_bssChanParams.cap_info =
+			(wme->wme_bssChanParams.cap_info+1) & WME_QOSINFO_COUNT;
+		ic->ic_flags |= IEEE80211_F_WMEUPDATE;
+	}
+
 	wme->wme_update(ic);
-	ic->ic_flags |= IEEE80211_F_WMEUPDATE;
-	IEEE80211_BEACON_UNLOCK(ic);
+
+	IEEE80211_DPRINTF(ic, IEEE80211_MSG_WME,
+		"%s: WME params updated, cap_info 0x%x\n", __func__,
+		ic->ic_opmode == IEEE80211_M_STA ?
+			wme->wme_wmeChanParams.cap_info :
+			wme->wme_bssChanParams.cap_info);
+}
+
+void
+ieee80211_wme_updateparams(struct ieee80211com *ic)
+{
+
+	if (ic->ic_caps & IEEE80211_C_WME) {
+		IEEE80211_BEACON_LOCK(ic);
+		ieee80211_wme_updateparams_locked(ic);
+		IEEE80211_BEACON_UNLOCK(ic);
+	}
 }
 
 static int


More information about the p4-projects mailing list