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