bool has_monitors_only_old = cfg80211_has_monitors_only(rdev);
bool has_monitors_only_new;
- ASSERT_RDEV_LOCK(rdev);
+ ASSERT_RTNL();
rdev->num_running_ifaces += num;
if (iftype == NL80211_IFTYPE_MONITOR)
wdev->beacon_interval = 0;
break;
case NETDEV_DOWN:
- dev_hold(dev);
- cfg80211_lock_rdev(rdev);
cfg80211_update_iface_num(rdev, wdev->iftype, -1);
- cfg80211_unlock_rdev(rdev);
+ dev_hold(dev);
queue_work(cfg80211_wq, &wdev->cleanup_work);
break;
case NETDEV_UP:
mutex_unlock(&rdev->devlist_mtx);
if (ret)
return notifier_from_errno(ret);
- cfg80211_lock_rdev(rdev);
cfg80211_update_iface_num(rdev, wdev->iftype, 1);
- cfg80211_unlock_rdev(rdev);
break;
}
#include <linux/debugfs.h>
#include <linux/rfkill.h>
#include <linux/workqueue.h>
+#include <linux/rtnetlink.h>
#include <net/genetlink.h>
#include <net/cfg80211.h>
#include "reg.h"
u32 ap_beacons_nlpid;
+ /* protected by RTNL only */
int num_running_ifaces;
int num_running_monitor_ifaces;
static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev)
{
- ASSERT_RDEV_LOCK(rdev);
+ ASSERT_RTNL();
return rdev->num_running_ifaces == rdev->num_running_monitor_ifaces &&
rdev->num_running_ifaces > 0;