Browse Source

qcacmn: Avoid intrabss check in Tx NAWDS path

Intrabss check for NAWDS was added as a temporary fix to resolve the
issue of selfbridge enteries present in AST table. The actual reason
is loopback pkt received with one's own bridge mac. To avoid this, add
a check for not sending out any packet with an invalid peer id in the
ast table.

Change-Id: Ia4c520bcc8b7077f0b484a0bc40c4d26db77c3f4
CRs-Fixed: 3135142
Neha Bisht 3 years ago
parent
commit
229317b922
2 changed files with 7 additions and 7 deletions
  1. 0 3
      dp/wifi3.0/dp_rx.c
  2. 7 4
      dp/wifi3.0/dp_tx.c

+ 0 - 3
dp/wifi3.0/dp_rx.c

@@ -870,9 +870,6 @@ bool dp_rx_intrabss_mcbc_fwd(struct dp_soc *soc, struct dp_txrx_peer *ta_peer,
 
 	len = QDF_NBUF_CB_RX_PKT_LEN(nbuf);
 
-	qdf_nbuf_set_tx_fctx_type(nbuf_copy, &ta_peer->peer_id,
-				  CB_FTYPE_INTRABSS_FWD);
-
 	dp_classify_critical_pkts(soc, ta_peer->vdev, nbuf_copy);
 
 	if (soc->arch_ops.dp_rx_intrabss_handle_nawds(soc, ta_peer, nbuf_copy,

+ 7 - 4
dp/wifi3.0/dp_tx.c

@@ -2855,6 +2855,12 @@ void dp_tx_nawds_handler(struct dp_soc *soc, struct dp_vdev *vdev,
 	uint16_t peer_id = DP_INVALID_PEER;
 	struct dp_txrx_peer *txrx_peer;
 
+	/* This check avoids pkt forwarding which is entered
+	 * in the ast table but still doesn't have valid peerid.
+	 */
+	if (sa_peer_id == HTT_INVALID_PEER)
+		return;
+
 	qdf_spin_lock_bh(&vdev->peer_list_lock);
 	TAILQ_FOREACH(peer, &vdev->peer_list, peer_list_elem) {
 		txrx_peer = dp_get_txrx_peer(peer);
@@ -3352,9 +3358,7 @@ qdf_nbuf_t dp_tx_send(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
 		if (DP_FRAME_IS_MULTICAST((eh)->ether_dhost)) {
 			uint16_t sa_peer_id = DP_INVALID_PEER;
 
-			if (!soc->ast_offload_support &&
-			    qdf_nbuf_get_tx_ftype(nbuf) ==
-							CB_FTYPE_INTRABSS_FWD) {
+			if (!soc->ast_offload_support) {
 				struct dp_ast_entry *ast_entry = NULL;
 
 				qdf_spin_lock_bh(&soc->ast_lock);
@@ -3370,7 +3374,6 @@ qdf_nbuf_t dp_tx_send(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
 			dp_tx_nawds_handler(soc, vdev, &msdu_info, nbuf,
 					    sa_peer_id);
 		}
-
 		peer_id = DP_INVALID_PEER;
 		DP_STATS_INC_PKT(vdev, tx_i.nawds_mcast,
 				 1, qdf_nbuf_len(nbuf));