From owner-p4-projects@FreeBSD.ORG Fri Dec 3 23:27:40 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6068E16A4D0; Fri, 3 Dec 2004 23:27:40 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25FB716A4CE for ; Fri, 3 Dec 2004 23:27:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED48343D49 for ; Fri, 3 Dec 2004 23:27:39 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iB3NRd5V004789 for ; Fri, 3 Dec 2004 23:27:39 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iB3NRdbY004786 for perforce@freebsd.org; Fri, 3 Dec 2004 23:27:39 GMT (envelope-from sam@freebsd.org) Date: Fri, 3 Dec 2004 23:27:39 GMT Message-Id: <200412032327.iB3NRdbY004786@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 66374 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2004 23:27:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=66374 Change 66374 by sam@sam_ebb on 2004/12/03 23:27:09 correct the handling of fixed xmit rate: don't apply it to the negotiated rate set; just require that a negotiated rate set include the fix rate then leave it to the drivers/rate control algorithm to use only the fixed rate when sending frames Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#12 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#12 (text+ko) ==== @@ -330,12 +330,18 @@ { #define RV(v) ((v) & IEEE80211_RATE_VAL) int i, j, ignore, error; - int okrate, badrate; + int okrate, badrate, fixedrate; struct ieee80211_rateset *srs, *nrs; u_int8_t r; + /* + * If the fixed rate check was requested but no + * fixed has been defined then just remove it. + */ + if ((flags & IEEE80211_F_DOFRATE) && ic->ic_fixed_rate < 0) + flags &= ~IEEE80211_F_DOFRATE; error = 0; - okrate = badrate = 0; + okrate = badrate = fixedrate = 0; srs = &ic->ic_sup_rates[ieee80211_chan2mode(ic, ni->ni_chan)]; nrs = &ni->ni_rates; for (i = 0; i < nrs->rs_nrates; ) { @@ -356,17 +362,10 @@ badrate = r; if (flags & IEEE80211_F_DOFRATE) { /* - * Apply fixed rate constraint. Note that we do - * not apply the constraint to basic rates as - * otherwise we may not be able to associate if - * the rate set we submit to the AP is invalid - * (e.g. fix rate at 36Mb/s which is not a basic - * rate for 11a operation). + * Check any fixed rate is included. */ - if ((nrs->rs_rates[i] & IEEE80211_RATE_BASIC) == 0 && - ic->ic_fixed_rate >= 0 && - r != RV(srs->rs_rates[ic->ic_fixed_rate])) - ignore++; + if (r == RV(srs->rs_rates[ic->ic_fixed_rate])) + fixedrate = r; } if (flags & IEEE80211_F_DONEGO) { /* @@ -416,7 +415,8 @@ okrate = nrs->rs_rates[i]; i++; } - if (okrate == 0 || error != 0) + if (okrate == 0 || error != 0 || + ((flags & IEEE80211_F_DOFRATE) && fixedrate == 0)) return badrate | IEEE80211_RATE_BASIC; else return RV(okrate);