Browse Source

qcacmn: Fix invalid sa_da_idx condition in RX path

Currenly this function, is_sa_da_idx_valid(), called from dp_rx_process
does not take MC/BC packets into account. For broadcast packets e.g.
DHCP offer packets from some APs, this check may fail (incorrectly).
Thus dropping the broadcast packet, when it should have been passed
on to the stack.

Fix is_sa_da_idx_valid function by taking MC/BC packets into account.

Change-Id: Ibbb34134e997e0d5394dfa654be84b9fa43434a3
CRs-Fixed: 2466839
Mohit Khanna 5 years ago
parent
commit
3ba9372a50
2 changed files with 5 additions and 3 deletions
  1. 3 3
      dp/wifi3.0/dp_rx.c
  2. 2 0
      dp/wifi3.0/dp_stats.c

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

@@ -1440,9 +1440,9 @@ static inline bool is_sa_da_idx_valid(struct dp_soc *soc,
 	if ((qdf_nbuf_is_sa_valid(nbuf) &&
 	     (hal_rx_msdu_end_sa_idx_get(rx_tlv_hdr) >
 		wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx))) ||
-	    (qdf_nbuf_is_da_valid(nbuf) &&
-	     (hal_rx_msdu_end_da_idx_get(soc->hal_soc,
-					 rx_tlv_hdr) >
+	    (!qdf_nbuf_is_da_mcbc(nbuf) &&
+	     qdf_nbuf_is_da_valid(nbuf) &&
+	     (hal_rx_msdu_end_da_idx_get(soc->hal_soc, rx_tlv_hdr) >
 	      wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx))))
 		return false;
 

+ 2 - 0
dp/wifi3.0/dp_stats.c

@@ -5094,6 +5094,8 @@ void dp_txrx_path_stats(struct dp_soc *soc)
 			       pdev->soc->stats.rx.err.rx_invalid_peer_id.num);
 		DP_PRINT_STATS("packet_len invalid %u",
 			       pdev->soc->stats.rx.err.rx_invalid_pkt_len.num);
+		DP_PRINT_STATS("sa or da idx invalid %u",
+			       pdev->soc->stats.rx.err.invalid_sa_da_idx);
 
 		DP_PRINT_STATS("Reo Statistics");
 		DP_PRINT_STATS("rbm error: %u msdus",