summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kbuild8
-rw-r--r--core/hdd/inc/wlan_hdd_main.h25
2 files changed, 31 insertions, 2 deletions
diff --git a/Kbuild b/Kbuild
index ffb8af064a27..90486f343a9b 100644
--- a/Kbuild
+++ b/Kbuild
@@ -75,6 +75,10 @@ ifeq ($(KERNEL_BUILD), 0)
CONFIG_WLAN_DISABLE_EXPORT_SYMBOL := y
endif
+ ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y)
+ CONFIG_FEATURE_SG := y
+ endif
+
ifeq ($(CONFIG_ARCH_MSM8917), y)
ifeq ($(CONFIG_ROME_IF), sdio)
CONFIG_WLAN_SYNC_TSF_PLUS := y
@@ -1851,6 +1855,10 @@ ifeq ($(CONFIG_WLAN_DISABLE_EXPORT_SYMBOL), y)
CDEFINES += -DWLAN_DISABLE_EXPORT_SYMBOL
endif
+ifeq ($(CONFIG_FEATURE_SG), y)
+CDEFINES += -DFEATURE_SG
+endif
+
ifeq ($(CONFIG_MPC_UT_FRAMEWORK), y)
CDEFINES += -DMPC_UT_FRAMEWORK
endif
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 3a180b10a815..9b76ac429ecf 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -2713,6 +2713,28 @@ static inline int hdd_process_pktlog_command(hdd_context_t *hdd_ctx,
}
#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(hdd_context_t *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(hdd_context_t *hdd_ctx,
+ struct net_device *wlan_dev){}
+#endif
+
#ifdef FEATURE_TSO
/**
* hdd_set_tso_flags() - enable TSO flags in the network device
@@ -2743,8 +2765,7 @@ static inline void hdd_set_tso_flags(hdd_context_t *hdd_ctx,
static inline void hdd_set_tso_flags(hdd_context_t *hdd_ctx,
struct net_device *wlan_dev)
{
- hdd_debug("SG Enabled");
- wlan_dev->features |= NETIF_F_SG;
+ hdd_set_sg_flags(hdd_ctx, wlan_dev);
}
#endif /* FEATURE_TSO */