Skip to content

Commit

Permalink
regulatory: use correct regulatory initiator on wiphy register
Browse files Browse the repository at this point in the history
The current regdomain was not always set by the core. This causes
cards with a custom regulatory domain to ignore user initiated changes
if done before the card was registered.

Signed-off-by: Arik Nemtsov <[email protected]>
Acked-by: Luis R. Rodriguez <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
ariknem authored and jmberg-intel committed Jul 25, 2013
1 parent cd34f64 commit 23df0b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2247,10 +2247,13 @@ int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env)

void wiphy_regulatory_register(struct wiphy *wiphy)
{
struct regulatory_request *lr;

if (!reg_dev_ignore_cell_hint(wiphy))
reg_num_devs_support_basehint++;

wiphy_update_regulatory(wiphy, NL80211_REGDOM_SET_BY_CORE);
lr = get_last_request();
wiphy_update_regulatory(wiphy, lr->initiator);
}

void wiphy_regulatory_deregister(struct wiphy *wiphy)
Expand Down

0 comments on commit 23df0b7

Please sign in to comment.