2017-08-18 00:32:50

by Håvard Rabbe

[permalink] [raw]
Subject: ath9k driver - is it possible to disable tx/rx radio chains?

Hi
I=E2=80=99m using wifi card with AR9280 chipset that uses the ath9k =
driver.

The card has 2 available radio chains and I=E2=80=99m only going to =
connect 1 antenna.

Is it possible to disable the radio chain im not using?


Best Regards,

H=C3=A5vard Rabbe=


2017-08-22 07:12:29

by Matthias May

[permalink] [raw]
Subject: Re: ath9k driver - is it possible to disable tx/rx radio chains?

On 18/08/17 23:04, Håvard Rabbe wrote:
> Hi
> Thank you so much. You made my day!
> The command works. Im looking forward to test it out :-)
>
>
> I also have two of these card. they don’t have the same bitmap, but I assume they work the same way?
>
> qca9882 chipset with 2 chains available using ath10k driver:
> Available Antennas: TX 0x3 RX 0x3
> Configured Antennas: TX 0x3 RX 0x3
>
> qca9880 chipset with 3 chains available using ath10k driver:
> Available Antennas: TX 0x3 RX 0x3
> Configured Antennas: TX 0x3 RX 0x3
>
>

The bitmap is always the same.
0x1 for chain 0
0x3 for chain 0 and 1
0x7 for chain 0, 1 and 2
0xf for chain 0, 1, 2 and 3

Are you sure that your qca9880 card has 3 chains?
Because the "Available Antennas: TX 0x3 RX 0x3" says there are only 2 chains available.
It could be that the card physically has 3 chains, but the 3rd is disabled in eeprom.

BR
Matthias

2017-08-18 07:08:33

by Matthias May

[permalink] [raw]
Subject: Re: ath9k driver - is it possible to disable tx/rx radio chains?

On 18/08/17 01:32, Håvard Rabbe wrote:
> Hi
> I’m using wifi card with AR9280 chipset that uses the ath9k driver.
>
> The card has 2 available radio chains and I’m only going to connect 1 antenna.
>
> Is it possible to disable the radio chain im not using?
>
>
> Best Regards,
>
> Håvard Rabbe
>

Help text from iw:
phy <phyname> set antenna <bitmap> | all | <tx bitmap> <rx bitmap>

You can set the rx/tx mask with
iw phy phy0 set antenna 1
to not use the second chain

or
iw phy phy0 set antenna 1 3
to not use the second chain for tx, but still use it for rx.

You can see the currently active mask with:
iw list | grep Antenna

Be aware that the value set here is a bitmask only allows the values 1/3/7 (for 1, 2 and 3 chains).
Chain 0 is always active.
--> You can not disable chain 0 and only use chain 1.

BR
Matthias

2017-08-18 21:04:24

by Håvard Rabbe

[permalink] [raw]
Subject: Re: ath9k driver - is it possible to disable tx/rx radio chains?

Hi
Thank you so much. You made my day!
The command works. Im looking forward to test it out :-)


I also have two of these card. they don=E2=80=99t have the same bitmap, =
but I assume they work the same way?

qca9882 chipset with 2 chains available using ath10k driver:
Available Antennas: TX 0x3 RX 0x3
Configured Antennas: TX 0x3 RX 0x3

qca9880 chipset with 3 chains available using ath10k driver:
Available Antennas: TX 0x3 RX 0x3
Configured Antennas: TX 0x3 RX 0x3


Best Regards,

H=C3=A5vard

> On 18 Aug 2017, at 09:00, Matthias May <[email protected]> =
wrote:
>=20
> On 18/08/17 01:32, H=C3=A5vard Rabbe wrote:
>> Hi
>> I=E2=80=99m using wifi card with AR9280 chipset that uses the ath9k =
driver.
>>=20
>> The card has 2 available radio chains and I=E2=80=99m only going to =
connect 1 antenna.
>>=20
>> Is it possible to disable the radio chain im not using?
>>=20
>>=20
>> Best Regards,
>>=20
>> H=C3=A5vard Rabbe
>>=20
>=20
> Help text from iw:
> phy <phyname> set antenna <bitmap> | all | <tx bitmap> <rx bitmap>
>=20
> You can set the rx/tx mask with
> iw phy phy0 set antenna 1
> to not use the second chain
>=20
> or
> iw phy phy0 set antenna 1 3
> to not use the second chain for tx, but still use it for rx.
>=20
> You can see the currently active mask with:
> iw list | grep Antenna
>=20
> Be aware that the value set here is a bitmask only allows the values =
1/3/7 (for 1, 2 and 3 chains).
> Chain 0 is always active.
> --> You can not disable chain 0 and only use chain 1.
>=20
> BR
> Matthias