Browse Source

qcacmn: Changes required to enable monitor mode for Rhine architecture

Changes required to enable monitor for Rhine architecture.

Change-Id: Ib2558c9e61a3e55a68c0f612aed7a153feeb3f17
CRs-Fixed: 3631592
Venkateswara Naralasetty 1 year ago
parent
commit
55527a7c79
3 changed files with 20 additions and 2 deletions
  1. 6 0
      dp/wifi3.0/dp_rings.h
  2. 9 1
      dp/wifi3.0/monitor/1.0/dp_rx_mon_1.0.h
  3. 5 1
      dp/wifi3.0/rh/dp_rh.c

+ 6 - 0
dp/wifi3.0/dp_rings.h

@@ -730,6 +730,12 @@ static inline void
 dp_htt_setup_rxdma_err_dst_ring(struct dp_soc *soc, int mac_id,
 				int lmac_id)
 {
+	if ((soc->cdp_soc.ol_ops->get_con_mode &&
+	     soc->cdp_soc.ol_ops->get_con_mode() == QDF_GLOBAL_MONITOR_MODE) &&
+	    soc->rxdma_err_dst_ring[lmac_id].hal_srng)
+		htt_srng_setup(soc->htt_handle, mac_id,
+			       soc->rxdma_err_dst_ring[lmac_id].hal_srng,
+			       RXDMA_DST);
 }
 #endif
 

+ 9 - 1
dp/wifi3.0/monitor/1.0/dp_rx_mon_1.0.h

@@ -904,6 +904,7 @@ uint8_t *dp_rx_mon_get_buffer_data(struct dp_rx_desc *rx_desc)
 
 #endif
 
+#ifndef WLAN_SOFTUMAC_SUPPORT
 /**
  * dp_rx_cookie_2_mon_link_desc() - Retrieve Link descriptor based on target
  * @pdev: core physical device context
@@ -924,7 +925,6 @@ void *dp_rx_cookie_2_mon_link_desc(struct dp_pdev *pdev,
 	return dp_rx_cookie_2_link_desc_va(pdev->soc, buf_info);
 }
 
-#ifndef WLAN_SOFTUMAC_SUPPORT
 /**
  * dp_rx_monitor_link_desc_return() - Return Link descriptor based on target
  * @pdev: core physical device context
@@ -948,6 +948,14 @@ QDF_STATUS dp_rx_monitor_link_desc_return(struct dp_pdev *pdev,
 				      bm_action);
 }
 #else
+static inline
+void *dp_rx_cookie_2_mon_link_desc(struct dp_pdev *pdev,
+				   struct hal_buf_info *buf_info,
+				   uint8_t mac_id)
+{
+	return dp_rx_cookie_2_mon_link_desc_va(pdev, buf_info, mac_id);
+}
+
 static inline
 QDF_STATUS dp_rx_monitor_link_desc_return(struct dp_pdev *pdev,
 					  hal_buff_addrinfo_t

+ 5 - 1
dp/wifi3.0/rh/dp_rh.c

@@ -384,8 +384,12 @@ static void *dp_soc_init_rh(struct dp_soc *soc, HTC_HANDLE htc_handle,
 	dp_soc_set_interrupt_mode(soc);
 	if (soc->cdp_soc.ol_ops->get_con_mode &&
 	    soc->cdp_soc.ol_ops->get_con_mode() ==
-	    QDF_GLOBAL_MONITOR_MODE)
+	    QDF_GLOBAL_MONITOR_MODE) {
 		is_monitor_mode = true;
+		soc->curr_rx_pkt_tlv_size = soc->rx_mon_pkt_tlv_size;
+	} else {
+		soc->curr_rx_pkt_tlv_size = soc->rx_pkt_tlv_size;
+	}
 
 	if (is_monitor_mode)
 		wlan_cfg_fill_interrupt_mask(soc->wlan_cfg_ctx, 0,