qcacmn: Add VDEV refcount debug support
Add debug support for VDEV refcount to take refcount by module id and decrement corresponding refcount with same module id Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
This commit is contained in:

committed by
snandini

parent
a718007f03
commit
ddc9e59e8f
@@ -2179,7 +2179,8 @@ dp_tx_send_exception(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
qdf_ether_header_t *eh = NULL;
|
||||
struct dp_tx_msdu_info_s msdu_info;
|
||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id);
|
||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id,
|
||||
DP_MOD_ID_TX_EXCEPTION);
|
||||
|
||||
if (qdf_unlikely(!vdev))
|
||||
goto fail;
|
||||
@@ -2270,12 +2271,12 @@ dp_tx_send_exception(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
nbuf = dp_tx_send_msdu_single(vdev, nbuf, &msdu_info,
|
||||
tx_exc_metadata->peer_id, tx_exc_metadata);
|
||||
|
||||
dp_vdev_unref_delete(soc, vdev);
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_TX_EXCEPTION);
|
||||
return nbuf;
|
||||
|
||||
fail:
|
||||
if (vdev)
|
||||
dp_vdev_unref_delete(soc, vdev);
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_TX_EXCEPTION);
|
||||
dp_verbose_debug("pkt send failed");
|
||||
return nbuf;
|
||||
}
|
||||
@@ -2310,7 +2311,7 @@ qdf_nbuf_t dp_tx_send_mesh(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
return nbuf;
|
||||
}
|
||||
|
||||
vdev = dp_vdev_get_ref_by_id(soc, vdev_id);
|
||||
vdev = dp_vdev_get_ref_by_id(soc, vdev_id, DP_MOD_ID_MESH);
|
||||
if (!vdev) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
"vdev is NULL for vdev_id %d", vdev_id);
|
||||
@@ -2334,7 +2335,7 @@ qdf_nbuf_t dp_tx_send_mesh(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
if (!nbuf_clone) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
"qdf_nbuf_clone failed");
|
||||
dp_vdev_unref_delete(soc, vdev);
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_MESH);
|
||||
return nbuf;
|
||||
}
|
||||
qdf_nbuf_set_tx_ftype(nbuf_clone, CB_FTYPE_MESH_TX_INFO);
|
||||
@@ -2358,7 +2359,7 @@ qdf_nbuf_t dp_tx_send_mesh(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
DP_STATS_INC(vdev, tx_i.mesh.exception_fw, 1);
|
||||
}
|
||||
|
||||
dp_vdev_unref_delete(soc, vdev);
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_MESH);
|
||||
return nbuf;
|
||||
}
|
||||
|
||||
@@ -4139,7 +4140,8 @@ qdf_nbuf_t dp_tx_non_std(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id);
|
||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id,
|
||||
DP_MOD_ID_TDLS);
|
||||
|
||||
if (!vdev) {
|
||||
dp_err("vdev handle for id %d is NULL", vdev_id);
|
||||
@@ -4148,7 +4150,7 @@ qdf_nbuf_t dp_tx_non_std(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
|
||||
if (tx_spec & OL_TX_SPEC_NO_FREE)
|
||||
vdev->is_tdls_frame = true;
|
||||
dp_vdev_unref_delete(soc, vdev);
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_TDLS);
|
||||
|
||||
return dp_tx_send(soc_hdl, vdev_id, msdu_list);
|
||||
}
|
||||
|
Reference in New Issue
Block a user