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]

 



On Thu, Jun 19, 2008 at 10:03 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
>
>> +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?

Oops

>
>
>> +     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.
Please explain,
>
>> -     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.
Will fix, strange though it passed checkpatch

Thanks for review
Adding Luis with hope for some more review with connection to reg domain stuff.

Tomas
--
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