Skip to content

Commit

Permalink
cfg80211: avoid flushing the global workqueue for core reg hints
Browse files Browse the repository at this point in the history
When cfg80211 starts it will send a core regulatory hint. This is
sent to the global workqueue but we force processing of it by
flushing the global workqueue. The flushing was done since
cfg80211 needs last_request to always be populated.

Avoid flushing the global workqueue by processing the work
required immediately instead of putting it into a linked
list and processing it after the flush.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Feb 1, 2010
1 parent ef5127a commit a2bff26
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1920,14 +1920,12 @@ static int regulatory_hint_core(const char *alpha2)
request->alpha2[1] = alpha2[1];
request->initiator = NL80211_REGDOM_SET_BY_CORE;

queue_regulatory_request(request);

/*
* This ensures last_request is populated once modules
* come swinging in and calling regulatory hints and
* wiphy_apply_custom_regulatory().
*/
flush_scheduled_work();
reg_process_hint(request);

return 0;
}
Expand Down

0 comments on commit a2bff26

Please sign in to comment.