nl80211: fix logic inversion in start_nan()
Johannes Berg
maintainerPATCH 1/1 nl80211: fix logic inversion in start_nan()
From: Johannes Berg <[email protected]>
Arend inadvertedly inverted the logic while converting to wdev_running(), fix that.
Fixes 73c7da3dae1e ("cfg80211: add generic helper to check interface is running")
Signed-off-by Johannes Berg <[email protected]>
--- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
@@ -10625,7 +10625,7 @@ static int nl80211_start_nan(struct sk_buff *skb, struct genl_info *info)if (wdev->iftype !=NL80211_IFTYPE_NAN )return -EOPNOTSUPP ; -if (!wdev_running (wdev)) +if (wdev_running (wdev))return -EEXIST ;if (rfkill_blocked (rdev->rfkill))
Signature · 1 line
2.9.3
Quoted 4 lines · Johannes Berg
From: Johannes Berg <[email protected]>
Arend inadvertedly inverted the logic while converting to
wdev_running(), fix that.
It was indeed inadvertedly.
Thanks,
Arend
Quoted 20 lines
Fixes 73c7da3dae1e ("cfg80211: add generic helper to check interface is running")Signed-off-by Johannes Berg <[email protected]>--- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/wireless/nl80211.c +1
-1@@ -10625,7 +10625,7 @@ static int nl80211_start_nan(struct sk_buff *skb, struct genl_info *info)if (wdev->iftype !=NL80211_IFTYPE_NAN )return -EOPNOTSUPP ; -if (!wdev_running (wdev)) +if (wdev_running (wdev))return -EEXIST ;if (rfkill_blocked (rdev->rfkill))
Quoted 7 lines · Arend Van Spriel
Quoted 4 lines · Johannes Berg
From: Johannes Berg <[email protected]>
Arend inadvertedly inverted the logic while converting to
wdev_running(), fix that.It was indeed inadvertedly.
Actually spelling checker complains. Should be 'inadvertently'.
Regards,
Arend
Quoted 23 lines
Thanks,
ArendQuoted 20 lines
Fixes 73c7da3dae1e ("cfg80211: add generic helper to check interface is running")Signed-off-by Johannes Berg <[email protected]>--- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/wireless/nl80211.c +1
-1@@ -10625,7 +10625,7 @@ static int nl80211_start_nan(struct sk_buff *skb, struct genl_info *info)if (wdev->iftype !=NL80211_IFTYPE_NAN )return -EOPNOTSUPP ; -if (!wdev_running (wdev)) +if (wdev_running (wdev))return -EEXIST ;if (rfkill_blocked (rdev->rfkill))