From owner-freebsd-bugs@freebsd.org Wed Jan 13 13:00:32 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE071A80578 for ; Wed, 13 Jan 2016 13:00:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4E0819CA for ; Wed, 13 Jan 2016 13:00:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0DD0WrG095084 for ; Wed, 13 Jan 2016 13:00:32 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 206199] [patch] dev/bwn suppressing "bwn0: unsupported rate 0" messages Date: Wed, 13 Jan 2016 13:00:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mugius.0x101.freebsd@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2016 13:00:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206199 Bug ID: 206199 Summary: [patch] dev/bwn suppressing "bwn0: unsupported rate 0" messages Product: Base System Version: 10.2-RELEASE Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: mugius.0x101.freebsd@gmail.com Keywords: patch Created attachment 165497 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D165497&action= =3Dedit The patch file Background: ----------- https://forums.freebsd.org/threads/minor-nuisance-issue-bwn0-unsupported-ra= te-0.41355/ Original code: -------------- https://svnweb.freebsd.org/base/release/10.2.0/sys/dev/bwn/if_bwn.c?view=3D= markup#l9635 9635 else { 9636 rix =3D ieee80211_ratectl_rate(ni, NULL, 0); 9637 rate =3D ni->ni_txrate; 9638=20=20=20=20 9639 if (rix > 0) 9640 rate_fb =3D ni->ni_rates.rs_rates[rix - 1] & 9641 IEEE80211_RATE_VAL; 9642 else 9643 rate_fb =3D rate; 9644 } Explanation: ------------ The ni->ni_rates.rs_rates container is supposed to house the negotiated rat= es in increasing magnitude. The rix variable contains the size of this container. The original code is trying to get the last element in the container (suppo= sed to be the highest rate). After a few tests though, it turned out that this container has some filler elements of value "0" at its end. So, the last element in the container is = not necessarily the highest rate. --=20 You are receiving this mail because: You are the assignee for the bug.=