Merge tag 'timers-core-2021-02-15' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / net / wireless / mlme.c
index e1e9076..3aa69b3 100644 (file)
@@ -450,7 +450,7 @@ static void cfg80211_mgmt_registrations_update(struct wireless_dev *wdev)
        struct cfg80211_mgmt_registration *reg;
        struct mgmt_frame_regs upd = {};
 
-       ASSERT_RTNL();
+       lockdep_assert_held(&rdev->wiphy.mtx);
 
        spin_lock_bh(&wdev->mgmt_registrations_lock);
        if (!wdev->mgmt_registrations_need_update) {
@@ -492,10 +492,10 @@ void cfg80211_mgmt_registrations_update_wk(struct work_struct *wk)
        rdev = container_of(wk, struct cfg80211_registered_device,
                            mgmt_registrations_update_wk);
 
-       rtnl_lock();
+       wiphy_lock(&rdev->wiphy);
        list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list)
                cfg80211_mgmt_registrations_update(wdev);
-       rtnl_unlock();
+       wiphy_unlock(&rdev->wiphy);
 }
 
 int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,