Merge tag 'mt76-for-kvalo-2021-01-29' of https://github.com/nbd168/wireless
[linux-2.6-microblaze.git] / net / mac80211 / util.c
index 8d3ae6b..f080fcf 100644 (file)
@@ -832,7 +832,7 @@ void ieee80211_iterate_active_interfaces_atomic(
 }
 EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic);
 
-void ieee80211_iterate_active_interfaces_rtnl(
+void ieee80211_iterate_active_interfaces_mtx(
        struct ieee80211_hw *hw, u32 iter_flags,
        void (*iterator)(void *data, u8 *mac,
                         struct ieee80211_vif *vif),
@@ -840,12 +840,12 @@ void ieee80211_iterate_active_interfaces_rtnl(
 {
        struct ieee80211_local *local = hw_to_local(hw);
 
-       ASSERT_RTNL();
+       lockdep_assert_wiphy(hw->wiphy);
 
        __iterate_interfaces(local, iter_flags | IEEE80211_IFACE_ITER_ACTIVE,
                             iterator, data);
 }
-EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_rtnl);
+EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_mtx);
 
 static void __iterate_stations(struct ieee80211_local *local,
                               void (*iterator)(void *data,
@@ -2595,7 +2595,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
        mutex_unlock(&local->mtx);
 
        if (sched_scan_stopped)
-               cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy, 0);
+               cfg80211_sched_scan_stopped_locked(local->hw.wiphy, 0);
 
  wake_up:
 
@@ -3811,7 +3811,7 @@ void ieee80211_dfs_cac_cancel(struct ieee80211_local *local)
        struct cfg80211_chan_def chandef;
 
        /* for interface list, to avoid linking iflist_mtx and chanctx_mtx */
-       ASSERT_RTNL();
+       lockdep_assert_wiphy(local->hw.wiphy);
 
        mutex_lock(&local->mtx);
        list_for_each_entry(sdata, &local->interfaces, list) {
@@ -3851,9 +3851,9 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work)
        }
        mutex_unlock(&local->chanctx_mtx);
 
-       rtnl_lock();
+       wiphy_lock(local->hw.wiphy);
        ieee80211_dfs_cac_cancel(local);
-       rtnl_unlock();
+       wiphy_unlock(local->hw.wiphy);
 
        if (num_chanctx > 1)
                /* XXX: multi-channel is not supported yet */