cfg80211: allow vendor commands to be sent to nan interface
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 19 Oct 2016 04:47:47 +0000 (07:47 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 19 Oct 2016 10:16:02 +0000 (12:16 +0200)
Allow vendor commands that require WIPHY_VENDOR_CMD_NEED_RUNNING flag
to be sent to NAN interface.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c

index e48b9c3988d31bfa5ced9ae860b8a756264e58e6..fcf5b4f3f555cb9c787e6de3f33b6edc9defa04e 100644 (file)
@@ -11258,7 +11258,8 @@ static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info)
                                if (wdev->netdev &&
                                    !netif_running(wdev->netdev))
                                        return -ENETDOWN;
-                               if (!wdev->netdev && !wdev->p2p_started)
+                               if (!wdev->netdev && !wdev->p2p_started &&
+                                   !wdev->nan_started)
                                        return -ENETDOWN;
                        }