Search Linux Wireless

Re: [PATCH] cfg80211: use correct (original) max power

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

 



On Wed, 2012-08-01 at 11:03 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
> 
> When calculating the maximum TX power for a channel,
> the original maximum power should be restricted to
> the current regulatory TX power. Restricting the
> current maximum TX power has the effect that it'll
> never be possible to increase the power again when
> the regulatory requirement changes.


No ... this isn't right either. Hong Wu, can you please fix this mess?

I have a feeling your patch

commit eccc068e8e84c8fe997115629925e0422a98e4de
Author: Hong Wu <Hong.Wu@xxxxxxxx>
Date:   Wed Jan 11 20:33:39 2012 +0200

    wireless: Save original maximum regulatory transmission power for
the calucation of the local maximum transmit power


should just be reverted?

johannes


> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---
>  net/wireless/reg.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index 2303ee7..070b88c 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -901,7 +901,7 @@ static void handle_channel(struct wiphy *wiphy,
>  	chan->max_antenna_gain = min(chan->orig_mag,
>  		(int) MBI_TO_DBI(power_rule->max_antenna_gain));
>  	chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
> -	chan->max_power = min(chan->max_power, chan->max_reg_power);
> +	chan->max_power = min(chan->orig_mpwr, chan->max_reg_power);
>  }
>  
>  static void handle_band(struct wiphy *wiphy,


--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux