Bug 206199 - dev/bwn suppressing "bwn0: unsupported rate 0" messages
Summary: dev/bwn suppressing "bwn0: unsupported rate 0" messages
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-wireless (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-13 13:00 UTC by Mugenga Marius
Modified: 2024-12-24 17:42 UTC (History)
3 users (show)

See Also:


Attachments
The patch file (105 bytes, patch)
2016-01-13 13:00 UTC, Mugenga Marius
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mugenga Marius 2016-01-13 13:00:32 UTC
Created attachment 165497 [details]
The patch file

Background:
-----------
https://forums.freebsd.org/threads/minor-nuisance-issue-bwn0-unsupported-rate-0.41355/

Original code:
--------------
https://svnweb.freebsd.org/base/release/10.2.0/sys/dev/bwn/if_bwn.c?view=markup#l9635

9635 	        else {
9636 	                rix = ieee80211_ratectl_rate(ni, NULL, 0);
9637 	                rate = ni->ni_txrate;
9638 	
9639 	                if (rix > 0)
9640 	                        rate_fb = ni->ni_rates.rs_rates[rix - 1] &
9641 	                            IEEE80211_RATE_VAL;
9642 	                else
9643 	                        rate_fb = rate;
9644 	        }

Explanation:
------------
The ni->ni_rates.rs_rates container is supposed to house the negotiated rates 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 (supposed 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.
Comment 1 Mugenga Marius 2016-02-02 09:11:51 UTC
A cleaner solution would be review D5165.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2024-09-28 00:05:35 UTC
Comment on attachment 165497 [details]
The patch file

^Triage: correctly set flag.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2024-09-28 00:07:23 UTC
^Triage: clear the now obsolete 'patch' keyword.

To submitter: is this aging PR still relevant?