qcacmn: Add support to flush rx packets for a vdev

When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.

Flush out the packets in the rx thread queues, before
deleting the vdev.

CRs-Fixed: 2543392
Change-Id: I2490d0f5ce965f62152613a17a59232521ca058f
此提交包含在:
Rakesh Pillai
2019-10-24 06:44:11 +05:30
提交者 nshrivas
父節點 b3518aff5c
當前提交 534a143d8f
共有 7 個檔案被更改,包括 123 行新增1 行删除

查看文件

@@ -2268,8 +2268,24 @@ done:
return rx_bufs_used; /* Assume no scale factor for now */
}
QDF_STATUS dp_rx_vdev_detach(struct dp_vdev *vdev)
{
QDF_STATUS ret;
if (vdev->osif_rx_flush) {
ret = vdev->osif_rx_flush(vdev->osif_vdev, vdev->vdev_id);
if (!ret) {
dp_err("Failed to flush rx pkts for vdev %d\n",
vdev->vdev_id);
return ret;
}
}
return QDF_STATUS_SUCCESS;
}
/**
* dp_rx_detach() - detach dp rx
* dp_rx_pdev_detach() - detach dp rx
* @pdev: core txrx pdev context
*
* This function will detach DP RX into main device context