소스 검색

cfg80211: call reg_notifier() once

We are calling the reg_notifier() callback per band, this is
not necessary, just call it once.

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>
Luis R. Rodriguez 16 년 전
부모
커밋
560e28e14f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      net/wireless/reg.c

+ 2 - 2
net/wireless/reg.c

@@ -947,9 +947,9 @@ void wiphy_update_regulatory(struct wiphy *wiphy, enum reg_set_by setby)
 	for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
 	for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
 		if (wiphy->bands[band])
 		if (wiphy->bands[band])
 			handle_band(wiphy, band);
 			handle_band(wiphy, band);
-		if (wiphy->reg_notifier)
-			wiphy->reg_notifier(wiphy, setby);
 	}
 	}
+	if (wiphy->reg_notifier)
+		wiphy->reg_notifier(wiphy, setby);
 }
 }
 
 
 /* Return value which can be used by ignore_request() to indicate
 /* Return value which can be used by ignore_request() to indicate