From owner-freebsd-wireless@FreeBSD.ORG Tue Aug 13 10:00:01 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95E1E6B4 for ; Tue, 13 Aug 2013 10:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 696332983 for ; Tue, 13 Aug 2013 10:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7DA01O7077997 for ; Tue, 13 Aug 2013 10:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7DA0135077996; Tue, 13 Aug 2013 10:00:01 GMT (envelope-from gnats) Date: Tue, 13 Aug 2013 10:00:01 GMT Message-Id: <201308131000.r7DA0135077996@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/181100: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 10:00:01 -0000 The following reply was made to PR kern/181100; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/181100: commit references a PR Date: Tue, 13 Aug 2013 09:58:35 +0000 (UTC) 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)); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"