qcacmn: use correct rx pool id for refill buffer

When handling RXDMA error marked frames that from MAC1,
wrong rx descriptor pool is referenced, so allocated
buffer length is incorrect and lead to skb crash. Make
changes to always uses mac0 rx descriptor pool for MCL
platform.

Change-Id: Ica01c3967d6248a23ea745da63149dae9cd56677
CRs-Fixed: 2945573
This commit is contained in:
Yu Tian 2021-05-26 13:32:37 +08:00 • committed by Madan Koyyalamudi
commit 21ca55caf9

View file

@ -2623,11 +2623,13 @@ dp_rxdma_err_process(struct dp_intr *int_ctx, struct dp_soc *soc,
dp_srng_access_end(int_ctx, soc, err_dst_srng);
if (rx_bufs_used) {
if (wlan_cfg_per_pdev_lmac_ring(soc->wlan_cfg_ctx))
if (wlan_cfg_per_pdev_lmac_ring(soc->wlan_cfg_ctx)) {
dp_rxdma_srng = &soc->rx_refill_buf_ring[mac_id];
else
rx_desc_pool = &soc->rx_desc_buf[mac_id];
} else {
dp_rxdma_srng = &soc->rx_refill_buf_ring[pdev->lmac_id];
rx_desc_pool = &soc->rx_desc_buf[mac_id];
rx_desc_pool = &soc->rx_desc_buf[pdev->lmac_id];
}
dp_rx_buffers_replenish(soc, mac_id, dp_rxdma_srng,
rx_desc_pool, rx_bufs_used, &head, &tail);