qcacld-3.0: Featurize DHCP indication for SAP

Featurize DHCP indication for SAP and disable it
for QCN7605 as this feature is broken for HL
Data Path.

Change-Id: If1db649131d887a2aab18461187403b4b9a2c5b4
CRs-Fixed: 2496032
diff --git a/Kbuild b/Kbuild
index 9e8e691..6668309 100644
--- a/Kbuild
+++ b/Kbuild
@@ -2668,6 +2668,7 @@
 
 cppflags-$(CONFIG_WLAN_FEATURE_DP_EVENT_HISTORY) += -DWLAN_FEATURE_DP_EVENT_HISTORY
 cppflags-$(CONFIG_WLAN_DP_PER_RING_TYPE_CONFIG) += -DWLAN_DP_PER_RING_TYPE_CONFIG
+cppflags-$(CONFIG_SAP_DHCP_FW_IND) += -DSAP_DHCP_FW_IND
 
 ifdef CONFIG_MAX_LOGS_PER_SEC
 ccflags-y += -DWLAN_MAX_LOGS_PER_SEC=$(CONFIG_MAX_LOGS_PER_SEC)
diff --git a/configs/default_defconfig b/configs/default_defconfig
index fd84108..8b6c920 100644
--- a/configs/default_defconfig
+++ b/configs/default_defconfig
@@ -858,3 +858,5 @@
 ifeq (y,$(findstring y,$(CONFIG_ARCH_MSM) $(CONFIG_ARCH_QCOM)))
 CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH := y
 endif
+
+CONFIG_SAP_DHCP_FW_IND := y
diff --git a/configs/genoa.common b/configs/genoa.common
index e25b4d5..b953e18 100644
--- a/configs/genoa.common
+++ b/configs/genoa.common
@@ -216,4 +216,5 @@
 CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH := y
 endif
 
+CONFIG_SAP_DHCP_FW_IND := n
 ###################################
diff --git a/configs/qca6174_defconfig b/configs/qca6174_defconfig
index 49c01e6..1813db1 100644
--- a/configs/qca6174_defconfig
+++ b/configs/qca6174_defconfig
@@ -707,3 +707,5 @@
 ifeq (y,$(findstring y,$(CONFIG_ARCH_MSM) $(CONFIG_ARCH_QCOM)))
 CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH := y
 endif
+
+CONFIG_SAP_DHCP_FW_IND := y
diff --git a/configs/qca6390_defconfig b/configs/qca6390_defconfig
index 7835fd4..6e3db76 100644
--- a/configs/qca6390_defconfig
+++ b/configs/qca6390_defconfig
@@ -725,3 +725,4 @@
 endif
 
 CONFIG_FOURTH_CONNECTION := y
+CONFIG_SAP_DHCP_FW_IND := y
diff --git a/configs/qcs40x.snoc.perf_defconfig b/configs/qcs40x.snoc.perf_defconfig
index 811a781..ed700ba 100644
--- a/configs/qcs40x.snoc.perf_defconfig
+++ b/configs/qcs40x.snoc.perf_defconfig
@@ -180,5 +180,5 @@
 CONFIG_CFG_NUM_TX_RX_HISTOGRAM := 16
 # CONFIG_CFG_NUM_RX_IND_RECORD := 1024
 
-
+CONFIG_SAP_DHCP_FW_IND := y
 ###################################
diff --git a/core/hdd/inc/wlan_hdd_softap_tx_rx.h b/core/hdd/inc/wlan_hdd_softap_tx_rx.h
index b4914be..190c7ac 100644
--- a/core/hdd/inc/wlan_hdd_softap_tx_rx.h
+++ b/core/hdd/inc/wlan_hdd_softap_tx_rx.h
@@ -229,6 +229,7 @@
 }
 #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
 
+#ifdef SAP_DHCP_FW_IND
 /**
  * hdd_post_dhcp_ind() - Send DHCP START/STOP indication to FW
  * @adapter: pointer to hdd adapter
@@ -253,5 +254,23 @@
 			    uint8_t sta_id,
 			    struct sk_buff *skb,
 			    enum qdf_proto_dir dir);
+#else
+static inline
+int hdd_post_dhcp_ind(struct hdd_adapter *adapter,
+		      uint8_t sta_id, uint16_t type)
+{
+	return 0;
+}
+
+static inline
+int hdd_inspect_dhcp_packet(struct hdd_adapter *adapter,
+			    uint8_t sta_id,
+			    struct sk_buff *skb,
+			    enum qdf_proto_dir dir)
+{
+	return 0;
+}
+
+#endif
 
 #endif /* end #if !defined(WLAN_HDD_SOFTAP_TX_RX_H) */
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 2502c15..192ab03 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -236,6 +236,7 @@
 }
 #endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
 
+#ifdef SAP_DHCP_FW_IND
 /**
  * hdd_post_dhcp_ind() - Send DHCP START/STOP indication to FW
  * @adapter: pointer to hdd adapter
@@ -425,6 +426,11 @@
 
 	return errno;
 }
+#else
+static void hdd_softap_notify_dhcp_ind(void *context, struct sk_buff *netbuf)
+{
+}
+#endif
 
 /**
  * __hdd_softap_hard_start_xmit() - Transmit a frame