diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-02-01 05:05:27 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-02-01 05:05:35 -0500 |
commit | 752cfee90d11e280d727617bf8d6df894141e157 (patch) | |
tree | c55feff5c93af364fe2212d6b2942abb3748e05c /net/wireless | |
parent | 5ac4a12df58121f0cf874b518406ec2a8e2d4ac4 (diff) | |
parent | fa6821cbf1d9724284ef0906c9a01a5fbf13a35c (diff) |
Merge remote-tracking branch 'net-next/master' into mac80211-next
Merge net-next so that we get the changes from net, which would
otherwise conflict with the NLA_POLICY_NESTED/_ARRAY changes.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 2 | ||||
-rw-r--r-- | net/wireless/reg.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index af89e5c9fd0a..ed53f8332ec8 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -555,7 +555,7 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { | |||
555 | }, | 555 | }, |
556 | [NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1), | 556 | [NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1), |
557 | [NL80211_ATTR_PEER_MEASUREMENTS] = | 557 | [NL80211_ATTR_PEER_MEASUREMENTS] = |
558 | NLA_POLICY_NESTED(NL80211_PMSR_FTM_REQ_ATTR_MAX, | 558 | NLA_POLICY_NESTED(NL80211_PMSR_ATTR_MAX, |
559 | nl80211_pmsr_attr_policy), | 559 | nl80211_pmsr_attr_policy), |
560 | [NL80211_ATTR_AIRTIME_WEIGHT] = NLA_POLICY_MIN(NLA_U16, 1), | 560 | [NL80211_ATTR_AIRTIME_WEIGHT] = NLA_POLICY_MIN(NLA_U16, 1), |
561 | }; | 561 | }; |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 7def1ece22b2..adfa58fa6536 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1024,8 +1024,13 @@ static void regdb_fw_cb(const struct firmware *fw, void *context) | |||
1024 | } | 1024 | } |
1025 | 1025 | ||
1026 | rtnl_lock(); | 1026 | rtnl_lock(); |
1027 | if (WARN_ON(regdb && !IS_ERR(regdb))) { | 1027 | if (regdb && !IS_ERR(regdb)) { |
1028 | /* just restore and free new db */ | 1028 | /* negative case - a bug |
1029 | * positive case - can happen due to race in case of multiple cb's in | ||
1030 | * queue, due to usage of asynchronous callback | ||
1031 | * | ||
1032 | * Either case, just restore and free new db. | ||
1033 | */ | ||
1029 | } else if (set_error) { | 1034 | } else if (set_error) { |
1030 | regdb = ERR_PTR(set_error); | 1035 | regdb = ERR_PTR(set_error); |
1031 | } else if (fw) { | 1036 | } else if (fw) { |
@@ -1255,7 +1260,7 @@ static bool is_valid_rd(const struct ieee80211_regdomain *rd) | |||
1255 | * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), | 1260 | * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), |
1256 | * however it is safe for now to assume that a frequency rule should not be | 1261 | * however it is safe for now to assume that a frequency rule should not be |
1257 | * part of a frequency's band if the start freq or end freq are off by more | 1262 | * part of a frequency's band if the start freq or end freq are off by more |
1258 | * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the | 1263 | * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the |
1259 | * 60 GHz band. | 1264 | * 60 GHz band. |
1260 | * This resolution can be lowered and should be considered as we add | 1265 | * This resolution can be lowered and should be considered as we add |
1261 | * regulatory rule support for other "bands". | 1266 | * regulatory rule support for other "bands". |
@@ -1270,7 +1275,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range, | |||
1270 | * with the Channel starting frequency above 45 GHz. | 1275 | * with the Channel starting frequency above 45 GHz. |
1271 | */ | 1276 | */ |
1272 | u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ? | 1277 | u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ? |
1273 | 10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; | 1278 | 20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; |
1274 | if (abs(freq_khz - freq_range->start_freq_khz) <= limit) | 1279 | if (abs(freq_khz - freq_range->start_freq_khz) <= limit) |
1275 | return true; | 1280 | return true; |
1276 | if (abs(freq_khz - freq_range->end_freq_khz) <= limit) | 1281 | if (abs(freq_khz - freq_range->end_freq_khz) <= limit) |