2014-07-14 17:15:30

by Rafał Miłecki

[permalink] [raw]
Subject: Setting TX power with nl80211 while being *not* connected

I've noticed that setting TX power, e.g with:
iw dev wlp2s0 set txpower fixed 1200
has no effect if I'm disconnected.

As soon as I connect to some network .config gets called, it has
IEEE80211_CONF_CHANGE_POWER set and power_level is set to "12".

I've quickly tested this and it seems that __ieee80211_recalc_txpower
returns false if I'm not connected
(rcu_dereference(sdata->vif.chanctx_conf) returns NULL).

Is that expected? Is there any way to limit TX power for scanning purposes?

--
Rafał


2014-07-14 17:52:53

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: Setting TX power with nl80211 while being *not* connected

On Mon, Jul 14, 2014 at 10:45 PM, Rafał Miłecki <[email protected]> wrote:
>
> I've noticed that setting TX power, e.g with:
> iw dev wlp2s0 set txpower fixed 1200
> has no effect if I'm disconnected.
>
> As soon as I connect to some network .config gets called, it has
> IEEE80211_CONF_CHANGE_POWER set and power_level is set to "12".
>
> I've quickly tested this and it seems that __ieee80211_recalc_txpower
> returns false if I'm not connected
> (rcu_dereference(sdata->vif.chanctx_conf) returns NULL).
>
> Is that expected? Is there any way to limit TX power for scanning purposes?
>
Not that i know of, we use a chipset specific way to control the ceiling.
I guess the rationale for not having this is because we use the regulatory
max values coming from crda./nvram for scanning which are good enough.

But it would be good to have this feature, to improve the scan if the things are
not working well with the max reg power.