Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289953
b: refs/heads/master
c: eccc068
h: refs/heads/master
i:
  289951: eb27d71
v: v3
  • Loading branch information
Hong Wu authored and John W. Linville committed Jan 24, 2012
1 parent c1ab7f4 commit 7ceb410
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 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: e2d75c136f8df4a4e28ece75c475a65b9292729a
refs/heads/master: eccc068e8e84c8fe997115629925e0422a98e4de
2 changes: 2 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ enum ieee80211_channel_flags {
* @band: band this channel belongs to.
* @max_antenna_gain: maximum antenna gain in dBi
* @max_power: maximum transmission power (in dBm)
* @max_reg_power: maximum regulatory transmission power (in dBm)
* @beacon_found: helper to regulatory code to indicate when a beacon
* has been found on this channel. Use regulatory_hint_found_beacon()
* to enable this, this is useful only on 5 GHz band.
Expand All @@ -133,6 +134,7 @@ struct ieee80211_channel {
u32 flags;
int max_antenna_gain;
int max_power;
int max_reg_power;
bool beacon_found;
u32 orig_flags;
int orig_mag, orig_mpwr;
Expand Down
19 changes: 2 additions & 17 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,23 +882,8 @@ static void handle_channel(struct wiphy *wiphy,
chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags);
chan->max_antenna_gain = min(chan->orig_mag,
(int) MBI_TO_DBI(power_rule->max_antenna_gain));
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 =
MBM_TO_DBM(power_rule->max_eirp);
} else {
chan->max_power = min(chan->orig_mpwr,
(int) MBM_TO_DBM(power_rule->max_eirp));
}
} else
chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp);
chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
chan->max_power = min(chan->max_power, chan->max_reg_power);
}

static void handle_band(struct wiphy *wiphy,
Expand Down

0 comments on commit 7ceb410

Please sign in to comment.