Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321461
b: refs/heads/master
c: 5e31fc0
h: refs/heads/master
i:
  321459: f4c87ae
v: v3
  • Loading branch information
Stanislaw Gruszka authored and Johannes Berg committed Jul 25, 2012
1 parent d561a60 commit 88e1bbc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3aa569c3fedbd0d16041d08bf6e89b8c43aee650
refs/heads/master: 5e31fc0815a4e2c72b1b495fe7a0d8f9bfb9e4b4
16 changes: 15 additions & 1 deletion trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,21 @@ 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);
if (chan->orig_mpwr) {
/*
* Devices that have their own custom regulatory domain
* but also use WIPHY_FLAG_STRICT_REGULATORY will follow the
* passed country IE power settings.
*/
if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE &&
wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY &&
wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY)
chan->max_power = chan->max_reg_power;
else
chan->max_power = min(chan->orig_mpwr,
chan->max_reg_power);
} else
chan->max_power = chan->max_reg_power;
}

static void handle_band(struct wiphy *wiphy,
Expand Down

0 comments on commit 88e1bbc

Please sign in to comment.