mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacmn: Release vdev ref in os_if_ndp_end_ind_handler
NAN vdev ref count incremented as part of end_ind handler is not released which will result in the nan vdev not getting physically deleted. Fix is to release nan vdev ref in os_if_ndp_end_ind_handler. Change-Id: I31a32fa241fb9e86d3a64d490722bc42905970c4 CRs-Fixed: 2325580
This commit is contained in:
parent
feffc52d97
commit
d3ceb840a7
3 changed files with 12 additions and 11 deletions
|
|
@ -1496,17 +1496,19 @@ static void os_if_ndp_end_ind_handler(struct wlan_objmgr_vdev *vdev,
|
|||
continue;
|
||||
}
|
||||
|
||||
idx = cb_obj.get_peer_idx(wlan_vdev_get_id(vdev),
|
||||
idx = cb_obj.get_peer_idx(wlan_vdev_get_id(vdev_itr),
|
||||
&end_ind->ndp_map[i].peer_ndi_mac_addr);
|
||||
if (idx < 0) {
|
||||
cfg80211_err("can't find addr: %pM in sta_ctx.",
|
||||
&end_ind->ndp_map[i].peer_ndi_mac_addr);
|
||||
wlan_objmgr_vdev_release_ref(vdev_itr, WLAN_NAN_ID);
|
||||
continue;
|
||||
}
|
||||
/* save the value of active sessions on each peer */
|
||||
ucfg_nan_set_active_ndp_sessions(vdev,
|
||||
ucfg_nan_set_active_ndp_sessions(vdev_itr,
|
||||
end_ind->ndp_map[i].num_active_ndp_sessions,
|
||||
idx);
|
||||
wlan_objmgr_vdev_release_ref(vdev_itr, WLAN_NAN_ID);
|
||||
}
|
||||
|
||||
data_len = osif_ndp_get_ndp_end_ind_len(end_ind);
|
||||
|
|
|
|||
|
|
@ -560,6 +560,14 @@ static int target_if_ndp_end_ind_handler(ol_scn_t scn, uint8_t *data,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
rsp->vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(
|
||||
wmi_handle->soc->wmi_psoc, QDF_NDI_MODE, WLAN_NAN_ID);
|
||||
if (!rsp->vdev) {
|
||||
target_if_err("vdev is null");
|
||||
qdf_mem_free(rsp);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
msg.bodyptr = rsp;
|
||||
msg.type = NDP_END_IND;
|
||||
msg.callback = target_if_nan_event_dispatcher;
|
||||
|
|
|
|||
|
|
@ -17495,15 +17495,6 @@ static QDF_STATUS extract_ndp_end_ind_tlv(wmi_unified_t wmi_handle,
|
|||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
(*rsp)->vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(
|
||||
wmi_handle->soc->wmi_psoc, QDF_NDI_MODE, WLAN_NAN_ID);
|
||||
if (!(*rsp)->vdev) {
|
||||
WMI_LOGE("vdev is null");
|
||||
qdf_mem_free(*rsp);
|
||||
*rsp = NULL;
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
(*rsp)->num_ndp_ids = event->num_ndp_end_indication_list;
|
||||
for (i = 0; i < (*rsp)->num_ndp_ids; i++) {
|
||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&ind[i].peer_ndi_mac_addr,
|
||||
|
|
|
|||
Loading…
Reference in a new issue