Re: Add Intel Wi-Fi 6 AX211 0x51f1 device

2023-06-27 Thread Reyk Floeter
On Tue, Jun 27, 2023 at 11:55:15AM +0200, Stefan Sperling wrote:
> On Tue, Jun 27, 2023 at 10:55:04AM +0200, Reyk Floeter wrote:
> > Hi,
> > 
> > the following diff adds the Intel Wi-Fi 6 0x51f1 device, found in a
> > new Thinkpad X1 Carbon Gen 11.
> > 
> > iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX211" rev 0x01, msix
> > iwx0: hw rev 0x370, fw 77.f92b5fed.0, pnvm e4a49534, address ...
> > 
> > I looked at the Linux code for the values for 0x51f1 and 0x7a70:
> > https://github.com/torvalds/linux/commit/1c4db7613f35b248ff05b8bfb3a4580a3d11d75c
> 
> Thanks, your diff looks correct to me. ok stsp@
> 

Cool, thanks.

> > This works fine with my 11ac setup and performance seems OK (around
> > 200Mbps - what can I expect on OpenBSD these days?).  I don't know if
> > the device supports UHB channels.
> 
> This speed matches what I see in my environment, more or less.
> Apparently it goes up to 300 Mbit/s for some people, but I have never
> seen it go that far up myself.
> 

I tested it with tcpbench again and I get 210Mbps max locally when I
stand right next to the AP.

> We are capped to 80 MHz channels at the moment. I do have a 160MHz AP now
> but would need to find spare time to make that work (as things look right
> now, me finding time for this soon is rather unlikely).
> 
> And the size we advertise for aggregates on Rx in VHT capabilities is
> the smallest possible value we can advertise in 11ac (3895 octets).
> Increasing this frame size limit should result in a performance boost.
> We might have to increase the size of our Rx buffers accordingly, unless
> the hardware handles de-aggregation into a cluster of our 4k-sized Rx
> buffers, which may well be the case but I don't know for sure.
> It would not be an entirely trivial diff, but likely less coding work
> and more widely applicable than 160 MHz channel support.

I recently switched to UniFi and I regret it a bit. I remember that my
older Aruba setup was faster, even on Mac.  But maybe UniFi is doing
something differently and it's primarily a compatibility issue.

Reyk



Re: Add Intel Wi-Fi 6 AX211 0x51f1 device

2023-06-27 Thread Stuart Henderson
On 2023/06/27 10:55, Stuart Henderson wrote:
> I have this (AP is mikrotik hapax2

> 0x0001, country 'GB ', channel 36 limit 23dB, channel 40 limit
> 23dB, channel 44 limit 23dB, channel 48 limit 23dB, channel 52 limit
> 23dB, channel 56 limit 23dB, channel 60 limit 23dB, channel 64 limit
> 23dB, channel 100 limit 30dB, channel 104 limit 30dB, channel 108
> limit 30dB, channel 112 limit 30dB, channel 116 limit 30dB, channel
> 120 limit 30dB, channel 124 limit 30dB, channel 128 limit 30dB,
> channel 132 limit 30dB, channel 136 limit 30dB, channel 140 limit
> 30dB, channel 144 limit 30dB, channel 149 limit 14dB, channel 153
> limit 14dB, channel 157 limit 14dB, channel 161 limit 14dB, channel
> 165 limit 14dB, channel 169 limit 14dB, channel 173 limit 14dB,





Re: Add Intel Wi-Fi 6 AX211 0x51f1 device

2023-06-27 Thread Stuart Henderson
On 2023/06/27 10:55, Reyk Floeter wrote:
> This works fine with my 11ac setup and performance seems OK (around
> 200Mbps - what can I expect on OpenBSD these days?).  I don't know if
> the device supports UHB channels.

That seems a little on the low side but in the right ballpark,
I have this (AP is mikrotik hapax2 - I get about 470Mb/s on
internet speed tests to my phone which is probably maxed out
on the internet connection)

$ tcpbench -n 4 10.15.5.102
[...snip...]
Conn:   4 Mbps:  270.078 Peak Mbps:  271.705 Avg Mbps:   67.519
   58198   14073112  112.811   43.69%
   581954542376   36.412   14.10%
   581924223816   33.858   13.11%
   581909374352   75.145   29.10%
Conn:   4 Mbps:  258.226 Peak Mbps:  271.705 Avg Mbps:   64.556
   59206   14284520  113.482   43.53%
   592034734960   37.616   14.43%
   592004290424   34.085   13.08%
   591979501776   75.486   28.96%
Conn:   4 Mbps:  260.669 Peak Mbps:  271.705 Avg Mbps:   65.167
   60211   14145512  112.601   43.21%
   602094781296   38.060   14.60%
   602064377304   34.844   13.37%
   602039435168   75.106   28.82%
Conn:   4 Mbps:  260.611 Peak Mbps:  271.705 Avg Mbps:   65.153
^C
--- 10.15.5.102 tcpbench statistics ---
1978465612 bytes sent over 60.560 seconds
bandwidth min/avg/max/std-dev = 248.205/261.506/271.705/4.365 Mbps

802.11 flags=0<>: beacon, timestamp 2230421504685, interval 100, 
caps=12421, ssid 
(XXX), rates 6M* 9M 12M* 18M 24M* 36M 48M 54M, ds (chan 36), tim 0x0001, 
country 'GB ', channel 36 limit 23dB, channel 40 limit 23dB, channel 44 limit 
23dB, channel 48 limit 23dB, channel 52 limit 23dB, channel 56 limit 23dB, 
channel 60 limit 23dB, channel 64 limit 23dB, channel 100 limit 30dB, channel 
104 limit 30dB, channel 108 limit 30dB, channel 112 limit 30dB, channel 116 
limit 30dB, channel 120 limit 30dB, channel 124 limit 30dB, channel 128 limit 
30dB, channel 132 limit 30dB, channel 136 limit 30dB, channel 140 limit 30dB, 
channel 144 limit 30dB, channel 149 limit 14dB, channel 153 limit 14dB, channel 
157 limit 14dB, channel 161 limit 14dB, channel 165 limit 14dB, channel 169 
limit 14dB, channel 173 limit 14dB, power constraint 0dB, tpcreport 0x1200, 
rsn=, 3 stations, 3% utilization, admission capacity 
0us/s, 70:5 0x73d00c, 
htcaps=<20/40MHz,LDPC,SGI@20MHz,SGI@40MHz,TXSTBC,RXSTBC 1 stream,A-MSDU 
7935,A-MPDU max 65535,RxMCS 0x>, htop=<40MHz chan 
36:40,htprot none,non-greenfield STA,basic MCS set 0x>, 127:10 
0x04000f400040, vhtcaps=, vhtop=, 195:4 0x022e2e2e, 244:1 0x20, 255:28 
0x230d01081a4010047048881f418104110800fafffaff391cc7711c07, 255:7 
0x24f43f002afcff, 255:2 0x2703, 255:14 0x260303a4ff27a4ff4243ff6232ff, vendor 
0x8cfdf0010102010002010103030101000401010902, vendor 
0x0050f2020101830003a427a442435e0062322f00, vendor 
0x8cfdf004494c510302097201fdff, vendor 0x8cfdf004010100, 




Re: Add Intel Wi-Fi 6 AX211 0x51f1 device

2023-06-27 Thread Stefan Sperling
On Tue, Jun 27, 2023 at 10:55:04AM +0200, Reyk Floeter wrote:
> Hi,
> 
> the following diff adds the Intel Wi-Fi 6 0x51f1 device, found in a
> new Thinkpad X1 Carbon Gen 11.
> 
> iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX211" rev 0x01, msix
> iwx0: hw rev 0x370, fw 77.f92b5fed.0, pnvm e4a49534, address ...
> 
> I looked at the Linux code for the values for 0x51f1 and 0x7a70:
> https://github.com/torvalds/linux/commit/1c4db7613f35b248ff05b8bfb3a4580a3d11d75c

Thanks, your diff looks correct to me. ok stsp@

> This works fine with my 11ac setup and performance seems OK (around
> 200Mbps - what can I expect on OpenBSD these days?).  I don't know if
> the device supports UHB channels.

This speed matches what I see in my environment, more or less.
Apparently it goes up to 300 Mbit/s for some people, but I have never
seen it go that far up myself.

We are capped to 80 MHz channels at the moment. I do have a 160MHz AP now
but would need to find spare time to make that work (as things look right
now, me finding time for this soon is rather unlikely).

And the size we advertise for aggregates on Rx in VHT capabilities is
the smallest possible value we can advertise in 11ac (3895 octets).
Increasing this frame size limit should result in a performance boost.
We might have to increase the size of our Rx buffers accordingly, unless
the hardware handles de-aggregation into a cluster of our 4k-sized Rx
buffers, which may well be the case but I don't know for sure.
It would not be an entirely trivial diff, but likely less coding work
and more widely applicable than 160 MHz channel support.