Skip to content

Commit

Permalink
cfg80211: allow drivers that agree on regulatory to agree
Browse files Browse the repository at this point in the history
This allows drivers that agree on regulatory to share their
regulatory domain.

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 27, 2009
1 parent fb1fc7a commit fff32c0
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 @@ -1157,6 +1157,16 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
return 0;
return -EALREADY;
}

/*
* This would happen if you unplug and plug your card
* back in or if you add a new device for which the previously
* loaded card also agrees on the regulatory domain.
*/
if (last_request->initiator == REGDOM_SET_BY_DRIVER &&
alpha2_equal(cfg80211_regdomain->alpha2, alpha2))
return -EALREADY;

return REG_INTERSECT;
case REGDOM_SET_BY_USER:
if (last_request->initiator == REGDOM_SET_BY_COUNTRY_IE)
Expand Down

0 comments on commit fff32c0

Please sign in to comment.