cfg80211: process the max power on a country IE
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Thu, 7 Jan 2010 22:24:56 +0000 (17:24 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Jan 2010 18:57:58 +0000 (13:57 -0500)
The max power from each country IE triplet was being ignored.
This fix isn't critical as CRDA was always being used for the lower
limit, but we should process it in case the AP still wants to
decrease power output even more for whatever reason.

Reported-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/reg.c

index 389247cb70599c4fdea7ac2dd1661e94c170fb2c..77d0bb6f6e7af736bf92008050402539500202d3 100644 (file)
@@ -680,7 +680,7 @@ static struct ieee80211_regdomain *country_ie_2_rd(
                 */
                freq_range->max_bandwidth_khz = MHZ_TO_KHZ(40);
                power_rule->max_antenna_gain = DBI_TO_MBI(100);
-               power_rule->max_eirp = DBM_TO_MBM(100);
+               power_rule->max_eirp = DBM_TO_MBM(triplet->chans.max_power);
 
                country_ie += 3;
                country_ie_len -= 3;