summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTiger Yu <tfyu@codeaurora.org>2018-11-01 18:03:09 +0800
committernshrivas <nshrivas@codeaurora.org>2018-11-05 17:20:32 -0800
commita633e2d4bda3c77441fc520135c92e8a8fc06cfb (patch)
treeaaa07cdacad1a5cf0604c35e2f1361173ae5877f /core
parent1d12e0e6bf66cfd8b992570c53c65c1a90b4c422 (diff)
qcacld-3.0: Enable the SG feature only when FEATURE_SG is set
The HL solution doesn't support the scatter-gather feature. Only enable the scatter-gather feature when FEATURE_SG is set. Change-Id: I2c290f1e69fed7c9b7cd1cf1a24139ea46ebc073 CRs-Fixed: 2341654
Diffstat (limited to 'core')
-rw-r--r--core/hdd/inc/wlan_hdd_main.h25
1 files changed, 23 insertions, 2 deletions
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 */