From 0a5167bb2166fffabbf997fb9a56ace95413b57c Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Mon, 20 Apr 2020 22:46:08 +0800 Subject: [PATCH] qcacmn: Convert the number of rx chains from target to host The number of rx chains in target is different to the value in host side, this change converts the value from target to host. Change-Id: I86044bf12e958da312924827a3fd1e6799beaf41 CRs-Fixed: 2668403 --- target_if/cfr/src/target_if_cfr_6018.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target_if/cfr/src/target_if_cfr_6018.c b/target_if/cfr/src/target_if_cfr_6018.c index ba5526c30acc..860f7641af38 100644 --- a/target_if/cfr/src/target_if_cfr_6018.c +++ b/target_if/cfr/src/target_if_cfr_6018.c @@ -32,6 +32,7 @@ #include "cdp_txrx_ctrl.h" #define CMN_NOISE_FLOOR (-96) +#define NUM_CHAINS_FW_TO_HOST(n) ((1 << ((n) + 1)) - 1) static u_int32_t end_magic = 0xBEAFDEAD; /** @@ -881,7 +882,7 @@ static bool enh_cfr_dbr_event_handler(struct wlan_objmgr_pdev *pdev, header = &lut->header; meta = &header->u.meta_v3; meta->channel_bw = dma_hdr.upload_pkt_bw; - meta->num_rx_chain = dma_hdr.num_chains; + meta->num_rx_chain = NUM_CHAINS_FW_TO_HOST(dma_hdr.num_chains); meta->length = length; /* For Tx based captures, capture type is sent from FW */ if (capture_type != CFR_TYPE_METHOD_ACK_RESP_TO_TM_FTM) {