qcacld-3.0: Enable the scatter-gather feature

Enable the scatter-gather feature for wlan interface, if the wlan
interface is binding to the bridge, which might enable SG & TSO feature
for the bridge and improve the TCP TX throughput much better.

Change-Id: I26101756266878f9f41c5dc2d0b5dad189b44ee1
CRs-Fixed: 2246512
diff --git a/Kbuild b/Kbuild
index 0a42757..72b16ff 100644
--- a/Kbuild
+++ b/Kbuild
@@ -2159,6 +2159,10 @@
 cppflags-y += -DSYNC_IPA_READY
 endif
 
+ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y)
+cppflags-y += -DFEATURE_SG
+endif
+
 #Enable wbuff
 cppflags-$(CONFIG_WLAN_WBUFF) += -DWLAN_FEATURE_WBUFF
 
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 8b2da10..9be47c7 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -2709,6 +2709,28 @@
 }
 #endif /* REMOVE_PKT_LOG */
 
+#ifdef FEATURE_SG
+/**
+ * hdd_set_sg_flags() - enable SG flag in the network device
+ * @hdd_ctx: HDD context
+ * @wlan_dev: network device structure
+ *
+ * This function enables the SG feature flag in the
+ * given network device.
+ *
+ * Return: none
+ */
+static inline void hdd_set_sg_flags(struct hdd_context *hdd_ctx,
+				struct net_device *wlan_dev)
+{
+	hdd_debug("SG Enabled");
+	wlan_dev->features |= NETIF_F_SG;
+}
+#else
+static inline void hdd_set_sg_flags(struct hdd_context *hdd_ctx,
+				struct net_device *wlan_dev){}
+#endif
+
 #ifdef FEATURE_TSO
 /**
  * hdd_set_tso_flags() - enable TSO flags in the network device
@@ -2739,7 +2761,10 @@
 }
 #else
 static inline void hdd_set_tso_flags(struct hdd_context *hdd_ctx,
-	 struct net_device *wlan_dev){}
+	 struct net_device *wlan_dev)
+{
+	hdd_set_sg_flags(hdd_ctx, wlan_dev);
+}
 #endif /* FEATURE_TSO */
 
 void hdd_get_ibss_peer_info_cb(void *pUserData,