Date: Tue, 13 Aug 2013 09:58:28 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254279 - head/sys/dev/bwi Message-ID: <201308130958.r7D9wSEn040672@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Tue Aug 13 09:58:27 2013 New Revision: 254279 URL: http://svnweb.freebsd.org/changeset/base/254279 Log: ieee80211_rate2plcp() and ieee80211_rate2phytype() are both pre-11n routines and thus assert if one passes in a rate code with the high bit set. Since the high bit can indicate either IEEE80211_RATE_BASIC or IEEE80211_RATE_MCS, it's up to the caller to determine whether the rate is 11n or not, and either mask out the BASIC bit, or call a different function. (Yes, this does mean that net80211 should grow 11n-aware rate2phytype() and rate2plcp() functions..) This may need to happen for the other drivers - it's currently only done (now) for iwn(4) and bwi(4). PR: kern/181100 Modified: head/sys/dev/bwi/bwimac.c Modified: head/sys/dev/bwi/bwimac.c ============================================================================== --- head/sys/dev/bwi/bwimac.c Tue Aug 13 09:06:18 2013 (r254278) +++ head/sys/dev/bwi/bwimac.c Tue Aug 13 09:58:27 2013 (r254279) @@ -1427,7 +1427,8 @@ bwi_mac_set_ackrates(struct bwi_mac *mac enum ieee80211_phytype modtype; uint16_t ofs; - modtype = ieee80211_rate2phytype(rt, rs->rs_rates[i]); + modtype = ieee80211_rate2phytype(rt, + rs->rs_rates[i] & IEEE80211_RATE_VAL); switch (modtype) { case IEEE80211_T_DS: ofs = 0x4c0; @@ -1438,7 +1439,9 @@ bwi_mac_set_ackrates(struct bwi_mac *mac default: panic("unsupported modtype %u\n", modtype); } - ofs += 2*(ieee80211_rate2plcp(rs->rs_rates[i], modtype) & 0xf); + ofs += 2*(ieee80211_rate2plcp( + rs->rs_rates[i] & IEEE80211_RATE_VAL, + modtype) & 0xf); MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, ofs + 0x20, MOBJ_READ_2(mac, BWI_COMM_MOBJ, ofs));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308130958.r7D9wSEn040672>