Skip to content

Commit

Permalink
regulatory: use RCU to protect last_request
Browse files Browse the repository at this point in the history
This will allow making freq_reg_info() lock-free.

Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jan 3, 2013
1 parent 458f4f9 commit c492db3
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 90 deletions.
2 changes: 2 additions & 0 deletions include/net/regulatory.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum environment_cap {
/**
* struct regulatory_request - used to keep track of regulatory requests
*
* @rcu_head: RCU head struct used to free the request
* @wiphy_idx: this is set if this request's initiator is
* %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This
* can be used by the wireless core to deal with conflicts
Expand Down Expand Up @@ -73,6 +74,7 @@ enum environment_cap {
* @list: used to insert into the reg_requests_list linked list
*/
struct regulatory_request {
struct rcu_head rcu_head;
int wiphy_idx;
enum nl80211_reg_initiator initiator;
enum nl80211_user_reg_hint_type user_reg_hint_type;
Expand Down
Loading

0 comments on commit c492db3

Please sign in to comment.