All of lore.kernel.org
 help / color / mirror / Atom feed
* mac80211_hwsim: wrong tx/rx bitrate when width != 20MHz
@ 2020-09-30  2:21 Ramon Fontes
  2021-03-18 17:01 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Ramon Fontes @ 2020-09-30  2:21 UTC (permalink / raw)
  To: linux-wireless

I'm running 2 virtual interfaces: one in master mode with hostapd
(802.11n in 40MHz) and the other one in managed mode.

I can confirm that the AP is working on 40MHz:

ap1 iw dev ap1-wlan1 info
Interface ap1-wlan1
ifindex 221
wdev 0x6c00000001
addr 02:00:00:00:02:00
ssid new-ssid
type AP
wiphy 108
channel 3 (2422 MHz), width: 40 MHz, center1: 2432 MHz
txpower 14.00 dBm

as well as the client:

sta1 iw dev sta1-wlan0 info
Interface sta1-wlan0
ifindex 219
wdev 0x6a00000001
addr 00:00:00:00:00:02
ssid new-ssid
type managed
wiphy 106
channel 3 (2422 MHz), width: 40 MHz, center1: 2432 MHz
txpower 14.00 dBm

However, tx/rx bitrates of the client are not equivalent to the 40 MHz
channels. Only the MCS index seems to be ok and I can change it via
iw.

sta1 iw dev sta1-wlan0 link
Connected to 02:00:00:00:02:00 (on sta1-wlan0)
SSID: new-ssid
freq: 2422
RX: 1199869 bytes (12752 packets)
TX: 4055 bytes (41 packets)
signal: -14 dBm
rx bitrate: 6.0 MBit/s
tx bitrate: 39.0 MBit/s MCS 4
bss flags: short-slot-time
dtim period: 2
beacon int: 100

For some reason I can see the correct tx/rx bitrate right at the
beginning of the association (e.g. tx bitrate: 270.0 MBit/s MCS 15
40MHz), but right after that they change to 20 MHz. I have been trying
to identify errors in mac80211_hwsim, but I was not successful. Can
anybody help me? I did tests with/without wmediumd and the results are
the same.

--
Ramon Fontes

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

* Re: mac80211_hwsim: wrong tx/rx bitrate when width != 20MHz
  2020-09-30  2:21 mac80211_hwsim: wrong tx/rx bitrate when width != 20MHz Ramon Fontes
@ 2021-03-18 17:01 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2021-03-18 17:01 UTC (permalink / raw)
  To: Ramon Fontes, linux-wireless

On Tue, 2020-09-29 at 23:21 -0300, Ramon Fontes wrote:
> I'm running 2 virtual interfaces: one in master mode with hostapd
> (802.11n in 40MHz) and the other one in managed mode.
> 
> I can confirm that the AP is working on 40MHz:
> 
> ap1 iw dev ap1-wlan1 info
> Interface ap1-wlan1
> ifindex 221
> wdev 0x6c00000001
> addr 02:00:00:00:02:00
> ssid new-ssid
> type AP
> wiphy 108
> channel 3 (2422 MHz), width: 40 MHz, center1: 2432 MHz
> txpower 14.00 dBm
> 
> as well as the client:
> 
> sta1 iw dev sta1-wlan0 info
> Interface sta1-wlan0
> ifindex 219
> wdev 0x6a00000001
> addr 00:00:00:00:00:02
> ssid new-ssid
> type managed
> wiphy 106
> channel 3 (2422 MHz), width: 40 MHz, center1: 2432 MHz
> txpower 14.00 dBm
> 
> However, tx/rx bitrates of the client are not equivalent to the 40 MHz
> channels. Only the MCS index seems to be ok and I can change it via
> iw.

You are setting it fixed? What if set the bandwidth too?

Or maybe that's not implemented right?

I was going to say that for rate scaling there's no requirement to pick
40MHz, although there's no reason (especially in hwsim) for it to pick
anything else either, so that's a bit odd.

> For some reason I can see the correct tx/rx bitrate right at the
> beginning of the association (e.g. tx bitrate: 270.0 MBit/s MCS 15
> 40MHz), but right after that they change to 20 MHz. I have been trying
> to identify errors in mac80211_hwsim, but I was not successful. Can
> anybody help me? I did tests with/without wmediumd and the results are
> the same.

Now I'm confused - you said here "they change", but above you set you
were actually setting them fixed? So they should change?

If you do nothing fixed, what happens?

johannes


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

end of thread, other threads:[~2021-03-18 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30  2:21 mac80211_hwsim: wrong tx/rx bitrate when width != 20MHz Ramon Fontes
2021-03-18 17:01 ` Johannes Berg

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.