qcacld-3.0: Initialize peer_unmap_timer during peer attach
Initialize peer_unmap_timer during peer attach instead of at the time of peer detach. Then ol_txrx_unref_delete can destroy the timer without peer detach getting called earlier. CRs-Fixed: 2014183 Change-Id: Icebec27d5562350871a89b5cf71ae99f096feee8
This commit is contained in:

committed by
snandini

parent
e1c2e21a3d
commit
fe55836608
@@ -2459,6 +2459,8 @@ ol_txrx_peer_attach(struct cdp_vdev *pvdev, uint8_t *peer_mac_addr)
|
||||
qdf_atomic_inc(&peer->ref_cnt);
|
||||
|
||||
peer->valid = 1;
|
||||
qdf_mc_timer_init(&peer->peer_unmap_timer, QDF_TIMER_TYPE_SW,
|
||||
peer_unmap_timer_handler, peer);
|
||||
|
||||
ol_txrx_peer_find_hash_add(pdev, peer);
|
||||
|
||||
@@ -3147,10 +3149,7 @@ int ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
|
||||
vdev->wait_on_peer_id = OL_TXRX_INVALID_LOCAL_PEER_ID;
|
||||
}
|
||||
|
||||
if (vdev->opmode == wlan_op_mode_sta) {
|
||||
qdf_mc_timer_stop(&peer->peer_unmap_timer);
|
||||
qdf_mc_timer_destroy(&peer->peer_unmap_timer);
|
||||
}
|
||||
qdf_mc_timer_destroy(&peer->peer_unmap_timer);
|
||||
|
||||
/* check whether the parent vdev has no peers left */
|
||||
if (TAILQ_EMPTY(&vdev->peer_list)) {
|
||||
@@ -3366,8 +3365,6 @@ static void ol_txrx_peer_detach(void *ppeer)
|
||||
* Create a timer to track unmap events when the sta peer gets deleted.
|
||||
*/
|
||||
if (vdev->opmode == wlan_op_mode_sta) {
|
||||
qdf_mc_timer_init(&peer->peer_unmap_timer, QDF_TIMER_TYPE_SW,
|
||||
peer_unmap_timer_handler, peer);
|
||||
qdf_mc_timer_start(&peer->peer_unmap_timer,
|
||||
OL_TXRX_PEER_UNMAP_TIMEOUT);
|
||||
ol_txrx_info("started peer_unmap_timer for peer %p", peer);
|
||||
|
Reference in New Issue
Block a user