qcacmn: Alloc/Dealloc the peer extended stats

Allocate/Deallocated the peer extended object in the
peer_create() and peer_del() paths respectively.

Change-Id: I3e93e1ec85aefb22d3fb40d1b01bbd07d660aff5
This commit is contained in:
Aniruddha Paul
2020-05-14 15:48:12 +05:30
committed by snandini
父節點 e99b7c2a82
當前提交 b07ed991ec
共有 3 個文件被更改,包括 115 次插入0 次删除

查看文件

@@ -5507,6 +5507,15 @@ dp_peer_create_wifi3(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
}
}
/*
* Allocate peer extended stats context. Fall through in
* case of failure as its not an implicit requirement to have
* this object for regular statistics updates.
*/
if (dp_peer_ext_stats_ctx_alloc(soc, peer) !=
QDF_STATUS_SUCCESS)
dp_warn("peer ext_stats ctx alloc failed");
/*
* In tx_monitor mode, filter may be set for unassociated peer
* when unassociated peer get associated peer need to
@@ -6220,6 +6229,11 @@ void dp_peer_unref_delete(struct dp_peer *peer)
peer, vdev, &peer->vdev->peer_list);
}
/*
* Deallocate the extended stats contenxt
*/
dp_peer_ext_stats_ctx_dealloc(soc, peer);
/* send peer destroy event to upper layer */
qdf_mem_copy(peer_cookie.mac_addr, peer->mac_addr.raw,
QDF_MAC_ADDR_SIZE);