Răsfoiți Sursa

qcacld-3.0: Support Multicast Domain Name Server Offload

The purpose of the multicast Domain Name System (mDNS) is to resolve
host names to IP addresses within small networks that do not include
a local name server.

It utilizes essentially the same programming interfaces, packet formats
and operating semantics as the unicast DNS, and the advantage is zero
configuration service while no need for central or global server.
Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover
a named list of services by type in a specified domain using standard
DNS queries.

Here, we provide the ability to advertise the available services by
responding to mDNS queries.

Change-Id: Id2a0468d49237c21062cfd1988e34903658cdad9
CRs-Fixed: 3008549
Aditya Kodukula 3 ani în urmă
părinte
comite
e5d87bf5d6

+ 1 - 0
Kbuild

@@ -2882,6 +2882,7 @@ cppflags-$(CONFIG_FEATURE_OEM_DATA) += -DFEATURE_OEM_DATA
 cppflags-$(CONFIG_FEATURE_MOTION_DETECTION) += -DWLAN_FEATURE_MOTION_DETECTION
 cppflags-$(CONFIG_WLAN_FW_OFFLOAD) += -DWLAN_FW_OFFLOAD
 cppflags-$(CONFIG_WLAN_FEATURE_ELNA) += -DWLAN_FEATURE_ELNA
+cppflags-$(CONFIG_WLAN_FEATURE_MDNS_OFFLOAD) += -DWLAN_FEATURE_MDNS_OFFLOAD
 cppflags-$(CONFIG_FEATURE_COEX) += -DFEATURE_COEX
 cppflags-y += -DWLAN_FEATURE_INTERFACE_MGR
 cppflags-$(CONFIG_HOST_WAKEUP_OVER_QMI) += -DHOST_WAKEUP_OVER_QMI

+ 40 - 1
components/fw_offload/dispatcher/inc/wlan_fwol_public_structs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 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
@@ -83,6 +83,40 @@ struct thermal_throttle_info {
 	uint32_t pdev_id;
 };
 
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+
+#define MDNS_FQDN_TYPE_GENERAL	(0)
+/* Maximum length of FQDN string including the NULL byte */
+#define MAX_FQDN_LEN		(64)
+/* This length depends on the WMI Message and TLV Header size.
+ * ((WMI_SVC_MSG_MAX_SIZE - WMI_TLV_HDR_SIZE)
+ */
+#define MAX_MDNS_RESP_LEN	(512)
+
+/**
+ * struct mdns_config_info - Multicast DNS configuration information
+ * @vdev_id: vdev id
+ * @enable: false - disable mdns
+ *          true - enable mdns
+ * @fqdn_type: FQDN type
+ * @fqdn_data: Fully Qualified Domain Name of the local network
+ * @fqdn_len: FQDN length
+ * @resource_record_count: Number Resource Records present in the answer payload
+ * @answer_payload_len: Length of the answer payload sent by mdnsResponder in userspace
+ * @answer_payload_data: Binary blob used to frame mdns response for mdns queries
+ */
+struct mdns_config_info {
+	uint32_t vdev_id;
+	bool enable;
+	uint32_t fqdn_type;
+	uint32_t fqdn_len;
+	uint8_t fqdn_data[MAX_FQDN_LEN];
+	uint32_t resource_record_count;
+	uint32_t answer_payload_len;
+	uint8_t answer_payload_data[MAX_MDNS_RESP_LEN];
+};
+#endif
+
 /**
  * struct wlan_fwol_tx_ops - structure of tx func pointers
  * @set_elna_bypass: set eLNA bypass
@@ -90,6 +124,7 @@ struct thermal_throttle_info {
  * @reg_evt_handler: register event handler
  * @unreg_evt_handler: unregister event handler
  * @send_dscp_up_map_to_fw: send dscp-to-up map values to FW
+ * @set_mdns_config: set mdns config info
  */
 struct wlan_fwol_tx_ops {
 #ifdef WLAN_FEATURE_ELNA
@@ -107,6 +142,10 @@ struct wlan_fwol_tx_ops {
 			struct wlan_objmgr_psoc *psoc,
 			uint32_t *dscp_to_up_map);
 #endif
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+	QDF_STATUS (*set_mdns_config)(struct wlan_objmgr_psoc *psoc,
+				      struct mdns_config_info *mdns_info);
+#endif
 };
 
 /**

+ 12 - 0
components/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h

@@ -657,6 +657,18 @@ QDF_STATUS ucfg_fwol_send_dscp_up_map_to_fw(
 }
 #endif
 
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+/**
+ * ucfg_fwol_set_mdns_config() - set mdns config
+ * @psoc: pointer to psoc object
+ * @mdns_info: mdns config info pointer
+ *
+ * Return: QDF_STATUS_SUCCESS on success
+ */
+QDF_STATUS ucfg_fwol_set_mdns_config(struct wlan_objmgr_psoc *psoc,
+				     struct mdns_config_info *mdns_info);
+#endif /* WLAN_FEATURE_MDNS_OFFLOAD */
+
 /**
  * ucfg_fwol_configure_global_params - API to configure global params
  * @psoc: pointer to psoc object

+ 29 - 0
components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c

@@ -1043,6 +1043,35 @@ QDF_STATUS ucfg_fwol_send_dscp_up_map_to_fw(struct wlan_objmgr_vdev *vdev,
 }
 #endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */
 
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+QDF_STATUS ucfg_fwol_set_mdns_config(struct wlan_objmgr_psoc *psoc,
+				     struct mdns_config_info *mdns_info)
+{
+	QDF_STATUS status;
+	struct wlan_fwol_psoc_obj *fwol_obj;
+	struct wlan_fwol_tx_ops *tx_ops;
+
+	if (!psoc) {
+		fwol_err("NULL pointer for psoc");
+		return QDF_STATUS_E_INVAL;
+	}
+
+	fwol_obj = fwol_get_psoc_obj(psoc);
+	if (!fwol_obj) {
+		fwol_err("Failed to get FWOL Obj");
+		return QDF_STATUS_E_INVAL;
+	}
+
+	tx_ops = &fwol_obj->tx_ops;
+	if (tx_ops->set_mdns_config)
+		status = tx_ops->set_mdns_config(psoc, mdns_info);
+	else
+		status = QDF_STATUS_E_IO;
+
+	return status;
+}
+#endif /* WLAN_FEATURE_MDNS_OFFLOAD */
+
 QDF_STATUS ucfg_fwol_configure_global_params(struct wlan_objmgr_psoc *psoc,
 					     struct wlan_objmgr_pdev *pdev)
 {

+ 45 - 3
components/target_if/fw_offload/src/target_if_fwol.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 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
@@ -373,8 +373,49 @@ target_if_fwol_unregister_thermal_throttle_handler(
 }
 #endif
 
-QDF_STATUS target_if_fwol_register_event_handler(struct wlan_objmgr_psoc *psoc,
-						 void *arg)
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+/**
+ * target_if_fwol_set_mdns_config() - Set mdns Config to FW
+ * @psoc: pointer to PSOC object
+ * @offload_info: pointer to mdns config info
+ *
+ * Return: QDF_STATUS_SUCCESS on success
+ */
+static QDF_STATUS
+target_if_fwol_set_mdns_config(struct wlan_objmgr_psoc *psoc,
+			       struct mdns_config_info *mdns_info)
+{
+	QDF_STATUS status;
+	wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
+
+	if (!wmi_handle) {
+		target_if_err("Invalid wmi_handle");
+		return QDF_STATUS_E_INVAL;
+	}
+
+	status = wmi_unified_send_set_mdns_config_cmd(wmi_handle,
+						      mdns_info);
+	if (QDF_IS_STATUS_ERROR(status))
+		target_if_err("Failed to set mDNS Config %d", status);
+
+	return status;
+}
+
+static void
+target_if_fwol_register_mdns_tx_ops(struct wlan_fwol_tx_ops *tx_ops)
+{
+	tx_ops->set_mdns_config = target_if_fwol_set_mdns_config;
+}
+#else
+static void
+target_if_fwol_register_mdns_tx_ops(struct wlan_fwol_tx_ops *tx_ops)
+{
+}
+#endif /* WLAN_FEATURE_MDNS_OFFLOAD */
+
+QDF_STATUS
+target_if_fwol_register_event_handler(struct wlan_objmgr_psoc *psoc,
+				      void *arg)
 {
 	target_if_fwol_register_elna_event_handler(psoc, arg);
 	target_if_fwol_register_thermal_throttle_handler(psoc);
@@ -396,6 +437,7 @@ QDF_STATUS target_if_fwol_register_tx_ops(struct wlan_fwol_tx_ops *tx_ops)
 {
 	target_if_fwol_register_elna_tx_ops(tx_ops);
 	target_if_fwol_register_dscp_up_tx_ops(tx_ops);
+	target_if_fwol_register_mdns_tx_ops(tx_ops);
 
 	tx_ops->reg_evt_handler = target_if_fwol_register_event_handler;
 	tx_ops->unreg_evt_handler = target_if_fwol_unregister_event_handler;

+ 5 - 0
configs/default_defconfig

@@ -1316,6 +1316,11 @@ ifeq ($(CONFIG_WLAN_FW_OFFLOAD), y)
 CONFIG_WLAN_FEATURE_ELNA := y
 endif
 
+#Enable mDNS feature
+ifeq ($(CONFIG_WLAN_FW_OFFLOAD), y)
+CONFIG_WLAN_FEATURE_MDNS_OFFLOAD := y
+endif
+
 #Enable DP Bus Vote
 CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH := y
 

+ 211 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -16146,6 +16146,216 @@ static int wlan_hdd_cfg80211_get_radar_history(struct wiphy *wiphy,
 #define FEATURE_RADAR_HISTORY_VENDOR_COMMANDS
 #endif
 
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+
+#define MDNS_ENABLE \
+	QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ENABLE
+#define MDNS_TABLE \
+	QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_TABLE
+#define MDNS_ENTRY \
+	QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ENTRY
+#define MDNS_FQDN \
+	QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_FQDN
+#define MDNS_RESOURCE_RECORDS_COUNT \
+	QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_RESOURCE_RECORDS_COUNT
+#define MDNS_ANSWER_PAYLOAD \
+	QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_PAYLOAD
+
+const struct nla_policy wlan_hdd_set_mdns_offload_policy[
+			QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX + 1] = {
+	[MDNS_ENABLE] = {.type = NLA_FLAG},
+	[MDNS_TABLE] = {.type = NLA_NESTED},
+	[MDNS_ENTRY] = {.type = NLA_NESTED},
+	[MDNS_FQDN] = {.type = NLA_STRING, .len = MAX_FQDN_LEN - 1 },
+	[MDNS_RESOURCE_RECORDS_COUNT] = {.type = NLA_U16},
+	[MDNS_ANSWER_PAYLOAD] = {.type = NLA_BINARY, .len = MAX_MDNS_RESP_LEN },
+
+};
+
+static int hdd_extract_mdns_attr(struct nlattr *tb[],
+				 struct mdns_config_info *mdns_info)
+{
+	int len, count;
+
+	/* Configure mDNS FQDN*/
+
+	if (!tb[MDNS_FQDN]) {
+		hdd_err_rl("mDNS_FQDN attr failed");
+		return -EINVAL;
+	}
+
+	len = nla_len(tb[MDNS_FQDN]);
+	mdns_info->fqdn_len = len;
+	mdns_info->fqdn_type = MDNS_FQDN_TYPE_GENERAL;
+	nla_strlcpy(mdns_info->fqdn_data, tb[MDNS_FQDN],
+		    sizeof(mdns_info->fqdn_data));
+
+	/* Configure mDNS Answer Payload*/
+
+	if (!tb[MDNS_RESOURCE_RECORDS_COUNT]) {
+		hdd_err_rl("mDNS_RR count attr failed");
+		return -EINVAL;
+	}
+
+	count = nla_get_u16(tb[MDNS_RESOURCE_RECORDS_COUNT]);
+	mdns_info->resource_record_count = count;
+
+	if (!tb[MDNS_ANSWER_PAYLOAD]) {
+		hdd_err_rl("mDNS_Response attr failed");
+		return -EINVAL;
+	}
+
+	len = nla_len(tb[MDNS_ANSWER_PAYLOAD]);
+	mdns_info->answer_payload_len = len;
+	nla_memcpy(mdns_info->answer_payload_data,
+		   nla_data(tb[MDNS_ANSWER_PAYLOAD]),
+		   sizeof(mdns_info->answer_payload_data));
+
+	return 0;
+}
+
+/**
+ * __wlan_hdd_cfg80211_set_mdns_offload() - mDNS Offload configuration
+ * @wiphy: wiphy device pointer
+ * @wdev: wireless device pointer
+ * @data: Vendor command data buffer
+ * @data_len: Buffer length
+ *
+ * Handles QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX.
+ *
+ * Return: Error code.
+ */
+static int
+__wlan_hdd_cfg80211_set_mdns_offload(struct wiphy *wiphy,
+				     struct wireless_dev *wdev,
+				     const void *data,
+				     int data_len)
+{
+	struct net_device *dev = wdev->netdev;
+	struct hdd_context *hdd_ctx  = wiphy_priv(wiphy);
+	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
+	struct nlattr *curr_attr;
+	struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX + 1];
+	struct nlattr *tb2[QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX + 1];
+	struct mdns_config_info *mdns_info;
+	bool is_mdns_enable;
+	int errno, rem;
+
+	hdd_enter_dev(dev);
+
+	errno = wlan_hdd_validate_context(hdd_ctx);
+	if (errno)
+		return errno;
+
+	if (hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) {
+		hdd_err_rl("Command not allowed in FTM mode");
+		return -EINVAL;
+	}
+
+	if (!(adapter->device_mode == QDF_STA_MODE ||
+	      adapter->device_mode == QDF_P2P_CLIENT_MODE)) {
+		hdd_err_rl("mDNS is only supported in STA or P2P CLI modes!");
+		return -ENOTSUPP;
+	}
+	if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX,
+				    data, data_len,
+				    wlan_hdd_set_mdns_offload_policy)) {
+		hdd_err_rl("invalid attr");
+		return -EINVAL;
+	}
+
+	if (!tb[MDNS_ENABLE]) {
+		os_if_fwol_disable_mdns_offload(hdd_ctx->psoc);
+		return -EINVAL;
+	}
+
+	is_mdns_enable = nla_get_flag(tb[MDNS_ENABLE]);
+
+	if (is_mdns_enable && !tb[MDNS_TABLE]) {
+		hdd_err_rl("Invalid mDNS table of records");
+		return -EINVAL;
+	}
+
+	mdns_info = qdf_mem_malloc(sizeof(*mdns_info));
+	if (!mdns_info)
+		return -ENOMEM;
+
+	mdns_info->enable = is_mdns_enable;
+	mdns_info->vdev_id = adapter->vdev_id;
+
+	nla_for_each_nested(curr_attr, tb[MDNS_TABLE], rem) {
+		if (wlan_cfg80211_nla_parse(tb2,
+					QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX,
+					nla_data(curr_attr),
+					nla_len(curr_attr),
+					wlan_hdd_set_mdns_offload_policy)) {
+			hdd_err_rl("Failed to parse mDNS table of records");
+			errno = -EINVAL;
+			goto out;
+		}
+
+		errno = hdd_extract_mdns_attr(tb2, mdns_info);
+		if (errno) {
+			hdd_err_rl("Failed to extract MDNS nested attrs");
+			goto out;
+		}
+	}
+
+	os_if_fwol_enable_mdns_offload(hdd_ctx->psoc, mdns_info);
+
+out:
+	qdf_mem_free(mdns_info);
+	hdd_exit();
+
+	return errno;
+}
+
+/**
+ * wlan_hdd_cfg80211_set_mdns_offload() - mDNS Offload configuration
+ * @wiphy: wiphy device pointer
+ * @wdev: wireless device pointer
+ * @data: Vendor command data buffer
+ * @data_len: Buffer length
+ *
+ * Handles QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX.
+ *
+ * Return: EOK or other error codes.
+ */
+static int wlan_hdd_cfg80211_set_mdns_offload(struct wiphy *wiphy,
+					      struct wireless_dev *wdev,
+					      const void *data,
+					      int data_len)
+{
+	int errno;
+	struct osif_vdev_sync *vdev_sync;
+
+	errno = osif_vdev_sync_op_start(wdev->netdev, &vdev_sync);
+	if (errno)
+		return errno;
+
+	errno = __wlan_hdd_cfg80211_set_mdns_offload(wiphy, wdev,
+						     data, data_len);
+
+	osif_vdev_sync_op_stop(vdev_sync);
+
+	return errno;
+}
+
+#define FEATURE_MDNS_OFFLOAD_VENDOR_COMMANDS				\
+{									\
+	.info.vendor_id = QCA_NL80211_VENDOR_ID,			\
+	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD,		\
+	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				\
+		WIPHY_VENDOR_CMD_NEED_NETDEV |				\
+		WIPHY_VENDOR_CMD_NEED_RUNNING,				\
+	.doit = wlan_hdd_cfg80211_set_mdns_offload,			\
+	vendor_command_policy(wlan_hdd_set_mdns_offload_policy,		\
+			      QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX)	\
+},
+#else
+#define FEATURE_MDNS_OFFLOAD_VENDOR_COMMANDS
+#endif
+
 const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
 	{
 		.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -16605,6 +16815,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
 	FEATURE_MEDIUM_ASSESS_VENDOR_COMMANDS
 	FEATURE_RADAR_HISTORY_VENDOR_COMMANDS
 	FEATURE_AVOID_FREQ_EXT_VENDOR_COMMANDS
+	FEATURE_MDNS_OFFLOAD_VENDOR_COMMANDS
 };
 
 struct hdd_context *hdd_cfg80211_wiphy_alloc(void)

+ 35 - 1
os_if/fw_offload/inc/os_if_fwol.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 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
@@ -26,6 +26,7 @@
 #define __OS_IF_FWOL_H__
 
 #include "wlan_objmgr_vdev_obj.h"
+#include "wlan_fwol_public_structs.h"
 
 #ifdef WLAN_FEATURE_ELNA
 /**
@@ -82,4 +83,37 @@ static inline int os_if_fwol_send_dscp_up_map_to_fw(
 }
 #endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */
 
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+/**
+ * os_if_fwol_enable_mdns_offload() - Enable mdns offload
+ * @vdev: Pointer to vdev
+ *
+ * This function will offload mdns response to FW.
+ *
+ * Return: 0 on success; error number otherwise
+ */
+int os_if_fwol_enable_mdns_offload(struct wlan_objmgr_psoc *psoc,
+				   struct mdns_config_info *mdns_info);
+
+/**
+ * os_if_fwol_diasable_mdns_offload() - Disable mdns offload
+ * @vdev: Pointer to vdev
+ *
+ * This function will disable the mdns offload feature.
+ *
+ * Return: 0 on success; error number otherwise
+ */
+int os_if_fwol_disable_mdns_offload(struct wlan_objmgr_psoc *psoc);
+#else
+static inline int os_if_fwol_enable_mdns_offload(struct wlan_objmgr_psoc *psoc)
+{
+	return 0;
+}
+
+static inline int os_if_fwol_disable_mdns_offload(struct wlan_objmgr_psoc *psoc)
+{
+	return 0;
+}
+#endif /* WLAN_FEATURE_MDNS_OFFLOAD */
+
 #endif /* __OS_IF_FWOL_H__ */

+ 55 - 2
os_if/fw_offload/src/os_if_fwol.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021 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
@@ -22,7 +22,6 @@
 
 #include "wlan_cfg80211.h"
 #include "wlan_osif_request_manager.h"
-#include "wlan_fwol_public_structs.h"
 #include "wlan_fwol_ucfg_api.h"
 #include "os_if_fwol.h"
 
@@ -145,3 +144,57 @@ int os_if_fwol_send_dscp_up_map_to_fw(struct wlan_objmgr_vdev *vdev,
 	return qdf_status_to_os_return(status);
 }
 #endif
+
+#ifdef WLAN_FEATURE_MDNS_OFFLOAD
+int os_if_fwol_enable_mdns_offload(struct wlan_objmgr_psoc *psoc,
+				   struct mdns_config_info *mdns_info)
+{
+	int ret = 0;
+	QDF_STATUS status;
+
+	if (!psoc) {
+		osif_err("Null pointer for psoc");
+		return -EINVAL;
+	}
+
+	if (!mdns_info) {
+		osif_err("Invalid mDNS config");
+		return -EINVAL;
+	}
+
+	status = ucfg_fwol_set_mdns_config(psoc, mdns_info);
+	if (!QDF_IS_STATUS_SUCCESS(status)) {
+		osif_err("Failed to set mDNS Config");
+		ret = qdf_status_to_os_return(status);
+	}
+
+	return ret;
+}
+
+int os_if_fwol_disable_mdns_offload(struct wlan_objmgr_psoc *psoc)
+{
+	struct mdns_config_info *mdns_info = NULL;
+	int ret = 0;
+	QDF_STATUS status;
+
+	if (!psoc) {
+		osif_err("Null pointer for psoc");
+		return -EINVAL;
+	}
+
+	mdns_info = qdf_mem_malloc(sizeof(*mdns_info));
+	if (!mdns_info) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	mdns_info->enable = false;
+	status = ucfg_fwol_set_mdns_config(psoc, mdns_info);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		osif_err("Failed to set mDNS Config");
+	ret = qdf_status_to_os_return(status);
+out:
+	qdf_mem_free(mdns_info);
+	return ret;
+}
+#endif /* WLAN_FEATURE_MDNS_OFFLOAD */