qcacld-3.0: Add HAL command support to set NS offload

Propagation from qcacld-2.0 to qcacld-3.0

Add support to enable/disable NS offload to firmware from HAL
vendor command.

As part of this fix when NS offload is set to disable from HAL
command, NS will not be offloaded when wlan goes to suspend state
even if NS offload is enabled in cfg ini.

Change-Id: Iffaaa9be2e62ea03fcbe3e32d2cc654d3e7334f5
CRs-Fixed: 954880
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index 3191adc..ba11796 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -373,6 +373,9 @@
 	QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI = 80,
 	QCA_NL80211_VENDOR_SUBCMD_NDP = 81,
 
+	/* NS Offload enable/disable cmd */
+	QCA_NL80211_VENDOR_SUBCMD_ND_OFFLOAD = 82,
+
 	QCA_NL80211_VENDOR_SUBCMD_PACKET_FILTER = 83,
 
 	QCA_NL80211_VENDOR_SUBCMD_GET_WAKE_REASON_STATS = 85,
@@ -2080,6 +2083,27 @@
 };
 
 /**
+ * enum qca_wlan_vendor_attr_nd_offload - vendor NS offload support
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_INVALID - Invalid
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG - Flag to set NS offload
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_AFTER_LAST - To keep track of the last enum
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX - max value possible for this type
+ *
+ * enum values are used for NL attributes for data used by
+ * QCA_NL80211_VENDOR_SUBCMD_ND_OFFLOAD sub command.
+ */
+enum qca_wlan_vendor_attr_nd_offload {
+	QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_INVALID = 0,
+	QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG,
+
+	/* Keep last */
+	QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_AFTER_LAST,
+	QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX =
+		QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_AFTER_LAST - 1,
+};
+
+/**
  * enum qca_wlan_vendor_features - vendor device/driver features
  * @QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD: Device supports key
  * management offload, a mechanism where the station's firmware