aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-10-15 03:12:49 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-10-15 10:17:09 -0400
commit922ec58c70cd4a1065dd3c9f94e845dc1348b533 (patch)
treee9d3cc5c0faff96acdbc2998656d8bec32374ae0
parentc7d319e542a3126bca029745735cdef5a5ca55c2 (diff)
cfg80211: reg: remove useless reg_timeout scheduling
When the functions reg_set_rd_driver() and reg_set_rd_country_ie() return with an error, the calling function already restores data by calling restore_regulatory_settings(), so there's no need to also schedule a timeout (which would lead to other side effects such as indicating CRDA failed, which clearly isn't true.) Remove the scheduling. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/wireless/reg.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index bc29c9a754a5..3b3119fa87ae 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2884,11 +2884,8 @@ static int reg_set_rd_driver(const struct ieee80211_regdomain *rd,
2884 } 2884 }
2885 2885
2886 request_wiphy = wiphy_idx_to_wiphy(driver_request->wiphy_idx); 2886 request_wiphy = wiphy_idx_to_wiphy(driver_request->wiphy_idx);
2887 if (!request_wiphy) { 2887 if (!request_wiphy)
2888 queue_delayed_work(system_power_efficient_wq,
2889 &reg_timeout, 0);
2890 return -ENODEV; 2888 return -ENODEV;
2891 }
2892 2889
2893 if (!driver_request->intersect) { 2890 if (!driver_request->intersect) {
2894 if (request_wiphy->regd) 2891 if (request_wiphy->regd)
@@ -2945,11 +2942,8 @@ static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd,
2945 } 2942 }
2946 2943
2947 request_wiphy = wiphy_idx_to_wiphy(country_ie_request->wiphy_idx); 2944 request_wiphy = wiphy_idx_to_wiphy(country_ie_request->wiphy_idx);
2948 if (!request_wiphy) { 2945 if (!request_wiphy)
2949 queue_delayed_work(system_power_efficient_wq,
2950 &reg_timeout, 0);
2951 return -ENODEV; 2946 return -ENODEV;
2952 }
2953 2947
2954 if (country_ie_request->intersect) 2948 if (country_ie_request->intersect)
2955 return -EINVAL; 2949 return -EINVAL;