qcacmn: store vdev_id in tx desc instead of vdev pointer

In tx desc store vdev_id to avoid unprotected access of
vdev memory.

In tx path pass VDEV as argument to all APIs

In completion path get vdev from peer as vdev reference
in peer is protected with reference, in places where peer
is invalid get vdev object using vdev_id stored in tx desc
with a reference count

Change-Id: I364ebb51143218872c0bc6f856772ab1df00bb17
Этот коммит содержится в:
Chaithanya Garrepalli
2020-08-20 00:19:49 +05:30
коммит произвёл snandini
родитель a7bc8640bb
Коммит 926912fe86
5 изменённых файлов: 153 добавлений и 80 удалений

Просмотреть файл

@@ -317,7 +317,7 @@ dp_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
enum netif_action_type act = WLAN_WAKE_ALL_NETIF_QUEUE;
qdf_spin_lock_bh(&pool->flow_pool_lock);
tx_desc->vdev = NULL;
tx_desc->vdev_id = DP_INVALID_VDEV_ID;
tx_desc->nbuf = NULL;
tx_desc->flags = 0;
dp_tx_put_desc_flow_pool(pool, tx_desc);
@@ -477,7 +477,7 @@ dp_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
struct dp_tx_desc_pool_s *pool = &soc->tx_desc[desc_pool_id];
qdf_spin_lock_bh(&pool->flow_pool_lock);
tx_desc->vdev = NULL;
tx_desc->vdev_id = DP_INVALID_VDEV_ID;
tx_desc->nbuf = NULL;
tx_desc->flags = 0;
dp_tx_put_desc_flow_pool(pool, tx_desc);
@@ -658,7 +658,7 @@ dp_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
uint8_t desc_pool_id)
{
struct dp_tx_desc_pool_s *pool = NULL;
tx_desc->vdev = NULL;
tx_desc->vdev_id = DP_INVALID_VDEV_ID;
tx_desc->nbuf = NULL;
tx_desc->flags = 0;