On Sun, Jan 01, 2023 at 09:00:30PM +0000, Ali Farzanrad wrote:
> Hi Stefan,
> 
> Stefan Sperling <s...@stsp.name> wrote:
> > On Sun, Jan 01, 2023 at 05:00:35PM +0000, Ali Farzanrad wrote:
> > > Hi tech@,
> > > 
> > > Happy new year!
> > > I have some weird problems with my athn interface which drives me crazy.
> > > 
> > > 1. Whenever I configure my athn as `media auto' for the first time it
> > > correctly detects correct media subclass, but as soon as I select exact
> > > same media subclass manually, it diverts to DS1 media subclass and after
> > > that auto will not work again (I need to reboot system or my WiFi
> > > provider aka my Android phone).
> > 
> > You are not supposed to force a specific Tx rate, unless you are
> > debugging a Tx-specific problem in the code. The driver will
> > adjust the Tx rate on demand, based on packet loss statistics.
> > If you force a specific Tx rate then associated devices will either see
> > a lot of packet loss (if the rate is too high and the device is too far
> > away) or very low speed (if the Tx rate is forced to a low rate).
> 
> OK, but the point is DS1 is not a correst config for my Android WiFi.
> Normally it should be HT-MCS0 or HT-MCS7 in 11n mode.

Given your android phone is the AP which athn(4) connects to, indeed,
the driver should use HT-MCS0 up to HT-MCS7 while connected in 11n mode
(retried frames will use legacy rates if HT-MCS0 doesn't work, but this
won't be displayed by ifconfig; you would have to capture frames from
the air with a separate wifi device in monitor mode to see this).

Because there is no support for Tx aggregation and 40Mhz channels in
our athn driver yet, running athn in 11n mode does not provide a
significant performance advantage over 11a/11g modes. The driver does
support Rx aggregation though, so at least traffic sent from the AP to
the athn client may be a bit faster than in 11a/11g modes.

> > On 2Ghz channels the driver will start out in DS1 and adjust upwards,
> > and adjust the rate upwards if packet loss remains low while doing so.
> 
> So it might be my Android phone problem which caused my system think DS1
> is the correct config, right?

I don't know why ifconfig would show DS1 if 11n mode is active.
I believe it is possible for DS1 to show up somewhere in ifconfig output
If you forced it to use DS1 earlier and produced a non-default media
config as a result. In such cases the media info shown by ifconfig might
be incorrect and confusing. No polish has gone into that part of the
user-facing display because it is not really intended for users. AFAIK the
commands which force a particular Tx rate aren't even documented anymore.
We removed the docs at some point because regular users should not need
to fiddle with wifi Tx rate selection.

You might simply not be switching back into auto-selection mode with
the commands you are running. Try rebooting with a hostnname.athn0
that does not contain any 'media' and 'mode' commands and it should
be reset to defaults (that is the foolproof way to reset things; there
are other ways but I'd rather avoid talking about those without a solid
understanding of what you were doing).

Reply via email to