qcacmn: Fix peer ref counting leak while finding and deleting peer

There are two instances where peer ref counting leak has been observed
1) When DUT-STA is connected to AP1 and if it tries to roam to AP2 or
   to same AP1 then as part of roam sync indication, it needs to delete
   the old peer and create the new peer. Deletion of old peer is
   happening through force delete operation which is No-OP for some of
   the platforms. In such cases, do normal peer delete operation, so
   that peer ref count can be deleted properly.

2) When looking up peer by its associated vdev, driver goes one by one
   all peers and check their associated vdev and compare with given
   vdev. If it doesn't find the match then it returns without releasing
   the reference count.

CRs-Fixed: 2263607
Change-Id: Ibcad72943258e531e29498961d3d7e692fd05b36
这个提交包含在:
Krunal Soni
2018-06-28 14:18:30 -07:00
提交者 nshrivas
父节点 6b6b91db11
当前提交 304792abd8
修改 3 个文件,包含 40 行新增1 行删除

查看文件

@@ -721,4 +721,31 @@ static inline void cdp_peer_detach_force_delete(ol_txrx_soc_handle soc,
return;
}
/**
* is_cdp_peer_detach_force_delete_supported() - To check if force delete
* operation is supported
* @soc: pointer to SOC handle
*
* Some of the platforms support force delete operation and some of them
* don't. This API returns true if API which handles force delete operation
* is registered and false otherwise.
*
* Return: true if API which handles force delete operation is registered
* false in all other cases
*/
static inline bool
is_cdp_peer_detach_force_delete_supported(ol_txrx_soc_handle soc)
{
if (!soc || !soc->ops || !soc->ops->peer_ops) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"%s invalid instance", __func__);
return false;
}
if (soc->ops->peer_ops->peer_detach_force_delete)
return true;
return false;
}
#endif /* _CDP_TXRX_PEER_H_ */