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
This commit is contained in:
Rakesh Pillai
2019-10-24 06:44:11 +05:30
committed by nshrivas
부모 b3518aff5c
커밋 534a143d8f
7개의 변경된 파일123개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@@ -757,6 +757,9 @@ qdf_nbuf_set_send_complete_flag(qdf_nbuf_t buf, bool flag)
__qdf_nbuf_set_send_complete_flag(buf, flag);
}
#define QDF_NBUF_QUEUE_WALK_SAFE(queue, var, tvar) \
__qdf_nbuf_queue_walk_safe(queue, var, tvar)
#ifdef NBUF_MAP_UNMAP_DEBUG
/**
* qdf_nbuf_map_check_for_leaks() - check for nbut map leaks
@@ -964,6 +967,28 @@ void qdf_nbuf_queue_head_purge(qdf_nbuf_queue_head_t *nbuf_queue_head)
return __qdf_nbuf_queue_head_purge(nbuf_queue_head);
}
/**
* qdf_nbuf_queue_head_lock() - Acquire the nbuf_queue_head lock
* @head: nbuf_queue_head of the nbuf_list for which lock is to be acquired
*
* Return: void
*/
static inline void qdf_nbuf_queue_head_lock(qdf_nbuf_queue_head_t *head)
{
__qdf_nbuf_queue_head_lock(head);
}
/**
* qdf_nbuf_queue_head_unlock() - Release the nbuf queue lock
* @head: nbuf_queue_head of the nbuf_list for which lock is to be release
*
* Return: void
*/
static inline void qdf_nbuf_queue_head_unlock(qdf_nbuf_queue_head_t *head)
{
__qdf_nbuf_queue_head_unlock(head);
}
static inline void
qdf_nbuf_sync_for_cpu(qdf_device_t osdev, qdf_nbuf_t buf, qdf_dma_dir_t dir)
{
@@ -1866,6 +1891,22 @@ static inline void qdf_nbuf_set_tail_pointer(qdf_nbuf_t buf, int len)
__qdf_nbuf_set_tail_pointer(buf, len);
}
/**
* qdf_nbuf_unlink_no_lock() - unlink a nbuf from nbuf list
* @buf: Network buf instance
* @list: list to use
*
* This is a lockless version, driver must acquire locks if it
* needs to synchronize
*
* Return: none
*/
static inline void
qdf_nbuf_unlink_no_lock(qdf_nbuf_t buf, qdf_nbuf_queue_head_t *list)
{
__qdf_nbuf_unlink_no_lock(buf, list);
}
/**
* qdf_nbuf_reset() - reset the buffer data and pointer
* @buf: Network buf instance