cfg80211: off by one in nl80211_trigger_scan()
[firefly-linux-kernel-4.4.55.git] / net / wireless / mesh.c
index 0e5c122ce32445236efa490d7ae5eef5425aa351..5c116083eeca7f99c28b9f8e9835a5d32e0e24db 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/ieee80211.h>
 #include <net/cfg80211.h>
+#include "nl80211.h"
 #include "core.h"
 
 /* Default values, timeouts in ms */
@@ -55,6 +56,7 @@ const struct mesh_setup default_mesh_setup = {
        .path_metric = IEEE80211_PATH_METRIC_AIRTIME,
        .ie = NULL,
        .ie_len = 0,
+       .is_secure = false,
 };
 
 int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
@@ -109,6 +111,19 @@ int cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
        return err;
 }
 
+void cfg80211_notify_new_peer_candidate(struct net_device *dev,
+               const u8 *macaddr, const u8* ie, u8 ie_len, gfp_t gfp)
+{
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+       if (WARN_ON(wdev->iftype != NL80211_IFTYPE_MESH_POINT))
+               return;
+
+       nl80211_send_new_peer_candidate(wiphy_to_dev(wdev->wiphy), dev,
+                       macaddr, ie, ie_len, gfp);
+}
+EXPORT_SYMBOL(cfg80211_notify_new_peer_candidate);
+
 static int __cfg80211_leave_mesh(struct cfg80211_registered_device *rdev,
                                 struct net_device *dev)
 {