Просмотр исходного кода

qcacmn: Enable RXDMA ring configuration for monitor mode

Enable RXDMA status, desc, buffer and destination rings to
support monitor mode. The change also provides fix to properly
map pdev_id to mac_id.

CRs-Fixed: 2071602
Change-Id: Ie9caaaa0021d5842eaf28a5532b3ab5512fe507f
Ravi Joshi 7 лет назад
Родитель
Сommit
8851f4eb1c
2 измененных файлов с 28 добавлено и 3 удалено
  1. 11 3
      dp/wifi3.0/dp_htt.c
  2. 17 0
      dp/wifi3.0/dp_main.c

+ 11 - 3
dp/wifi3.0/dp_htt.c

@@ -346,7 +346,7 @@ int htt_srng_setup(void *htt_soc, int mac_id, void *hal_srng,
 	HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_SRING_SETUP);
 
 	if ((htt_ring_type == HTT_SW_TO_HW_RING) ||
-		(htt_ring_type == HTT_HW_TO_SW_RING))
+			(htt_ring_type == HTT_HW_TO_SW_RING))
 		HTT_SRING_SETUP_PDEV_ID_SET(*msg_word,
 			 DP_SW2HW_MACID(mac_id));
 	else
@@ -572,8 +572,16 @@ int htt_h2t_rx_ring_cfg(void *htt_soc, int pdev_id, void *hal_srng,
 	/* word 0 */
 	*msg_word = 0;
 	HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG);
-	HTT_RX_RING_SELECTION_CFG_PDEV_ID_SET(*msg_word,
-		DP_SW2HW_MACID(pdev_id));
+
+	/*
+	 * pdev_id is indexed from 0 whereas mac_id is indexed from 1
+	 * SW_TO_SW and SW_TO_HW rings are unaffected by this
+	 */
+	if (htt_ring_type == HTT_SW_TO_SW_RING ||
+			htt_ring_type == HTT_SW_TO_HW_RING)
+		HTT_RX_RING_SELECTION_CFG_PDEV_ID_SET(*msg_word,
+						DP_SW2HW_MACID(pdev_id));
+
 	/* TODO: Discuss with FW on changing this to unique ID and using
 	 * htt_ring_type to send the type of ring
 	 */

+ 17 - 0
dp/wifi3.0/dp_main.c

@@ -1616,6 +1616,23 @@ static void dp_rxdma_ring_config(struct dp_soc *soc)
 					 RXDMA_BUF);
 				mac_id++;
 			}
+
+			/* Configure monitor mode rings */
+			htt_srng_setup(soc->htt_handle, i,
+					pdev->rxdma_mon_buf_ring.hal_srng,
+					RXDMA_MONITOR_BUF);
+
+			htt_srng_setup(soc->htt_handle, i,
+					pdev->rxdma_mon_dst_ring.hal_srng,
+					RXDMA_MONITOR_DST);
+
+			htt_srng_setup(soc->htt_handle, i,
+				pdev->rxdma_mon_status_ring.hal_srng,
+				RXDMA_MONITOR_STATUS);
+
+			htt_srng_setup(soc->htt_handle, i,
+				pdev->rxdma_mon_desc_ring.hal_srng,
+				RXDMA_MONITOR_DESC);
 		}
 	}
 }