Search Linux Wireless

Re: [RFC PATCH 1/2] mac80211: 11d Handling - Country Information Element

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

 



> +static void ieee80211_calculate_power_level(struct ieee80211_local *local)
> +{
> +	struct ieee80211_channel *chan = local->hw.conf.channel;
> +
> +	local->hw.conf.power_level = chan->max_power;
> +	if (local->hw.conf.user_pwr_limit)
> +		local->hw.conf.power_level = min(local->hw.conf.user_pwr_limit,
> +			local->hw.conf.power_level);
> +	if (local->hw.conf.tpc_pwr_limit)
> +		local->hw.conf.power_level = min(local->hw.conf.tpc_pwr_limit,
> +			local->hw.conf.power_level);
> +}
> +
>  int ieee80211_hw_config(struct ieee80211_local *local)
>  {
>  	struct ieee80211_channel *chan;
> @@ -1040,13 +1053,7 @@ int ieee80211_hw_config(struct ieee80211_local *local)
>  
>  	local->hw.conf.channel = chan;
>  
> -	if (!local->hw.conf.power_level)
> -		local->hw.conf.power_level = chan->max_power;
> -	else
> -		local->hw.conf.power_level = min(chan->max_power,
> -					       local->hw.conf.power_level);
> -
> -	local->hw.conf.max_antenna_gain = chan->max_antenna_gain;
> +	ieee80211_calculate_power_level(local);

Lost antenna gain setting?
 

> +	if (country_ie_len < 6) {
> +		printk(KERN_ERR "%s: country information element shorter (%d)"
> +			" than expected.\n", __func__, country_ie_len);

Remotely exploitable security bug.


> -	if (local->hw.conf.power_level != new_power_level) {
> -		local->hw.conf.power_level = new_power_level;
> +		 local->hw.conf.user_pwr_limit = 0;

whitespace damage.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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