Date: Sat, 24 Feb 2007 00:16:11 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 114939 for review Message-ID: <200702240016.l1O0GBsK042395@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702240016.l1O0GBsK042395>