@@ -2461,7 +2461,7 @@ static void reg_check_chans_work(struct work_struct *work)
24612461 pr_debug ("Verifying active interfaces after reg change\n" );
24622462 rtnl_lock ();
24632463
2464- list_for_each_entry (rdev , & cfg80211_rdev_list , list )
2464+ for_each_rdev (rdev )
24652465 reg_leave_invalid_chans (& rdev -> wiphy );
24662466
24672467 rtnl_unlock ();
@@ -2515,7 +2515,7 @@ static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)
25152515
25162516 ASSERT_RTNL ();
25172517
2518- list_for_each_entry (rdev , & cfg80211_rdev_list , list ) {
2518+ for_each_rdev (rdev ) {
25192519 wiphy = & rdev -> wiphy ;
25202520 wiphy_update_regulatory (wiphy , initiator );
25212521 }
@@ -2991,7 +2991,7 @@ static void wiphy_all_share_dfs_chan_state(struct wiphy *wiphy)
29912991
29922992 ASSERT_RTNL ();
29932993
2994- list_for_each_entry (rdev , & cfg80211_rdev_list , list ) {
2994+ for_each_rdev (rdev ) {
29952995 if (wiphy == & rdev -> wiphy )
29962996 continue ;
29972997 wiphy_share_dfs_chan_state (wiphy , & rdev -> wiphy );
@@ -3057,7 +3057,7 @@ static void notify_self_managed_wiphys(struct regulatory_request *request)
30573057 struct cfg80211_registered_device * rdev ;
30583058 struct wiphy * wiphy ;
30593059
3060- list_for_each_entry (rdev , & cfg80211_rdev_list , list ) {
3060+ for_each_rdev (rdev ) {
30613061 wiphy = & rdev -> wiphy ;
30623062 if (wiphy -> regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED &&
30633063 request -> initiator == NL80211_REGDOM_SET_BY_USER )
@@ -3122,7 +3122,7 @@ static void reg_process_pending_beacon_hints(void)
31223122 list_del_init (& pending_beacon -> list );
31233123
31243124 /* Applies the beacon hint to current wiphys */
3125- list_for_each_entry (rdev , & cfg80211_rdev_list , list )
3125+ for_each_rdev (rdev )
31263126 wiphy_update_new_beacon (& rdev -> wiphy , pending_beacon );
31273127
31283128 /* Remembers the beacon hint for new wiphys or reg changes */
@@ -3177,7 +3177,7 @@ static void reg_process_self_managed_hints(void)
31773177
31783178 ASSERT_RTNL ();
31793179
3180- list_for_each_entry (rdev , & cfg80211_rdev_list , list ) {
3180+ for_each_rdev (rdev ) {
31813181 wiphy_lock (& rdev -> wiphy );
31823182 reg_process_self_managed_hint (& rdev -> wiphy );
31833183 wiphy_unlock (& rdev -> wiphy );
@@ -3517,7 +3517,7 @@ static void restore_regulatory_settings(bool reset_user, bool cached)
35173517 world_alpha2 [0 ] = cfg80211_world_regdom -> alpha2 [0 ];
35183518 world_alpha2 [1 ] = cfg80211_world_regdom -> alpha2 [1 ];
35193519
3520- list_for_each_entry (rdev , & cfg80211_rdev_list , list ) {
3520+ for_each_rdev (rdev ) {
35213521 if (rdev -> wiphy .regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED )
35223522 continue ;
35233523 if (rdev -> wiphy .regulatory_flags & REGULATORY_CUSTOM_REG )
@@ -3574,7 +3574,7 @@ static bool is_wiphy_all_set_reg_flag(enum ieee80211_regulatory_flags flag)
35743574 struct cfg80211_registered_device * rdev ;
35753575 struct wireless_dev * wdev ;
35763576
3577- list_for_each_entry (rdev , & cfg80211_rdev_list , list ) {
3577+ for_each_rdev (rdev ) {
35783578 list_for_each_entry (wdev , & rdev -> wiphy .wdev_list , list ) {
35793579 wdev_lock (wdev );
35803580 if (!(wdev -> wiphy -> regulatory_flags & flag )) {
@@ -4244,7 +4244,7 @@ void regulatory_propagate_dfs_state(struct wiphy *wiphy,
42444244 if (WARN_ON (!cfg80211_chandef_valid (chandef )))
42454245 return ;
42464246
4247- list_for_each_entry (rdev , & cfg80211_rdev_list , list ) {
4247+ for_each_rdev (rdev ) {
42484248 if (wiphy == & rdev -> wiphy )
42494249 continue ;
42504250
0 commit comments