Macro ASSERT_RDEV_LOCK(rdev) is equal to ASSERT_RTNL(), so replace it with ASSERT_RTNL() and remove it.
Unified · Split
| @@ -166,7 +166,6 @@ static inline void wdev_unlock(struct wireless_dev *wdev) · 165 unmodified lines | |||
| 166 | mutex_unlock(&wdev->mtx); | 166 | mutex_unlock(&wdev->mtx); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | #define ASSERT_RDEV_LOCK(rdev) ASSERT_RTNL() | ||
| 170 | #define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx) | 169 | #define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx) |
| 171 | 170 | ||
| 172 | static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev) | 171 | static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev) |
| @@ -64,7 +64,6 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) · 63 unmodified lines | |||
| 64 | int n_channels, err; | 64 | int n_channels, err; |
| 65 | 65 | ||
| 66 | ASSERT_RTNL(); | 66 | ASSERT_RTNL(); |
| 67 | ASSERT_RDEV_LOCK(rdev); | ||
| 68 | ASSERT_WDEV_LOCK(wdev); | 67 | ASSERT_WDEV_LOCK(wdev); |
| 69 | 68 | ||
| 70 | if (rdev->scan_req || rdev->scan_msg) | 69 | if (rdev->scan_req || rdev->scan_msg) |
| @@ -838,7 +838,6 @@ void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev) · 837 unmodified lines | |||
| 838 | struct wireless_dev *wdev; | 838 | struct wireless_dev *wdev; |
| 839 | 839 | ||
| 840 | ASSERT_RTNL(); | 840 | ASSERT_RTNL(); |
| 841 | ASSERT_RDEV_LOCK(rdev); | ||
| 842 | 841 | ||
| 843 | list_for_each_entry(wdev, &rdev->wdev_list, list) | 842 | list_for_each_entry(wdev, &rdev->wdev_list, list) |
| 844 | cfg80211_process_wdev_events(wdev); | 843 | cfg80211_process_wdev_events(wdev); |
| @@ -851,7 +850,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, · 6 unmodified lines | |||
| 851 | int err; | 850 | int err; |
| 852 | enum nl80211_iftype otype = dev->ieee80211_ptr->iftype; | 851 | enum nl80211_iftype otype = dev->ieee80211_ptr->iftype; |
| 853 | 852 | ||
| 854 | ASSERT_RDEV_LOCK(rdev); | 853 | ASSERT_RTNL(); |
| 855 | 854 | ||
| 856 | /* don't support changing VLANs, you just re-create them */ | 855 | /* don't support changing VLANs, you just re-create them */ |
| 857 | if (otype == NL80211_IFTYPE_AP_VLAN) | 856 | if (otype == NL80211_IFTYPE_AP_VLAN) |
| @@ -21,7 +21,7 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev, · 20 unmodified lines | |||
| 21 | const u8 *prev_bssid = NULL; | 21 | const u8 *prev_bssid = NULL; |
| 22 | int err, i; | 22 | int err, i; |
| 23 | 23 | ||
| 24 | ASSERT_RDEV_LOCK(rdev); | 24 | ASSERT_RTNL(); |
| 25 | ASSERT_WDEV_LOCK(wdev); | 25 | ASSERT_WDEV_LOCK(wdev); |
| 26 | 26 | ||
| 27 | if (!netif_running(wdev->netdev)) | 27 | if (!netif_running(wdev->netdev)) |