Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279003
b: refs/heads/master
c: 061acaa
h: refs/heads/master
i:
  279001: d4460aa
  278999: e80e99b
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Dec 16, 2011
1 parent f530731 commit a90684f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 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: a1910f9cad2b4b9cc0d5d326aa65632a23c16088
refs/heads/master: 061acaae76dfb760f4f3fddf0cde43915b7d673c
4 changes: 3 additions & 1 deletion trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,9 @@ struct cfg80211_ops {
* regulatory domain no user regulatory domain can enable these channels
* at a later time. This can be used for devices which do not have
* calibration information guaranteed for frequencies or settings
* outside of its regulatory domain.
* outside of its regulatory domain. If used in combination with
* WIPHY_FLAG_CUSTOM_REGULATORY the inspected country IE power settings
* will be followed.
* @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure
* that passive scan flags and beaconing flags may not be lifted by
* cfg80211 due to regulatory beacon hints. For more information on beacon
Expand Down
20 changes: 16 additions & 4 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,10 +873,22 @@ 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)
chan->max_power = min(chan->orig_mpwr,
(int) MBM_TO_DBM(power_rule->max_eirp));
else
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);
}

Expand Down

0 comments on commit a90684f

Please sign in to comment.