Skip to content

Commit

Permalink
cfg80211: reg: remove useless reg_timeout scheduling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Oct 15, 2015
1 parent c7d319e commit 922ec58
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2884,11 +2884,8 @@ static int reg_set_rd_driver(const struct ieee80211_regdomain *rd,
}

request_wiphy = wiphy_idx_to_wiphy(driver_request->wiphy_idx);
if (!request_wiphy) {
queue_delayed_work(system_power_efficient_wq,
&reg_timeout, 0);
if (!request_wiphy)
return -ENODEV;
}

if (!driver_request->intersect) {
if (request_wiphy->regd)
Expand Down Expand Up @@ -2945,11 +2942,8 @@ static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd,
}

request_wiphy = wiphy_idx_to_wiphy(country_ie_request->wiphy_idx);
if (!request_wiphy) {
queue_delayed_work(system_power_efficient_wq,
&reg_timeout, 0);
if (!request_wiphy)
return -ENODEV;
}

if (country_ie_request->intersect)
return -EINVAL;
Expand Down

0 comments on commit 922ec58

Please sign in to comment.