From 746c5c67d664e5f6afc658b229b1e954bd0b938f Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Thu, 27 Jun 2019 16:42:46 +0530 Subject: [PATCH] qcacmn: Initialize peer bufq and info_lock on reuse Currently in case when a peer handle is reused, the info_lock and bufq resources are not getting initialized. Hence when this peer handle is deleted upon the subsequent peer delete, the info_lock and bufq resources are freed without being initialized. Initialize the peer info_lock and bufq resources when the peer handle is being reused. CRs-Fixed: 2476985 Change-Id: Ib442b02e05b8934a6f7c614e1fc643598637fea5 --- dp/wifi3.0/dp_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 80176a6b2534..7d246f500bf1 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -5093,6 +5093,10 @@ static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle, peer->ctrl_peer = ctrl_peer; dp_local_peer_id_alloc(pdev, peer); + + qdf_spinlock_create(&peer->peer_info_lock); + dp_peer_rx_bufq_resources_init(peer); + DP_STATS_INIT(peer); DP_STATS_UPD(peer, rx.avg_rssi, INVALID_RSSI);