Skip to content

Commit

Permalink
ath: fix dynamic user regulatory settings
Browse files Browse the repository at this point in the history
A world regulatory domain check was in place that
prevents user dynamic regulatory hints from being
processed. This was there for historical reasons
as this was only possible previously for world
roaming cards and dynamic regulatory settings was
only possible for country IEs. Fix this by enforcing
the world regulatory domain check only for when the
initiator is a country IE. Support for dynamic user
regulatory support is already checked.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Nov 15, 2013
1 parent 32019c7 commit 3e850ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/regd.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ static int __ath_reg_dyn_country(struct wiphy *wiphy,
{
u16 country_code;

if (!ath_is_world_regd(reg))
if (request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE &&
!ath_is_world_regd(reg))
return -EINVAL;

country_code = ath_regd_find_country_by_name(request->alpha2);
Expand Down

0 comments on commit 3e850ed

Please sign in to comment.