Procházet zdrojové kódy

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
Wu Gao před 5 roky
rodič
revize
0a5167bb21
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      target_if/cfr/src/target_if_cfr_6018.c

+ 2 - 1
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) {