Search Linux Wireless

Re: [PATCH] cfg80211: default to regulatory max power for channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 03 April 2008 21:32:54 John W. Linville wrote:
> If the driver does not specify a maximum power output, default to the
> regulatory max.
> 
> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
> ---
> Is this a worth alternative to Larry's b43legacy patch?  It looked like

Yeah, I like this one much better.
The b43 devices can all be configured up to regulatory limits.
So it doesn't really make sense to define a hardware limit.
And I think we currently don't even know the real HW limit. One might
try to calculate it, but that seems difficult.

> ath5k wasn't setting max_power either -- how does it work?
> 
>  net/wireless/reg.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index 8cc6037..185488d 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -136,7 +136,10 @@ static void handle_channel(struct ieee80211_channel *chan,
>  	chan->flags = flags;
>  	chan->max_antenna_gain = min(chan->orig_mag,
>  					 rg->max_antenna_gain);
> -	chan->max_power = min(chan->orig_mpwr, rg->max_power);
> +	if (chan->orig_mpwr)
> +		chan->max_power = min(chan->orig_mpwr, rg->max_power);
> +	else
> +		chan->max_power = rg->max_power;
>  }
>  
>  static void handle_band(struct ieee80211_supported_band *sband,



-- 
Greetings Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux