Commit 73fb08e2 authored by Zhao, Gang's avatar Zhao, Gang Committed by Johannes Berg
Browse files

cfg80211: remove macro ASSERT_RDEV_LOCK(rdev)



Macro ASSERT_RDEV_LOCK(rdev) is equal to ASSERT_RTNL(), so replace it
with ASSERT_RTNL() and remove it.

Signed-off-by: default avatarZhao, Gang <gamerh2o@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 4da64622
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -166,7 +166,6 @@ static inline void wdev_unlock(struct wireless_dev *wdev)
	mutex_unlock(&wdev->mtx);
	mutex_unlock(&wdev->mtx);
}
}


#define ASSERT_RDEV_LOCK(rdev) ASSERT_RTNL()
#define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx)
#define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx)


static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev)
static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev)
+0 −1
Original line number Original line Diff line number Diff line
@@ -64,7 +64,6 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev)
	int n_channels, err;
	int n_channels, err;


	ASSERT_RTNL();
	ASSERT_RTNL();
	ASSERT_RDEV_LOCK(rdev);
	ASSERT_WDEV_LOCK(wdev);
	ASSERT_WDEV_LOCK(wdev);


	if (rdev->scan_req || rdev->scan_msg)
	if (rdev->scan_req || rdev->scan_msg)
+1 −2
Original line number Original line Diff line number Diff line
@@ -838,7 +838,6 @@ void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev)
	struct wireless_dev *wdev;
	struct wireless_dev *wdev;


	ASSERT_RTNL();
	ASSERT_RTNL();
	ASSERT_RDEV_LOCK(rdev);


	list_for_each_entry(wdev, &rdev->wdev_list, list)
	list_for_each_entry(wdev, &rdev->wdev_list, list)
		cfg80211_process_wdev_events(wdev);
		cfg80211_process_wdev_events(wdev);
@@ -851,7 +850,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
	int err;
	int err;
	enum nl80211_iftype otype = dev->ieee80211_ptr->iftype;
	enum nl80211_iftype otype = dev->ieee80211_ptr->iftype;


	ASSERT_RDEV_LOCK(rdev);
	ASSERT_RTNL();


	/* don't support changing VLANs, you just re-create them */
	/* don't support changing VLANs, you just re-create them */
	if (otype == NL80211_IFTYPE_AP_VLAN)
	if (otype == NL80211_IFTYPE_AP_VLAN)
+1 −1
Original line number Original line Diff line number Diff line
@@ -21,7 +21,7 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
	const u8 *prev_bssid = NULL;
	const u8 *prev_bssid = NULL;
	int err, i;
	int err, i;


	ASSERT_RDEV_LOCK(rdev);
	ASSERT_RTNL();
	ASSERT_WDEV_LOCK(wdev);
	ASSERT_WDEV_LOCK(wdev);


	if (!netif_running(wdev->netdev))
	if (!netif_running(wdev->netdev))