From cdaf9bd6be4083791b17426476bed3eacdee9534 Mon Sep 17 00:00:00 2001 From: jiad Date: Thu, 26 Oct 2017 12:20:21 +0800 Subject: [PATCH] qcacld-3.0: Fix build error in LRO without MSM_PLATFORM When compiling without MSM_PLATFORM, error is seen like 'struct hdd_context has no member named cur_rx_level'. cur_rx_level is defined in struct hdd_context only when MSM_PLATFORM is defined. Fix is to define a new API to send throughput indication within MSM_PLATFORM. Change-Id: Ibbc997f3bda806d0c3f78d3d90cbbc1a20f06015 CRs-Fixed: 2132918 --- core/hdd/inc/wlan_hdd_main.h | 15 +++++++++++++++ core/hdd/src/wlan_hdd_lro.c | 4 +--- core/hdd/src/wlan_hdd_main.c | 7 +++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 37f67f1d64bb..c140b30b7138 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1986,6 +1986,16 @@ void hdd_bus_bandwidth_destroy(struct hdd_context *hdd_ctx); * Return: None. */ void hdd_bus_bw_cancel_work(struct hdd_context *hdd_ctx); + +/** + * hdd_send_wlan_tp_ind() - Send throughput indication + * @hdd_ctx: HDD context + * + * Send throughput indication + * + * Return: None. + */ +void hdd_send_wlan_tp_ind(struct hdd_context *hdd_ctx); #else static inline @@ -2023,6 +2033,11 @@ static inline void hdd_bus_bw_cancel_work(struct hdd_context *hdd_ctx) { } + +static inline +void hdd_send_wlan_tp_ind(struct hdd_context *hdd_ctx) +{ +} #endif int hdd_qdf_trace_enable(QDF_MODULE_ID module_id, uint32_t bitmask); diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c index 916f1929b5d5..3dbaf6f1b048 100644 --- a/core/hdd/src/wlan_hdd_lro.c +++ b/core/hdd/src/wlan_hdd_lro.c @@ -223,9 +223,7 @@ void hdd_disable_lro_in_concurrency(bool disable) if (disable) { if (hdd_ctx->en_tcp_delack_no_lro) { hdd_info("Enable TCP delack as LRO disabled in concurrency"); - wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index, - WLAN_SVC_WLAN_TP_IND, &hdd_ctx->cur_rx_level, - sizeof(hdd_ctx->cur_rx_level)); + hdd_send_wlan_tp_ind(hdd_ctx); hdd_ctx->en_tcp_delack_no_lro = 1; } qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 1); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 257d792a4687..48a2ea35f0c7 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6657,6 +6657,13 @@ void hdd_bus_bw_cancel_work(struct hdd_context *hdd_ctx) if (hdd_ctx) cancel_work_sync(&hdd_ctx->bus_bw_work); } + +void hdd_send_wlan_tp_ind(struct hdd_context *hdd_ctx) +{ + wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index, + WLAN_SVC_WLAN_TP_IND, &hdd_ctx->cur_rx_level, + sizeof(hdd_ctx->cur_rx_level)); +} #endif /**