From 2fd4037fba4d0eb8f37e3ac56ee7836642c67b00 Mon Sep 17 00:00:00 2001
From: "dong.zhanyi" <dong.zhanyi@zte.com.cn>
Date: Sat, 11 Jul 2020 06:38:15 +0800
Subject: [PATCH] fixed the bug that index could not support muti antennas

---
 targets/ARCH/rfsimulator/simulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/ARCH/rfsimulator/simulator.c b/targets/ARCH/rfsimulator/simulator.c
index 7a7e1a31f8..e85008e869 100644
--- a/targets/ARCH/rfsimulator/simulator.c
+++ b/targets/ARCH/rfsimulator/simulator.c
@@ -438,7 +438,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
         b->lastReceivedTS=b->th.timestamp;
         AssertFatal(b->lastWroteTS == 0 || ( abs((double)b->lastWroteTS-b->lastReceivedTS) < (double)CirSize),
                     "Tx/Rx shift too large Tx:%lu, Rx:%lu\n", b->lastWroteTS, b->lastReceivedTS);
-        b->transferPtr=(char *)&b->circularBuf[b->lastReceivedTS%CirSize];
+        b->transferPtr=(char *)&b->circularBuf[(b->lastReceivedTS*b->th.nbAnt)%CirSize];
         b->remainToTransfer=sampleToByte(b->th.size, b->th.nbAnt);
       }
 
-- 
2.26.2