Skip to contentSkip to conversation

carl9170 driver - reducing the output power

DISCUSSION Michal Kudelski 2 participants 4 messages Jun 25, 2012 – Jun 26, 2012

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm engaged in a research project that requires us to reduce the range of an ad-hoc wifi network. However, when I change the txpower (either using iwconfig, or iw command), I can only see the difference when I display the current configuration (e.g., with iwconfig). I cannot see any difference in the actual tx power observed on a spectrum analyzer.

Thus, my question is: is the function of changing the txpower really supported? If it is, what steps should I take to make it work? I tried with ifconfig up/down when I change the txpower, but it does not change anything. Maybe I do something wrong? Do I use the correct versions of the firmware and the driver?

I've noticed a patch related to this issue, published on 2012-01-27 by Christian Lamparter. It seems that it is included in my driver version, but maybe I'm wrong and I should apply some additional patch?

We use NetGear WNDA3100(v1) hardware [Atheros AR9001U-(2)NG] and carl9170 driver (driverversion=3.0.0-21-generic firmware=1.9.2).

Best regards,
Michal Kudelski

#1 lore raw
Quoted 6 lines · Michal Kudelski

Thus, my question is: is the function of changing the txpower really supported? If it is, what steps should I take to make it work? I tried with ifconfig up/down when I change the txpower, but it does not change anything. Maybe I do something wrong? Do I use the correct versions of the firmware and the driver?

No special firmware or driver is required. Just as long as the driver supports the feature.

Quoted 8 lines

I've noticed a patch related to this issue, published on 2012-01-27 by Christian Lamparter. It seems that it is included in my driver version, but maybe I'm wrong and I should apply some additional patch?

We use NetGear WNDA3100(v1) hardware [Atheros AR9001U-(2)NG] and carl9170 driver (driverversion=3.0.0-21-generic firmware=1.9.2).

That's probably too old. The patch you are talking about is not a -stable patch so it's not backported to 3.3.x (or older) kernels.

So, either you can upgrade to 3.4, use compat-wireless
<http://linuxwireless.org/en/users/Download/#Getting_compat-wireless_on_Ubuntu>
or backport the patch yourself (however, this could be diffcult).

Regards,
Christian

#2 lore raw

Dear Christian,

Thank you for the response! Indeed, when I used the latest compat-wireless, I was able to control the output power.

Now, another question arises: what is the lowest supported power level? Do you have any hardware specifications of AR9170 that would say what is the lowest power level supported by the hardware?

With iw/iwconfig commands, the lowest achievable power is 1 dbm. But I'm thinking about modifying your code in order to write fixed values to the corresponding registers. And I need to know what to write into the registers in order to obtain the lowest possible power :-) . I know that there exist wifi cards that accept -12 dbm (e.g., Intel Pro-Wireless 2200 with ipw2200 driver under linux), so it would be really nice to know what I can get with Atheros...

Cheers,
Michal

Quoted 18 lines · On Mon, 25 Jun 2012 19:33:10 +0200 Christian Lamparter…
Quoted 1 line · Michal Kudelski

Thus, my question is: is the function of changing the txpower really supported? If it is, what steps should I take to make it work? I tried with ifconfig up/down when I change the txpower, but it does not change anything. Maybe I do something wrong? Do I use the correct versions of the firmware and the driver?

No special firmware or driver is required. Just as long as the driver supports the feature.

Quoted 3 lines

I've noticed a patch related to this issue, published on 2012-01-27 by Christian Lamparter. It seems that it is included in my driver version, but maybe I'm wrong and I should apply some additional patch?

We use NetGear WNDA3100(v1) hardware [Atheros AR9001U-(2)NG] and carl9170 driver (driverversion=3.0.0-21-generic firmware=1.9.2).

That's probably too old. The patch you are talking about is not a -stable patch so it's not backported to 3.3.x (or older) kernels.

So, either you can upgrade to 3.4, use compat-wireless
<http://linuxwireless.org/en/users/Download/#Getting_compat-wireless_on_Ubuntu>
or backport the patch yourself (however, this could be diffcult).

Regards,
Christian

#3 lore raw
Quoted 2 lines · Michal Kudelski

Thank you for the response! Indeed, when I used the latest compat-wireless, I was able to control the output power.

I'm glad I could help.

Quoted 4 lines

Now, another question arises: what is the lowest supported power level? Do you have any hardware specifications of AR9170 that would say what is the lowest power level supported by the hardware?

No, I'm sorry, but I don't have such a thing (Maybe Adrian knows more). From what I knot, the lowest possible value for the "tpc" registers and the tx descriptor tpc is "0" (there's no "sign" bit so I'm afraid anything lower than 0 is not possible).

Quoted 5 lines

With iw/iwconfig commands, the lowest achievable power is 1 dbm. But I'm thinking about modifying your code in order to write fixed values to the corresponding registers. And I need to know what to write into the registers in order to obtain the lowest possible power :-) .

The power is set by:
carl9170_tx_rate_tpc_chains in tx.c (for most outgoing frame - except control frames like ACKs/ERP/... which are controlled by carl9170_set_mac_tpc in mac.c)

Regards,
Christian