Kaynağa Gözat

qcacmn: Use correct offset for rx ring id

MAC id is needed to retrieve the ring id during srng
setup.

Change-Id: I42bb8db997df1e3540ba61cdc770e4e7810d10c4
Manoj Ekbote 8 yıl önce
ebeveyn
işleme
46c03169ba
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5 2
      dp/wifi3.0/dp_htt.c

+ 5 - 2
dp/wifi3.0/dp_htt.c

@@ -259,12 +259,15 @@ int htt_srng_setup(void *htt_soc, int mac_id, void *hal_srng,
 
 	switch (hal_ring_type) {
 	case RXDMA_BUF:
-		if (srng_params.ring_id ==
-			 HAL_SRNG_WMAC1_SW2RXDMA0_BUF) {
 #ifdef QCA_HOST2FW_RXBUF_RING
+		if (srng_params.ring_id ==
+		    (HAL_SRNG_WMAC1_SW2RXDMA0_BUF)) {
 			htt_ring_id = HTT_HOST1_TO_FW_RXBUF_RING;
 			htt_ring_type = HTT_SW_TO_SW_RING;
 #else
+		if (srng_params.ring_id ==
+			(HAL_SRNG_WMAC1_SW2RXDMA0_BUF +
+			  (mac_id * HAL_MAX_RINGS_PER_LMAC))) {
 			htt_ring_id = HTT_RXDMA_HOST_BUF_RING;
 			htt_ring_type = HTT_SW_TO_HW_RING;
 #endif