From 2b2adde18f6c2294e1f040bba102753b1072187e Mon Sep 17 00:00:00 2001 From: Hangtian Zhu Date: Thu, 12 Sep 2019 10:47:42 +0800 Subject: [PATCH] qcacld-3.0: Add macro protection for throughput level checking in rx cbk Add macro protection for throughput level checking in rx callback. Change-Id: I43c4a0cabb770b6ef9538b90e07fd218b40f743b CRs-Fixed: 2522061 --- core/hdd/inc/wlan_hdd_tx_rx.h | 7 +++++++ core/hdd/src/wlan_hdd_tx_rx.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index 48c2f76b53ca..46885c370a0e 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -331,7 +331,14 @@ void wlan_hdd_classify_pkt(struct sk_buff *skb); #ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx); +#ifdef RX_PERFORMANCE bool hdd_is_current_high_throughput(struct hdd_context *hdd_ctx); +#else +static inline bool hdd_is_current_high_throughput(struct hdd_context *hdd_ctx) +{ + return false; +} +#endif #define HDD_MSM_CFG(msm_cfg) msm_cfg #else static inline void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx) {} diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 53ae683c0367..757b36022151 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -2859,6 +2859,7 @@ void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx) * * Return: True if vote level is high */ +#ifdef RX_PERFORMANCE bool hdd_is_current_high_throughput(struct hdd_context *hdd_ctx) { if (hdd_ctx->cur_vote_level < PLD_BUS_WIDTH_MEDIUM) @@ -2867,6 +2868,7 @@ bool hdd_is_current_high_throughput(struct hdd_context *hdd_ctx) return true; } #endif +#endif #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL /**