mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Fix check to avoid multiple vdev for same session
In function ol_txrx_vdev_handle wma_vdev_attach, along with vdev_active check for is_vdev_valid to find if vdev already present or not. Change-Id: I39cc6d27037a8fec29cd6114067b2dab9a964ab0 CRs-Fixed: 2135737
This commit is contained in:
parent
bb85c40396
commit
380cfc7084
1 changed files with 16 additions and 8 deletions
|
|
@ -678,7 +678,6 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
|
|||
return status;
|
||||
}
|
||||
|
||||
iface->vdev_active = false;
|
||||
/* P2P Device */
|
||||
if ((iface->type == WMI_VDEV_TYPE_AP) &&
|
||||
(iface->sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE)) {
|
||||
|
|
@ -693,6 +692,9 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
|
|||
pdel_sta_self_req_param, generateRsp);
|
||||
}
|
||||
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
iface->vdev_active = false;
|
||||
|
||||
return status;
|
||||
|
||||
send_fail_rsp:
|
||||
|
|
@ -1147,10 +1149,17 @@ static bool wma_is_vdev_valid(uint32_t vdev_id)
|
|||
{
|
||||
tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle)
|
||||
if (!wma_handle) {
|
||||
WMA_LOGD("%s: vdev_id: %d, null wma_handle", __func__, vdev_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
return wma_handle->interfaces[vdev_id].vdev_active;
|
||||
WMA_LOGD("%s: vdev_id: %d, vdev_active: %d, is_vdev_valid %d",
|
||||
__func__, vdev_id, wma_handle->interfaces[vdev_id].vdev_active,
|
||||
wma_handle->interfaces[vdev_id].is_vdev_valid);
|
||||
|
||||
return wma_handle->interfaces[vdev_id].vdev_active ||
|
||||
wma_handle->interfaces[vdev_id].is_vdev_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1960,9 +1969,10 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|||
WMA_LOGE("%s: Failed to get mac", __func__);
|
||||
goto end;
|
||||
}
|
||||
if (wma_handle->interfaces[self_sta_req->session_id].vdev_active) {
|
||||
WMA_LOGE("%s: vdev %d already active",
|
||||
__func__, self_sta_req->session_id);
|
||||
|
||||
vdev_id = self_sta_req->session_id;
|
||||
if (wma_is_vdev_valid(vdev_id)) {
|
||||
WMA_LOGE("%s: vdev %d already active", __func__, vdev_id);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
@ -1982,8 +1992,6 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|||
goto end;
|
||||
}
|
||||
|
||||
vdev_id = self_sta_req->session_id;
|
||||
|
||||
txrx_vdev_type = wma_get_txrx_vdev_type(self_sta_req->type);
|
||||
|
||||
if (wlan_op_mode_unknown == txrx_vdev_type) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue