From owner-p4-projects@FreeBSD.ORG Wed Sep 24 14:54:32 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40BDF16A4C0; Wed, 24 Sep 2003 14:54:32 -0700 (PDT) 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 172FA16A4B3 for ; Wed, 24 Sep 2003 14:54:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CE2A43FF3 for ; Wed, 24 Sep 2003 14:54:31 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OLsVXJ018691 for ; Wed, 24 Sep 2003 14:54:31 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OLsUsw018688 for perforce@freebsd.org; Wed, 24 Sep 2003 14:54:30 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 24 Sep 2003 14:54:30 -0700 (PDT) Message-Id: <200309242154.h8OLsUsw018688@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 38544 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: Wed, 24 Sep 2003 21:54:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=38544 Change 38544 by sam@sam_ebb on 2003/09/24 14:53:56 Correct rate set negotiation when operating as a station: if the AP has basic rates that we do not support then ignore them instead of marking the rate set in error. This fixes an 11b station associating with an 11g/b AP. Affected files ... .. //depot/projects/netperf/sys/net80211/ieee80211_proto.c#3 edit Differences ... ==== //depot/projects/netperf/sys/net80211/ieee80211_proto.c#3 (text+ko) ==== @@ -220,7 +220,7 @@ okrate = badrate = 0; srs = &ic->ic_sup_rates[ieee80211_chan2mode(ic, ni->ni_chan)]; nrs = &ni->ni_rates; - for (i = 0; i < ni->ni_rates.rs_nrates; ) { + for (i = 0; i < nrs->rs_nrates; ) { ignore = 0; if (flags & IEEE80211_F_DOSORT) { /* @@ -259,7 +259,16 @@ break; } if (j == srs->rs_nrates) { - if (nrs->rs_rates[i] & IEEE80211_RATE_BASIC) + /* + * A rate in the node's rate set is not + * supported. If this is a basic rate and we + * are operating as an AP then this is an error. + * Otherwise we just discard/ignore the rate. + * Note that this is important for 11b stations + * when they want to associate with an 11g AP. + */ + if (ic->ic_opmode == IEEE80211_M_HOSTAP && + (nrs->rs_rates[i] & IEEE80211_RATE_BASIC)) error++; ignore++; }