All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfg80211: make RATE_INFO_BW_20 the default
@ 2017-05-04  6:42 Johannes Berg
  2017-05-04 15:13 ` David Miller
  2017-05-04 17:15 ` David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Berg @ 2017-05-04  6:42 UTC (permalink / raw)
  To: linux-wireless; +Cc: Linus Torvalds, netdev, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Due to the way I did the RX bitrate conversions in mac80211 with
spatch, going setting flags to setting the value, many drivers now
don't set the bandwidth value for 20 MHz, since with the flags it
wasn't necessary to (there was no 20 MHz flag, only the others.)

Rather than go through and try to fix up all the drivers, instead
renumber the enum so that 20 MHz, which is the typical bandwidth,
actually has the value 0, making those drivers all work again.

If VHT was hit used with a driver not reporting it, e.g. iwlmvm,
this manifested in hitting the bandwidth warning in
cfg80211_calculate_bitrate_vht().

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/net/cfg80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6e90f1a4950f..15d6599b8bc6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1013,9 +1013,9 @@ enum rate_info_flags {
  * @RATE_INFO_BW_160: 160 MHz bandwidth
  */
 enum rate_info_bw {
+	RATE_INFO_BW_20 = 0,
 	RATE_INFO_BW_5,
 	RATE_INFO_BW_10,
-	RATE_INFO_BW_20,
 	RATE_INFO_BW_40,
 	RATE_INFO_BW_80,
 	RATE_INFO_BW_160,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
  2017-05-04  6:42 [PATCH] cfg80211: make RATE_INFO_BW_20 the default Johannes Berg
@ 2017-05-04 15:13 ` David Miller
  2017-05-04 15:16   ` Johannes Berg
  2017-05-04 17:15 ` David Miller
  1 sibling, 1 reply; 8+ messages in thread
From: David Miller @ 2017-05-04 15:13 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, torvalds, netdev, johannes.berg

From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu,  4 May 2017 08:42:30 +0200

> From: Johannes Berg <johannes.berg@intel.com>
> 
> Due to the way I did the RX bitrate conversions in mac80211 with
> spatch, going setting flags to setting the value, many drivers now
> don't set the bandwidth value for 20 MHz, since with the flags it
> wasn't necessary to (there was no 20 MHz flag, only the others.)
> 
> Rather than go through and try to fix up all the drivers, instead
> renumber the enum so that 20 MHz, which is the typical bandwidth,
> actually has the value 0, making those drivers all work again.
> 
> If VHT was hit used with a driver not reporting it, e.g. iwlmvm,
> this manifested in hitting the bandwidth warning in
> cfg80211_calculate_bitrate_vht().
> 
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Johannes, would you like me to merge this in via my tree directly?

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
  2017-05-04 15:13 ` David Miller
@ 2017-05-04 15:16   ` Johannes Berg
  2017-05-04 15:22       ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2017-05-04 15:16 UTC (permalink / raw)
  To: David Miller; +Cc: linux-wireless, torvalds, netdev

On Thu, 2017-05-04 at 11:13 -0400, David Miller wrote:
> 
> Johannes, would you like me to merge this in via my tree directly?

I figured I'd give Linus to a chance to try or even apply it, but I
have no objection to you applying it either. I don't have anything else
  yet right now, and sending a pull request for just a single patch
would be quite pointless.

johannes

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
@ 2017-05-04 15:22       ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2017-05-04 15:22 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, torvalds, netdev

From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu, 04 May 2017 17:16:42 +0200

> On Thu, 2017-05-04 at 11:13 -0400, David Miller wrote:
>> 
>> Johannes, would you like me to merge this in via my tree directly?
> 
> I figured I'd give Linus to a chance to try or even apply it, but I
> have no objection to you applying it either. I don't have anything else
>   yet right now, and sending a pull request for just a single patch
> would be quite pointless.

Ok, let's give Linus a chance to test the patch.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
@ 2017-05-04 15:22       ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2017-05-04 15:22 UTC (permalink / raw)
  To: johannes-cdvu00un1VgdHxzADdlk8Q
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	netdev-u79uwXL29TY76Z2rM5mHXA

From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Date: Thu, 04 May 2017 17:16:42 +0200

> On Thu, 2017-05-04 at 11:13 -0400, David Miller wrote:
>> 
>> Johannes, would you like me to merge this in via my tree directly?
> 
> I figured I'd give Linus to a chance to try or even apply it, but I
> have no objection to you applying it either. I don't have anything else
>   yet right now, and sending a pull request for just a single patch
> would be quite pointless.

Ok, let's give Linus a chance to test the patch.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
  2017-05-04  6:42 [PATCH] cfg80211: make RATE_INFO_BW_20 the default Johannes Berg
  2017-05-04 15:13 ` David Miller
@ 2017-05-04 17:15 ` David Miller
  1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2017-05-04 17:15 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, torvalds, netdev, johannes.berg

From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu,  4 May 2017 08:42:30 +0200

> From: Johannes Berg <johannes.berg@intel.com>
> 
> Due to the way I did the RX bitrate conversions in mac80211 with
> spatch, going setting flags to setting the value, many drivers now
> don't set the bandwidth value for 20 MHz, since with the flags it
> wasn't necessary to (there was no 20 MHz flag, only the others.)
> 
> Rather than go through and try to fix up all the drivers, instead
> renumber the enum so that 20 MHz, which is the typical bandwidth,
> actually has the value 0, making those drivers all work again.
> 
> If VHT was hit used with a driver not reporting it, e.g. iwlmvm,
> this manifested in hitting the bandwidth warning in
> cfg80211_calculate_bitrate_vht().
> 
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Since Jens Axboe had the same problem and tested this patch, I'm
tossing it into my tree.

Just FYI...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
@ 2017-05-04 17:33         ` Linus Torvalds
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2017-05-04 17:33 UTC (permalink / raw)
  To: David Miller; +Cc: Johannes Berg, Linux Wireless List, Network Development

On Thu, May 4, 2017 at 8:22 AM, David Miller <davem@davemloft.net> wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
>>
>> I figured I'd give Linus to a chance to try or even apply it, but I
>> have no objection to you applying it either. I don't have anything else
>>   yet right now, and sending a pull request for just a single patch
>> would be quite pointless.
>
> Ok, let's give Linus a chance to test the patch.

I'm having trouble recreating the warning. I have no idea why. It only
happened during ten minutes yesterday, and nothing in my wireless
setup has changed.

I wonder if *normally* my setup ends up connecting with a 40MHz band
or something, and I just happened to see the default uninitialized
case once.

I see that Jens reported that the patch works, although I'm wondering
how repeatable it was for him.  The patch obviously looks simple and
seems like an obviously GoodThing(tm) regardless.

                   Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
@ 2017-05-04 17:33         ` Linus Torvalds
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2017-05-04 17:33 UTC (permalink / raw)
  To: David Miller; +Cc: Johannes Berg, Linux Wireless List, Network Development

On Thu, May 4, 2017 at 8:22 AM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
> From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
>>
>> I figured I'd give Linus to a chance to try or even apply it, but I
>> have no objection to you applying it either. I don't have anything else
>>   yet right now, and sending a pull request for just a single patch
>> would be quite pointless.
>
> Ok, let's give Linus a chance to test the patch.

I'm having trouble recreating the warning. I have no idea why. It only
happened during ten minutes yesterday, and nothing in my wireless
setup has changed.

I wonder if *normally* my setup ends up connecting with a 40MHz band
or something, and I just happened to see the default uninitialized
case once.

I see that Jens reported that the patch works, although I'm wondering
how repeatable it was for him.  The patch obviously looks simple and
seems like an obviously GoodThing(tm) regardless.

                   Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-04 17:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04  6:42 [PATCH] cfg80211: make RATE_INFO_BW_20 the default Johannes Berg
2017-05-04 15:13 ` David Miller
2017-05-04 15:16   ` Johannes Berg
2017-05-04 15:22     ` David Miller
2017-05-04 15:22       ` David Miller
2017-05-04 17:33       ` Linus Torvalds
2017-05-04 17:33         ` Linus Torvalds
2017-05-04 17:15 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.