Sfoglia il codice sorgente

qcacmn: Fix multicast traffic failure in QWRAP repeater

In the case of qwrap repeater, send the original packet on the
interface where it received and send the packet with dummy src
on the mcast primary interface

Change-Id: I08f64559ff2a9430b140c962117d4d71ab684b8d
CRs-Fixed: 3214360
Abishek Ganapathy 3 anni fa
parent
commit
87190fa5f8
4 ha cambiato i file con 26 aggiunte e 3 eliminazioni
  1. 4 0
      dp/inc/cdp_txrx_cmn_struct.h
  2. 14 0
      dp/wifi3.0/be/dp_be_rx.c
  3. 4 0
      dp/wifi3.0/dp_main.c
  4. 4 3
      dp/wifi3.0/dp_types.h

+ 4 - 0
dp/inc/cdp_txrx_cmn_struct.h

@@ -1273,6 +1273,7 @@ enum cdp_pdev_param_type {
  * @cdp_vdev_param_mesh_tid: config tatency tid on vdev
  * @cdp_vdev_param_dscp_tid_map_id: set dscp to tid map id
  * @cdp_vdev_param_mcast_vdev: set mcast vdev params
+ * @cdp_vdev_param_wrap: qwrap ap vap
  *
  * @cdp_pdev_param_dbg_snf: Enable debug sniffer feature
  * @cdp_pdev_param_bpr_enable: Enable bcast probe feature
@@ -1347,6 +1348,7 @@ typedef union cdp_config_param_t {
 	uint8_t cdp_vdev_param_mesh_tid;
 	uint8_t cdp_vdev_param_dscp_tid_map_id;
 	bool cdp_vdev_param_mcast_vdev;
+	bool cdp_vdev_param_wrap;
 
 	/* pdev params */
 	bool cdp_pdev_param_cptr_latcy;
@@ -1472,6 +1474,7 @@ enum cdp_pdev_bpr_param {
  * @CDP_SET_VAP_MESH_TID : Set latency tid in vap
  * @CDP_UPDATE_DSCP_TO_TID_MAP: Set DSCP to TID map id
  * @CDP_SET_MCAST_VDEV : Set primary mcast vdev
+ * @CDP_ENABLE_WRAP: qwrap ap
  */
 enum cdp_vdev_param_type {
 	CDP_ENABLE_NAWDS,
@@ -1512,6 +1515,7 @@ enum cdp_vdev_param_type {
 	CDP_UPDATE_DSCP_TO_TID_MAP,
 	CDP_SET_MCAST_VDEV,
 	CDP_DROP_3ADDR_MCAST,
+	CDP_ENABLE_WRAP,
 };
 
 /*

+ 14 - 0
dp/wifi3.0/be/dp_be_rx.c

@@ -1167,6 +1167,20 @@ bool dp_rx_mlo_igmp_handler(struct dp_soc *soc,
 		dp_rx_debug("Non mlo vdev");
 		goto send_pkt;
 	}
+
+	if (qdf_unlikely(vdev->wrap_vdev)) {
+		/* In the case of qwrap repeater send the original
+		 * packet on the interface where it received,
+		 * packet with dummy src on the mcast primary interface.
+		 */
+		qdf_nbuf_t nbuf_copy;
+
+		nbuf_copy = qdf_nbuf_copy(nbuf);
+		if (qdf_likely(nbuf_copy))
+			dp_rx_deliver_to_stack(soc, vdev, peer, nbuf_copy,
+					       NULL);
+	}
+
 	dp_rx_dummy_src_mac(vdev, nbuf);
 	dp_rx_deliver_to_stack(mcast_primary_vdev->pdev->soc,
 			       mcast_primary_vdev,

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

@@ -6546,6 +6546,7 @@ static QDF_STATUS dp_vdev_attach_wifi3(struct cdp_soc_t *cdp_soc,
 	vdev->drop_unenc = 1;
 	vdev->sec_type = cdp_sec_type_none;
 	vdev->multipass_en = false;
+	vdev->wrap_vdev = false;
 	dp_vdev_init_rx_eapol(vdev);
 	qdf_atomic_init(&vdev->ref_cnt);
 	for (i = 0; i < DP_MOD_ID_MAX; i++)
@@ -10316,6 +10317,9 @@ dp_set_vdev_param(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
 			val.cdp_drop_3addr_mcast);
 		vdev->drop_3addr_mcast = val.cdp_drop_3addr_mcast;
 		break;
+	case CDP_ENABLE_WRAP:
+		vdev->wrap_vdev = val.cdp_vdev_param_wrap;
+		break;
 	default:
 		break;
 	}

+ 4 - 3
dp/wifi3.0/dp_types.h

@@ -3128,9 +3128,10 @@ struct dp_vdev {
 	struct cdp_vdev_stats stats;
 
 	/* Is this a proxySTA VAP */
-	bool proxysta_vdev;
-	/* Is isolation mode enabled */
-	bool isolation_vdev;
+	uint8_t proxysta_vdev : 1, /* Is this a proxySTA VAP */
+		wrap_vdev : 1, /* Is this a QWRAP AP VAP */
+		isolation_vdev : 1, /* Is this a QWRAP AP VAP */
+		reserved : 5; /* Reserved */
 
 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
 	struct dp_tx_desc_pool_s *pool;