Skip to content

Commit

Permalink
cfg80211: move check for ignore_reg_update() on wiphy_update_regulato…
Browse files Browse the repository at this point in the history
…ry()

This ensures that the initial REGDOM_SET_BY_CORE upon wiphy registration
respects the wiphy->custom_regulatory setting. Without this and if OLD_REG
is disabled (which will be default soon as we remove it) the
wiphy->custom_regulatory is simply ignored.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
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 2a44f91 commit d46e5b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,13 +937,15 @@ static void update_all_wiphy_regulatory(enum reg_set_by setby)
struct cfg80211_registered_device *drv;

list_for_each_entry(drv, &cfg80211_drv_list, list)
if (!ignore_reg_update(&drv->wiphy, setby))
wiphy_update_regulatory(&drv->wiphy, setby);
wiphy_update_regulatory(&drv->wiphy, setby);
}

void wiphy_update_regulatory(struct wiphy *wiphy, enum reg_set_by setby)
{
enum ieee80211_band band;

if (ignore_reg_update(wiphy, setby))
return;
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
if (wiphy->bands[band])
handle_band(wiphy, band);
Expand Down

0 comments on commit d46e5b1

Please sign in to comment.