All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: use full power if off-channel
@ 2012-07-08  9:35 Johannes Berg
  2012-07-08 14:34 ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-07-08  9:35 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Instead of using full power when scanning, use
full power when off-channel. This is different
since off-channel can be remain-on-channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/main.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index e706f9e..35c4b1d 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -148,9 +148,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
 		changed |= IEEE80211_CONF_CHANGE_SMPS;
 	}
 
-	if (test_bit(SCAN_SW_SCANNING, &local->scanning) ||
-	    test_bit(SCAN_ONCHANNEL_SCANNING, &local->scanning) ||
-	    test_bit(SCAN_HW_SCANNING, &local->scanning))
+	if (local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL)
 		power = chan->max_power;
 	else
 		power = local->power_constr_level ?
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: use full power if off-channel
  2012-07-08  9:35 [PATCH] mac80211: use full power if off-channel Johannes Berg
@ 2012-07-08 14:34 ` Ben Greear
  2012-07-09  8:29   ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2012-07-08 14:34 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Johannes Berg

On 07/08/2012 02:35 AM, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Instead of using full power when scanning, use
> full power when off-channel. This is different
> since off-channel can be remain-on-channel.

What if we are scanning on our current channel?  Shouldn't
it be full-power then as well?

Thanks,
Ben

>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>   net/mac80211/main.c |    4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index e706f9e..35c4b1d 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -148,9 +148,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
>   		changed |= IEEE80211_CONF_CHANGE_SMPS;
>   	}
>
> -	if (test_bit(SCAN_SW_SCANNING, &local->scanning) ||
> -	    test_bit(SCAN_ONCHANNEL_SCANNING, &local->scanning) ||
> -	    test_bit(SCAN_HW_SCANNING, &local->scanning))
> +	if (local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL)
>   		power = chan->max_power;
>   	else
>   		power = local->power_constr_level ?
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: use full power if off-channel
  2012-07-08 14:34 ` Ben Greear
@ 2012-07-09  8:29   ` Johannes Berg
  2012-07-09 14:50     ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-07-09  8:29 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

On Sun, 2012-07-08 at 07:34 -0700, Ben Greear wrote:
> On 07/08/2012 02:35 AM, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > Instead of using full power when scanning, use
> > full power when off-channel. This is different
> > since off-channel can be remain-on-channel.
> 
> What if we are scanning on our current channel?  Shouldn't
> it be full-power then as well?

Arguable. If we're on the channel that the AP explicitly told us to use
less power on, and we're not stopping normal traffic, then I'm not sure
we should.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: use full power if off-channel
  2012-07-09  8:29   ` Johannes Berg
@ 2012-07-09 14:50     ` Ben Greear
  2012-07-09 14:55       ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2012-07-09 14:50 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 07/09/2012 01:29 AM, Johannes Berg wrote:
> On Sun, 2012-07-08 at 07:34 -0700, Ben Greear wrote:
>> On 07/08/2012 02:35 AM, Johannes Berg wrote:
>>> From: Johannes Berg <johannes.berg@intel.com>
>>>
>>> Instead of using full power when scanning, use
>>> full power when off-channel. This is different
>>> since off-channel can be remain-on-channel.
>>
>> What if we are scanning on our current channel?  Shouldn't
>> it be full-power then as well?
>
> Arguable. If we're on the channel that the AP explicitly told us to use
> less power on, and we're not stopping normal traffic, then I'm not sure
> we should.

Well, if you are scanning, you might be wanting to find other APs that
perhaps require full power to reach, so it seems to me it should scan
at full power...

Thanks,
Ben

>
> johannes
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: use full power if off-channel
  2012-07-09 14:50     ` Ben Greear
@ 2012-07-09 14:55       ` Johannes Berg
  2012-07-09 16:02         ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-07-09 14:55 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

On Mon, 2012-07-09 at 07:50 -0700, Ben Greear wrote:
> On 07/09/2012 01:29 AM, Johannes Berg wrote:
> > On Sun, 2012-07-08 at 07:34 -0700, Ben Greear wrote:
> >> On 07/08/2012 02:35 AM, Johannes Berg wrote:
> >>> From: Johannes Berg <johannes.berg@intel.com>
> >>>
> >>> Instead of using full power when scanning, use
> >>> full power when off-channel. This is different
> >>> since off-channel can be remain-on-channel.
> >>
> >> What if we are scanning on our current channel?  Shouldn't
> >> it be full-power then as well?
> >
> > Arguable. If we're on the channel that the AP explicitly told us to use
> > less power on, and we're not stopping normal traffic, then I'm not sure
> > we should.
> 
> Well, if you are scanning, you might be wanting to find other APs that
> perhaps require full power to reach, so it seems to me it should scan
> at full power...

Yes, but you're not supposed to send the data packets at the higher
power. So unless you have per-packet power control you'd be breaking
your TPC implementation (which is regulatory relevant) if you do
on-channel scan.

I suppose the other option would be to skip the optimisation in that
case, but ...

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: use full power if off-channel
  2012-07-09 14:55       ` Johannes Berg
@ 2012-07-09 16:02         ` Ben Greear
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Greear @ 2012-07-09 16:02 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 07/09/2012 07:55 AM, Johannes Berg wrote:
> On Mon, 2012-07-09 at 07:50 -0700, Ben Greear wrote:
>> On 07/09/2012 01:29 AM, Johannes Berg wrote:
>>> On Sun, 2012-07-08 at 07:34 -0700, Ben Greear wrote:
>>>> On 07/08/2012 02:35 AM, Johannes Berg wrote:
>>>>> From: Johannes Berg <johannes.berg@intel.com>
>>>>>
>>>>> Instead of using full power when scanning, use
>>>>> full power when off-channel. This is different
>>>>> since off-channel can be remain-on-channel.
>>>>
>>>> What if we are scanning on our current channel?  Shouldn't
>>>> it be full-power then as well?
>>>
>>> Arguable. If we're on the channel that the AP explicitly told us to use
>>> less power on, and we're not stopping normal traffic, then I'm not sure
>>> we should.
>>
>> Well, if you are scanning, you might be wanting to find other APs that
>> perhaps require full power to reach, so it seems to me it should scan
>> at full power...
>
> Yes, but you're not supposed to send the data packets at the higher
> power. So unless you have per-packet power control you'd be breaking
> your TPC implementation (which is regulatory relevant) if you do
> on-channel scan.
>
> I suppose the other option would be to skip the optimisation in that
> case, but ...

I guess I'd rather keep the scan-on-channel optimization and just tx
at lower power.  Another thing..with your change, we can skip a hardware
config at the start of scan-on-channel since it was only there to configure
the tx power anyway...

In general, I'd like the ability to choose the tx power on a per-packet
basis so that one virtual station could tx at a different power-setting
than another..but I've no time to work on that now, and I'm not sure hardware
would support that kind of thing anyway.

Thanks,
Ben

>
> johannes
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-09 16:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-08  9:35 [PATCH] mac80211: use full power if off-channel Johannes Berg
2012-07-08 14:34 ` Ben Greear
2012-07-09  8:29   ` Johannes Berg
2012-07-09 14:50     ` Ben Greear
2012-07-09 14:55       ` Johannes Berg
2012-07-09 16:02         ` Ben Greear

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.