cfg80211: add flags to define country IE processing rules
802.11 cards may have different country IE parsing behavioural preferences and vendors may want to support these. These preferences were managed by the REGULATORY_CUSTOM_REG and the REGULATORY_STRICT_REG flags and their combination. Instead of using this existing notation, split out the country IE behavioural preferences as a new flag. This will allow us to add more customizations easily and make the code more maintainable. Cc: Mihir Shete <smihir@qti.qualcomm.com> Cc: Henri Bahini <hbahini@qca.qualcomm.com> Cc: Tushnim Bhattacharyya <tushnimb@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [fix up conflicts] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
a2f73b6c5d
commit
a09a85a013
3 changed files with 29 additions and 18 deletions
|
@ -921,13 +921,11 @@ static void handle_channel(struct wiphy *wiphy,
|
|||
chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
|
||||
if (chan->orig_mpwr) {
|
||||
/*
|
||||
* Devices that have their own custom regulatory domain
|
||||
* but also use REGULATORY_STRICT_REG will follow the
|
||||
* passed country IE power settings.
|
||||
* Devices that use REGULATORY_COUNTRY_IE_FOLLOW_POWER
|
||||
* will always follow the passed country IE power settings.
|
||||
*/
|
||||
if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE &&
|
||||
wiphy->regulatory_flags & REGULATORY_CUSTOM_REG &&
|
||||
wiphy->regulatory_flags & REGULATORY_STRICT_REG)
|
||||
wiphy->regulatory_flags & REGULATORY_COUNTRY_IE_FOLLOW_POWER)
|
||||
chan->max_power = chan->max_reg_power;
|
||||
else
|
||||
chan->max_power = min(chan->orig_mpwr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue