diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-04-19 06:19:39 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-22 09:31:55 -0400 |
commit | 6e3ab5543bed9dffb7d1a6404c3782284a432a70 (patch) | |
tree | f73527aa65211a39c2cf1d0bf53dd2ed08261e00 /net/wireless | |
parent | 65e8d5b8cbff766628dad7d366986676f18b1e89 (diff) |
cfg80211: invert P2P-Device vs. netdev check ordering
In cfg80211_can_use_iftype_chan(), check for P2P Device
first, and then for netdevs. This doesn't really change
anything but makes the code a bit easier to read since
it may not be obvious for everyone at first that a P2P
device has no netdev.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 3d8a1334f4a9..a7046a4333e9 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -1278,12 +1278,12 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, | |||
1278 | list_for_each_entry(wdev_iter, &rdev->wdev_list, list) { | 1278 | list_for_each_entry(wdev_iter, &rdev->wdev_list, list) { |
1279 | if (wdev_iter == wdev) | 1279 | if (wdev_iter == wdev) |
1280 | continue; | 1280 | continue; |
1281 | if (wdev_iter->netdev) { | 1281 | if (wdev_iter->iftype == NL80211_IFTYPE_P2P_DEVICE) { |
1282 | if (!netif_running(wdev_iter->netdev)) | ||
1283 | continue; | ||
1284 | } else if (wdev_iter->iftype == NL80211_IFTYPE_P2P_DEVICE) { | ||
1285 | if (!wdev_iter->p2p_started) | 1282 | if (!wdev_iter->p2p_started) |
1286 | continue; | 1283 | continue; |
1284 | } else if (wdev_iter->netdev) { | ||
1285 | if (!netif_running(wdev_iter->netdev)) | ||
1286 | continue; | ||
1287 | } else { | 1287 | } else { |
1288 | WARN_ON(1); | 1288 | WARN_ON(1); |
1289 | } | 1289 | } |