瀏覽代碼

qcacmn: Add multicast address in tx_capture header

In existing code peer's mac address is populated in tx_capture
receiver address field. In case of multicast and broadcast packets
the packets is transmitted on BSS peer so in case of broadcast/multicast
packets the transmitter address is same as receiver address in tx_capture
header.

Add change to populate receiver address field with ethernet destination
address in case of bss peer is tranmit status.

Change-Id: Ie9495d51391454313b1697ecedb8e8dec0459565
CRs-Fixed: 2261473
Soumya Bhat 6 年之前
父節點
當前提交
14b6f26e71
共有 2 個文件被更改,包括 12 次插入5 次删除
  1. 1 2
      dp/wifi3.0/dp_main.c
  2. 11 3
      dp/wifi3.0/dp_tx.c

+ 1 - 2
dp/wifi3.0/dp_main.c

@@ -6321,8 +6321,7 @@ dp_config_debug_sniffer(struct cdp_pdev *pdev_handle, int val)
 	case 2:
 		pdev->mcopy_mode = 1;
 		pdev->tx_sniffer_enable = 0;
-		if (!pdev->enhanced_stats_en)
-			dp_ppdu_ring_cfg(pdev);
+		dp_ppdu_ring_cfg(pdev);
 
 		if (!pdev->pktlog_ppdu_stats)
 			dp_h2t_cfg_stats_msg_send(pdev,

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

@@ -2319,6 +2319,7 @@ dp_get_completion_indication_for_stack(struct dp_soc *soc,  struct dp_pdev *pdev
 {
 	struct tx_capture_hdr *ppdu_hdr;
 	struct dp_peer *peer = NULL;
+	struct ether_header *eh;
 
 	if (qdf_unlikely(!pdev->tx_sniffer_enable && !pdev->mcopy_mode))
 		return QDF_STATUS_E_NOSUPPORT;
@@ -2342,6 +2343,8 @@ dp_get_completion_indication_for_stack(struct dp_soc *soc,  struct dp_pdev *pdev
 		pdev->m_copy_id.tx_peer_id = peer_id;
 	}
 
+	eh = (struct ether_header *)qdf_nbuf_data(netbuf);
+
 	if (!qdf_nbuf_push_head(netbuf, sizeof(struct tx_capture_hdr))) {
 		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
 				FL("No headroom"));
@@ -2350,10 +2353,15 @@ dp_get_completion_indication_for_stack(struct dp_soc *soc,  struct dp_pdev *pdev
 
 	ppdu_hdr = (struct tx_capture_hdr *)qdf_nbuf_data(netbuf);
 	qdf_mem_copy(ppdu_hdr->ta, peer->vdev->mac_addr.raw,
-					IEEE80211_ADDR_LEN);
+		     IEEE80211_ADDR_LEN);
+	if (peer->bss_peer) {
+		qdf_mem_copy(ppdu_hdr->ra, eh->ether_dhost, IEEE80211_ADDR_LEN);
+	} else {
+		qdf_mem_copy(ppdu_hdr->ra, peer->mac_addr.raw,
+			     IEEE80211_ADDR_LEN);
+	}
+
 	ppdu_hdr->ppdu_id = ppdu_id;
-	qdf_mem_copy(ppdu_hdr->ra, peer->mac_addr.raw,
-			IEEE80211_ADDR_LEN);
 	ppdu_hdr->peer_id = peer_id;
 	ppdu_hdr->first_msdu = first_msdu;
 	ppdu_hdr->last_msdu = last_msdu;