Download raw body.
sys/iwx: avoid unconditional RX antenna pattern
On Thu, Apr 02, 2026 at 12:03:30PM +0200, Kirill A. Korinsky wrote:
> On Thu, 02 Apr 2026 09:14:46 +0200,
> Stefan Sperling <stsp@stsp.name> wrote:
> >
> > On Thu, Apr 02, 2026 at 12:39:32AM +0200, Kirill A. Korinsky wrote:
> > > tech@,
> > >
> > > Here the next small bit of my iwx rework.
> > >
> > > I follow iwlwifi and advertise RX antenna pattern only when RX is
> > > effectively 1x1: there is one usable RX antenna, or MIMO is disabled.
> > >
> > > OK?
> >
> > By itself, I believe this change won't have any effect. As far as
> > I understand the antenna pattern is related to beamforming.
> >
> > Is this change prepraring us for beamforming support on the Rx side,
> > i.e. the AP will be able to use beamforming when sending us data?
> >
> > What else will be needed for this?
> >
>
> I think the right path is:
>
> 1. TX antenna
> 2. + RX antenna and STBC
> 3. + beamformee
> 4. + LDPC
>
> (1) is harmless and trivial, but since (2) some firmware commands are here.
>
> So, here 1 + 2 steps in one diff where I follow iwlwifi for antenna pattern
> and STBC advertisement. Advertise RX antenna pattern only when RX is
> effectively 1x1; advertise HT and VHT STBC unconditionally, and VHT TX
> antenna pattern only when TX is effectively 1x1, and program the firmware
> TLC STBC flag when the peer advertises RX STBC and the device has more than
> one valid TX antenna.
That makes more sense. Agreed that we should try this.
>
> + if (sc->sc_nvm.sku_cap_mimo_disable) {
> + num_rx_ant = 1;
> + num_tx_ant = 1;
> + }
The above check should use:
if (!iwx_mimo_enabled(sc)) {
otherwise, ifconfig iwx0 nwflag nomimo configuration would be ignored,
which the driver respects everywhere else.
It seems firmware will handle STBC internally if we enable the feature.
And as far as I can tell iwlwifi enables STBC on all devices supported
by iwx (unlike LDPC which isn't enabled everywhere).
So this should be fine. ok stsp@
sys/iwx: avoid unconditional RX antenna pattern