Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 2016 09:06:14 +0000
From:      "mugius.0x101.freebsd_gmail.com (Mugenga Marius)" <phabric-noreply@FreeBSD.org>
To:        freebsd-net@freebsd.org
Subject:   [Differential] [Request, 9 lines] D5165: [patch] dev/bwn suppressing "bwn0: unsupported rate 0" console messages
Message-ID:  <differential-rev-PHID-DREV-sspsi5ldivzec5r4khyj-req@FreeBSD.org>

index | next in thread | raw e-mail

[-- Attachment #1 --]
mugius.0x101.freebsd_gmail.com created this revision.
mugius.0x101.freebsd_gmail.com added a reviewer: network.
mugius.0x101.freebsd_gmail.com added a subscriber: freebsd-net-list.
mugius.0x101.freebsd_gmail.com set the repository for this revision to rS FreeBSD src repository.
Herald added a subscriber: imp.

REVISION SUMMARY
  Update to PR206199 <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206199>;

REPOSITORY
  rS FreeBSD src repository

REVISION DETAIL
  https://reviews.freebsd.org/D5165

AFFECTED FILES
  head/sys/dev/bwn/if_bwn.c

CHANGE DETAILS
  diff --git a/head/sys/dev/bwn/if_bwn.c b/head/sys/dev/bwn/if_bwn.c
  --- a/head/sys/dev/bwn/if_bwn.c
  +++ b/head/sys/dev/bwn/if_bwn.c
  @@ -9467,7 +9467,7 @@
   	struct mbuf *mprot;
   	unsigned int len;
   	uint32_t macctl = 0;
  -	int protdur, rts_rate, rts_rate_fb, ismcast, isshort, rix, type;
  +	int protdur, rts_rate, rts_rate_fb, ismcast, isshort, nrates, type;
   	uint16_t phyctl = 0;
   	uint8_t rate, rate_fb;
   
  @@ -9489,11 +9489,12 @@
   	else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE)
   		rate = rate_fb = tp->ucastrate;
   	else {
  -		rix = ieee80211_ratectl_rate(ni, NULL, 0);
  +		ieee80211_ratectl_rate(ni, NULL, 0);
  +		nrates = ni->ni_rates.rs_nrates;
   		rate = ni->ni_txrate;
   
  -		if (rix > 0)
  -			rate_fb = ni->ni_rates.rs_rates[rix - 1] &
  +		if (nrates > 0)
  +			rate_fb = ni->ni_rates.rs_rates[nrates - 1] &
   			    IEEE80211_RATE_VAL;
   		else
   			rate_fb = rate;

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: mugius.0x101.freebsd_gmail.com, network
Cc: imp, freebsd-net-list

[-- Attachment #2 --]
diff --git a/head/sys/dev/bwn/if_bwn.c b/head/sys/dev/bwn/if_bwn.c
--- a/head/sys/dev/bwn/if_bwn.c
+++ b/head/sys/dev/bwn/if_bwn.c
@@ -9467,7 +9467,7 @@
 	struct mbuf *mprot;
 	unsigned int len;
 	uint32_t macctl = 0;
-	int protdur, rts_rate, rts_rate_fb, ismcast, isshort, rix, type;
+	int protdur, rts_rate, rts_rate_fb, ismcast, isshort, nrates, type;
 	uint16_t phyctl = 0;
 	uint8_t rate, rate_fb;
 
@@ -9489,11 +9489,12 @@
 	else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE)
 		rate = rate_fb = tp->ucastrate;
 	else {
-		rix = ieee80211_ratectl_rate(ni, NULL, 0);
+		ieee80211_ratectl_rate(ni, NULL, 0);
+		nrates = ni->ni_rates.rs_nrates;
 		rate = ni->ni_txrate;
 
-		if (rix > 0)
-			rate_fb = ni->ni_rates.rs_rates[rix - 1] &
+		if (nrates > 0)
+			rate_fb = ni->ni_rates.rs_rates[nrates - 1] &
 			    IEEE80211_RATE_VAL;
 		else
 			rate_fb = rate;

help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-sspsi5ldivzec5r4khyj-req>