From owner-p4-projects@FreeBSD.ORG Sat Feb 24 00:16:12 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 27A6616A405; Sat, 24 Feb 2007 00:16:12 +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 D0D8316A402 for ; Sat, 24 Feb 2007 00:16:11 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id C10B013C47E for ; Sat, 24 Feb 2007 00:16:11 +0000 (UTC) (envelope-from sam@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 l1O0GBfs042398 for ; Sat, 24 Feb 2007 00:16:11 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1O0GBsK042395 for perforce@freebsd.org; Sat, 24 Feb 2007 00:16:11 GMT (envelope-from sam@freebsd.org) Date: Sat, 24 Feb 2007 00:16:11 GMT Message-Id: <200702240016.l1O0GBsK042395@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 Cc: Subject: PERFORCE change 114939 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: Sat, 24 Feb 2007 00:16:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=114939 Change 114939 by sam@sam_ebb on 2007/02/24 00:15:27 change ieee80211_fix_rate to take a rate set instead of implicitly using ni_rates; for 11n we're going to supply something different Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#90 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#82 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#47 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#30 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#90 (text+ko) ==== @@ -954,7 +954,7 @@ memcpy(rs->rs_rates + rs->rs_nrates, xrates+2, nxrates); rs->rs_nrates += nxrates; } - return ieee80211_fix_rate(ni, flags); + return ieee80211_fix_rate(ni, rs, flags); } static void ==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#82 (text+ko) ==== @@ -404,7 +404,7 @@ if (ni->ni_capinfo & IEEE80211_CAPINFO_PRIVACY) return 0; } - rate = ieee80211_fix_rate(ni, + rate = ieee80211_fix_rate(ni, &ni->ni_rates, IEEE80211_F_JOIN | IEEE80211_F_DONEGO | IEEE80211_F_DOFRATE); if (rate & IEEE80211_RATE_BASIC) return 0; @@ -445,7 +445,7 @@ if (ni->ni_capinfo & IEEE80211_CAPINFO_PRIVACY) fail |= 0x04; } - rate = ieee80211_fix_rate(ni, + rate = ieee80211_fix_rate(ni, &ni->ni_rates, IEEE80211_F_JOIN | IEEE80211_F_DONEGO | IEEE80211_F_DOFRATE); if (rate & IEEE80211_RATE_BASIC) fail |= 0x08; @@ -565,7 +565,8 @@ * Delete unusable rates; we've already checked * that the negotiated rate set is acceptable. */ - ieee80211_fix_rate(ic->ic_bss, IEEE80211_F_DODEL | IEEE80211_F_JOIN); + ieee80211_fix_rate(ic->ic_bss, &ic->ic_bss->ni_rates, + IEEE80211_F_DODEL | IEEE80211_F_JOIN); ic->ic_bsschan = selbs->ni_chan; ic->ic_curchan = ic->ic_bsschan; ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#47 (text+ko) ==== @@ -346,21 +346,20 @@ } int -ieee80211_fix_rate(struct ieee80211_node *ni, int flags) +ieee80211_fix_rate(struct ieee80211_node *ni, + struct ieee80211_rateset *nrs, int flags) { #define RV(v) ((v) & IEEE80211_RATE_VAL) struct ieee80211com *ic = ni->ni_ic; int i, j, rix, error; int okrate, badrate, fixedrate; const struct ieee80211_rateset *srs; - struct ieee80211_rateset *nrs; u_int8_t r; error = 0; okrate = badrate = 0; fixedrate = IEEE80211_FIXED_RATE_NONE; srs = ieee80211_get_suprates(ic, ni->ni_chan); - nrs = &ni->ni_rates; for (i = 0; i < nrs->rs_nrates; ) { if (flags & IEEE80211_F_DOSORT) { /* ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#30 (text+ko) ==== @@ -185,7 +185,8 @@ #define IEEE80211_F_DONEGO 0x00000004 /* calc negotiated rate */ #define IEEE80211_F_DODEL 0x00000008 /* delete ignore rate */ #define IEEE80211_F_JOIN 0x00000010 /* sta joining our bss */ -int ieee80211_fix_rate(struct ieee80211_node *, int); +int ieee80211_fix_rate(struct ieee80211_node *, + struct ieee80211_rateset *, int); /* * WME/WMM support.