From owner-p4-projects@FreeBSD.ORG Thu Feb 1 13:47:35 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0ABFA16A40A; Thu, 1 Feb 2007 13:47:35 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA88616A402 for ; Thu, 1 Feb 2007 13:47:34 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 9A81D13C48D for ; Thu, 1 Feb 2007 13:47:34 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l11DlYE0000900 for ; Thu, 1 Feb 2007 13:47:34 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l11DlY94000897 for perforce@freebsd.org; Thu, 1 Feb 2007 13:47:34 GMT (envelope-from sephe@FreeBSD.org) Date: Thu, 1 Feb 2007 13:47:34 GMT Message-Id: <200702011347.l11DlY94000897@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 113832 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 13:47:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=113832 Change 113832 by sephe@sephe_zealot:sam_wifi on 2007/02/01 13:46:36 - Don't try joining a BSS if one of its basic rates is not supported by the wireless NIC. Add comment about it. - Nuke tab on blank line. Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#13 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#13 (text+ko) ==== @@ -692,7 +692,7 @@ const u_int8_t *rs; okrate = badrate = fixedrate = 0; - + if (IEEE80211_IS_CHAN_HALF(se->se_chan)) { srs = &ic->ic_sup_half_rates; } else if (IEEE80211_IS_CHAN_QUARTER(se->se_chan)) { @@ -721,6 +721,15 @@ okrate = r; break; } + + if (j == srs->rs_nrates && (rs[i] & IEEE80211_RATE_BASIC)) { + /* + * Don't try joining a BSS, if we don't support + * one of its basic rates. + */ + okrate = 0; + goto back; + } } if (rs == se->se_rates+2) { /* scan xrates too; sort of an algol68-style for loop */ @@ -728,6 +737,8 @@ rs = se->se_xrates+2; goto again; } + +back: if (okrate == 0 || ic->ic_fixed_rate != fixedrate) return badrate | IEEE80211_RATE_BASIC; else