nl80211: Fix external_auth check for offloaded authentication
authorSrinivas Dasari <dasaris@codeaurora.org>
Fri, 2 Feb 2018 09:15:27 +0000 (11:15 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Feb 2018 12:17:09 +0000 (13:17 +0100)
Unfortunately removal of the ext_feature flag in the last revision of
the patch ended up negating the comparison and prevented the command
from being processed (either nl80211_external_auth() or
rdev_external_auth() returns -EOPNOTSUPP). Fix this by adding back the
lost '!'.

Fixes: 40cbfa90218b ("cfg80211/nl80211: Optional authentication offload to userspace")
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c

index 412ed8676306eee8756b22b4c067cefd26a22c0f..c6f256b29c734288f175bb1ea4543eec40596089 100644 (file)
@@ -12484,7 +12484,7 @@ static int nl80211_external_auth(struct sk_buff *skb, struct genl_info *info)
        struct net_device *dev = info->user_ptr[1];
        struct cfg80211_external_auth_params params;
 
-       if (rdev->ops->external_auth)
+       if (!rdev->ops->external_auth)
                return -EOPNOTSUPP;
 
        if (!info->attrs[NL80211_ATTR_SSID])