aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-11-11 16:15:30 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-11-25 14:51:49 -0500
commita09a85a013523a8b572dc5732b5c30e0785195f3 (patch)
tree19c69de381b4b7649ec8606cdea872632d969334 /net/wireless/reg.c
parenta2f73b6c5db3c272d87eaebb5bed355d75a0f25f (diff)
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>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index e44b4bb20b92..6b3051f6a8a7 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -921,13 +921,11 @@ static void handle_channel(struct wiphy *wiphy,
921 chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp); 921 chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
922 if (chan->orig_mpwr) { 922 if (chan->orig_mpwr) {
923 /* 923 /*
924 * Devices that have their own custom regulatory domain 924 * Devices that use REGULATORY_COUNTRY_IE_FOLLOW_POWER
925 * but also use REGULATORY_STRICT_REG will follow the 925 * will always follow the passed country IE power settings.
926 * passed country IE power settings.
927 */ 926 */
928 if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE && 927 if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE &&
929 wiphy->regulatory_flags & REGULATORY_CUSTOM_REG && 928 wiphy->regulatory_flags & REGULATORY_COUNTRY_IE_FOLLOW_POWER)
930 wiphy->regulatory_flags & REGULATORY_STRICT_REG)
931 chan->max_power = chan->max_reg_power; 929 chan->max_power = chan->max_reg_power;
932 else 930 else
933 chan->max_power = min(chan->orig_mpwr, 931 chan->max_power = min(chan->orig_mpwr,