I've noticed that set_antenna and get_antenna functionality was added
to the ath9k driver. But iw phy set antenna command still isn't
working.
I know that before there was a workaround by setting chainmasks number
to 1, but this is not exactly what I need. I just need to enable only
one physical antenna and allow the adapter work only in 1x1 mode.
Is it possible?
On 2011-10-14 5:46 PM, Stanislav Demakov wrote:
> I've noticed that set_antenna and get_antenna functionality was added
> to the ath9k driver. But iw phy set antenna command still isn't
> working.
Did you try bringing down all active wlanX interfaces belonging to that
phy before running that command?
- Felix
On 15 October 2011 19:33, Stanislav Demakov <[email protected]> wrote:
> If you tell me how exactly you did it on the AR9220 in your case, this
> will be a good example at least.
I haven't yet written to code for FreeBSD/ath9k. Sorry.
Adrian
On 2011-10-15 1:45 PM, Stanislav Demakov wrote:
> Ok, just have tried:
>
> ifconfig wlan0 down
>
> and then tested it:
>
> iw phy phy0 set antenna all all
>
> but it's only showing iw help as before.
> I'm using the latest compiled compat-wireless.
Try using "1 1" instead of "all all".
Are you using the latest iw version?
- Felix
If you tell me how exactly you did it on the AR9220 in your case, this
will be a good example at least.
2011/10/15 Adrian Chadd <[email protected]>:
> On 15 October 2011 18:02, Stanislav Demakov <[email protected]> wrote:
>> Thanks. I'll ask him.
>>
>>>>both the second and third are connected to chain 1 via
>> an antenna switch.
>>
>> That's interesting. Could you give me a clue how to implement this?
>> Also after doing that, will it be enough to use only one physical
>> antenna connector?
>
> It depends on how it's all wired up. And yes, once you know how it's
> wired up and which antenna configuration words to program in, you can
> run just one of three antennas.
>
>
>
> adrian
>
Thanks. I'll ask him.
>>both the second and third are connected to chain 1 via
an antenna switch.
That's interesting. Could you give me a clue how to implement this?
Also after doing that, will it be enough to use only one physical
antenna connector?
2011/10/15 Adrian Chadd <[email protected]>:
> You'll have to ask Felix and others, but I think they're more generic
> APIs to support things like AR9285 (and the relevant AR9300/AR9400
> series NICs) which implement 1x1 but have "classic" style antenna
> diversity.
>
> Also, as I've discovered, you _can_ glue an antenna switch onto the
> side of a MIMO NIC. Eg, I have an AR9220 based NIC (2x2:2) which has
> three antennas, both the second and third are connected to chain 1 via
> an antenna switch.
>
>
>
> Adrian
>
On 2011-10-15 2:24 PM, Stanislav Demakov wrote:
> I'm running Ubuntu Server 11.10 - (kernel: Linux server
> 3.0.0-12-generic x86_64)
>
> ath9k from compat-wireless-2011-10-12 and current iw from git compiled
> with libnl1.
>
> The wireless chip is AR9280. (2x2 MIMO)
>
> Also
> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
> echo 1> /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
> is written at boot.
>
> Is something wrong above?
Do not mess with the rx_chainmask/tx_chainmask parameters, that may be
the reason why it's not working for you.
- Felix
I'm running Ubuntu Server 11.10 - (kernel: Linux server
3.0.0-12-generic x86_64)
ath9k from compat-wireless-2011-10-12 and current iw from git compiled
with libnl1.
The wireless chip is AR9280. (2x2 MIMO)
Also
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
is written at boot.
Is something wrong above?
2011/10/15 Felix Fietkau <[email protected]>:
> On 2011-10-15 2:13 PM, Stanislav Demakov wrote:
>>
>> Ok, I've compiled and installed iw from git. Now I have this (wlan0 is
>> down):
>>
>> sudo iw phy phy0 set antenna 1 1
>>
>> command failed: Operation not supported (-95)
>
> No idea then. It works on all of my systems.
>
> - Felix
>
On 2011-10-15 3:41 PM, Stanislav Demakov wrote:
> And the last question...
> Can you confirm that after setting antenna configuration to 1x1 I can
> safely detach 2nd physical connector from the adapter? I mean is there
> a guarantees that device will only use the 1st antenna.
Changing the antenna configuration will alter the chainmask accordingly,
so it should be safe to disconnect the second physical connector.
- Felix
You'll have to ask Felix and others, but I think they're more generic
APIs to support things like AR9285 (and the relevant AR9300/AR9400
series NICs) which implement 1x1 but have "classic" style antenna
diversity.
Also, as I've discovered, you _can_ glue an antenna switch onto the
side of a MIMO NIC. Eg, I have an AR9220 based NIC (2x2:2) which has
three antennas, both the second and third are connected to chain 1 via
an antenna switch.
Adrian
I've found it. Hostapd was the reason. After killing it set antenna works.
Thanks. :)
2011/10/15 Felix Fietkau <[email protected]>:
> On 2011-10-15 2:24 PM, Stanislav Demakov wrote:
>>
>> I'm running Ubuntu Server 11.10 - (kernel: ?Linux server
>> 3.0.0-12-generic x86_64)
>>
>> ath9k from compat-wireless-2011-10-12 and current iw from git compiled
>> with libnl1.
>>
>> The wireless chip is AR9280. (2x2 MIMO)
>>
>> Also
>> echo 1> ?/sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
>> echo 1> ?/sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
>> is written at boot.
>>
>> Is something wrong above?
>
> Do not mess with the rx_chainmask/tx_chainmask parameters, that may be the
> reason why it's not working for you.
>
> - Felix
>
On 15 October 2011 18:02, Stanislav Demakov <[email protected]> wrote:
> Thanks. I'll ask him.
>
>>>both the second and third are connected to chain 1 via
> an antenna switch.
>
> That's interesting. Could you give me a clue how to implement this?
> Also after doing that, will it be enough to use only one physical
> antenna connector?
It depends on how it's all wired up. And yes, once you know how it's
wired up and which antenna configuration words to program in, you can
run just one of three antennas.
adrian
Well, before, I did this:
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
So what exactly changed now after they added set\get_antenna functions
to the driver?
2011/10/15 Adrian Chadd <[email protected]>:
> .. well, that's basically how you convince the MIMO radios to work in 1x1 mode.
>
>
>
> Adrian
>
Ok, just have tried:
ifconfig wlan0 down
and then tested it:
iw phy phy0 set antenna all all
but it's only showing iw help as before.
I'm using the latest compiled compat-wireless.
2011/10/15 Felix Fietkau <[email protected]>:
> On 2011-10-14 5:46 PM, Stanislav Demakov wrote:
>>
>> I've noticed that set_antenna and get_antenna functionality was added
>> to the ath9k driver. But iw phy set antenna command still isn't
>> working.
>
> Did you try bringing down all active wlanX interfaces belonging to that phy
> before running that command?
>
> - Felix
>
And the last question...
Can you confirm that after setting antenna configuration to 1x1 I can
safely detach 2nd physical connector from the adapter? I mean is there
a guarantees that device will only use the 1st antenna.
2011/10/15 Stanislav Demakov <[email protected]>:
> I've found it. Hostapd was the reason. After killing it set antenna works.
> Thanks. :)
>
> 2011/10/15 Felix Fietkau <[email protected]>:
>> On 2011-10-15 2:24 PM, Stanislav Demakov wrote:
>>>
>>> I'm running Ubuntu Server 11.10 - (kernel: ?Linux server
>>> 3.0.0-12-generic x86_64)
>>>
>>> ath9k from compat-wireless-2011-10-12 and current iw from git compiled
>>> with libnl1.
>>>
>>> The wireless chip is AR9280. (2x2 MIMO)
>>>
>>> Also
>>> echo 1> ?/sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask
>>> echo 1> ?/sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask
>>> is written at boot.
>>>
>>> Is something wrong above?
>>
>> Do not mess with the rx_chainmask/tx_chainmask parameters, that may be the
>> reason why it's not working for you.
>>
>> - Felix
>>
>
Ok, I've compiled and installed iw from git. Now I have this (wlan0 is down):
sudo iw phy phy0 set antenna 1 1
command failed: Operation not supported (-95)
2011/10/15 Felix Fietkau <[email protected]>:
> On 2011-10-15 1:45 PM, Stanislav Demakov wrote:
>>
>> Ok, just have tried:
>>
>> ifconfig wlan0 down
>>
>> and then tested it:
>>
>> iw phy phy0 set antenna all all
>>
>> but it's only showing iw help as before.
>> I'm using the latest compiled compat-wireless.
>
> Try using "1 1" instead of "all all".
> Are you using the latest iw version?
>
> - Felix
>
.. well, that's basically how you convince the MIMO radios to work in 1x1 mode.
Adrian
On 2011-10-15 2:13 PM, Stanislav Demakov wrote:
> Ok, I've compiled and installed iw from git. Now I have this (wlan0 is down):
>
> sudo iw phy phy0 set antenna 1 1
>
> command failed: Operation not supported (-95)
No idea then. It works on all of my systems.
- Felix