Skip to content

Commit

Permalink
cfg80211: process user requests only after previous user/driver/core …
Browse files Browse the repository at this point in the history
…requests

This prevents user regulatory changes to be considered prior to previous
pending user, core or driver requests which have not be applied.

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 Jan 29, 2009
1 parent 34f5734 commit 5eebade
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,16 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
if (last_request->initiator == REGDOM_SET_BY_USER &&
last_request->intersect)
return -EOPNOTSUPP;
/* Process user requests only after previous user/driver/core
* requests have been processed */
if (last_request->initiator == REGDOM_SET_BY_CORE ||
last_request->initiator == REGDOM_SET_BY_DRIVER ||
last_request->initiator == REGDOM_SET_BY_USER) {
if (!alpha2_equal(last_request->alpha2,
cfg80211_regdomain->alpha2))
return -EAGAIN;
}

return 0;
}

Expand Down

0 comments on commit 5eebade

Please sign in to comment.