qcacld-3.0: Add reference when access vdev

adapter->vdev should never be referenced directly, and instead
must be accessed only via hdd_objmgr_get_vdev() and
hdd_objmgr_put_vdev() so that proper reference counting is
enforced.

Change-Id: Ib3efc05426105494f13ada7efed6175f88c5d141
CRs-Fixed: 2708758
This commit is contained in:
Jianmin Zhu 2020-06-12 08:46:12 +08:00 • committed by nshrivas
commit d8097322f0

View file

@ -5057,18 +5057,21 @@ hdd_store_nss_chains_cfg_in_vdev(struct hdd_adapter *adapter)
{
struct wlan_mlme_nss_chains vdev_ini_cfg;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct wlan_objmgr_vdev *vdev;
/* Populate the nss chain params from ini for this vdev type */
sme_populate_nss_chain_params(hdd_ctx->mac_handle, &vdev_ini_cfg,
adapter->device_mode,
hdd_ctx->num_rf_chains);
vdev = hdd_objmgr_get_vdev(adapter);
/* Store the nss chain config into the vdev */
if (adapter->vdev)
if (vdev) {
sme_store_nss_chains_cfg_in_vdev(adapter->vdev, &vdev_ini_cfg);
else
hdd_objmgr_put_vdev(vdev);
} else {
hdd_err("Vdev is NULL");
}
}
bool hdd_is_vdev_in_conn_state(struct hdd_adapter *adapter)