Bläddra i källkod

qcacmn: North bound interface frame work

Add North bound interface frame work for convergence.

Change-Id: I550f37077b2878ed2ad3ebcc4aa3f2e4158d041e
CRs-Fixed: 1098688
Om Prakash Tripathi 8 år sedan
förälder
incheckning
3b3cd39741
2 ändrade filer med 96 tillägg och 0 borttagningar
  1. 34 0
      os_if/linux/wlan_cfg80211.c
  2. 62 0
      os_if/linux/wlan_cfg80211.h

+ 34 - 0
os_if/linux/wlan_cfg80211.c

@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: defines driver functions interfacing with linux kernel
+ */
+
+#include "wlan_cfg80211.h"
+
+int wlan_cfg80211_scan(struct wiphy *wiphy,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
+		struct net_device *dev,
+#endif
+		struct cfg80211_scan_request *request)
+{
+	qdf_print("%s \n", __func__);
+
+	return 0;
+}

+ 62 - 0
os_if/linux/wlan_cfg80211.h

@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: declares driver functions interfacing with linux kernel
+ */
+
+#include <linux/version.h>
+#include <linux/netdevice.h>
+#include <net/cfg80211.h>
+#include <qca-vendor.h>
+
+#define COMMON_VENDOR_COMMANDS						\
+{ 									\
+	.info.vendor_id = OUI_QCA,					\
+	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION,\
+	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				\
+		 WIPHY_VENDOR_CMD_NEED_NETDEV,				\
+	.doit = NULL							\
+},									\
+{									\
+	.info.vendor_id = OUI_QCA,					\
+	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION,\
+	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				\
+		WIPHY_VENDOR_CMD_NEED_NETDEV,				\
+	.doit = NULL							\
+},
+
+/**
+ * wlan_cfg80211_scan() - API to process cfg80211 scan request
+ * @wiphy: Pointer to wiphy
+ * @dev: Pointer to net device
+ * @request: Pointer to scan request
+ *
+ * API to trigger scan and update cfg80211 scan database.
+ * scan dump command can be used to fetch scan results
+ * on receipt of scan complete event.
+ *
+ * Return: 0 for success, non zero for failure
+ */
+
+int wlan_cfg80211_scan(struct wiphy *wiphy,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
+		struct net_device *dev,
+#endif
+		struct cfg80211_scan_request *request);
+