qcacmn: Block WMI cmds before issuing HTC stop
WMI cmds should be blocked, before calling HTC stop to avoid the race condition in the system Change-Id: I015b154a3bc422f50d4ed82bc861dd9e054c47a3 CRs-Fixed: 2194234
This commit is contained in:
@@ -1458,16 +1458,25 @@ static inline QDF_STATUS __htc_send_pkt(HTC_HANDLE HTCHandle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* HTC API - htc_send_pkt */
|
/* HTC API - htc_send_pkt */
|
||||||
QDF_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
|
QDF_STATUS htc_send_pkt(HTC_HANDLE htc_handle, HTC_PACKET *htc_packet)
|
||||||
{
|
{
|
||||||
if (HTCHandle == NULL || pPacket == NULL)
|
if (!htc_handle) {
|
||||||
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
|
||||||
|
("%s: HTCHandle is NULL \n", __func__));
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!htc_packet) {
|
||||||
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
|
||||||
|
("%s: pPacket is NULL \n", __func__));
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
|
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
|
||||||
("+-htc_send_pkt: Enter endPointId: %d, buffer: %pK, length: %d\n",
|
("+-htc_send_pkt: Enter endPointId: %d, buffer: %pK, length: %d\n",
|
||||||
pPacket->Endpoint, pPacket->pBuffer,
|
htc_packet->Endpoint, htc_packet->pBuffer,
|
||||||
pPacket->ActualLength));
|
htc_packet->ActualLength));
|
||||||
return __htc_send_pkt(HTCHandle, pPacket);
|
return __htc_send_pkt(htc_handle, htc_packet);
|
||||||
}
|
}
|
||||||
qdf_export_symbol(htc_send_pkt);
|
qdf_export_symbol(htc_send_pkt);
|
||||||
|
|
||||||
|
@@ -2506,6 +2506,21 @@ void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val)
|
|||||||
wmi_handle->tgt_force_assert_enable = val;
|
wmi_handle->tgt_force_assert_enable = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_stop() - generic function to block unified WMI command
|
||||||
|
* @wmi_handle: handle to WMI.
|
||||||
|
*
|
||||||
|
* @Return: success always.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
wmi_stop(wmi_unified_t wmi_handle)
|
||||||
|
{
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO,
|
||||||
|
"WMI Stop\n");
|
||||||
|
wmi_handle->wmi_stopinprogress = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_MCL
|
#ifndef CONFIG_MCL
|
||||||
/**
|
/**
|
||||||
* API to flush all the previous packets associated with the wmi endpoint
|
* API to flush all the previous packets associated with the wmi endpoint
|
||||||
@@ -2520,20 +2535,6 @@ wmi_flush_endpoint(wmi_unified_t wmi_handle)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(wmi_flush_endpoint);
|
qdf_export_symbol(wmi_flush_endpoint);
|
||||||
|
|
||||||
/**
|
|
||||||
* generic function to block unified WMI command
|
|
||||||
* @param wmi_handle : handle to WMI.
|
|
||||||
* @return 0 on success and -ve on failure.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
wmi_stop(wmi_unified_t wmi_handle)
|
|
||||||
{
|
|
||||||
QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO,
|
|
||||||
"WMI Stop\n");
|
|
||||||
wmi_handle->wmi_stopinprogress = 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI
|
* wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI
|
||||||
* By default pdev_id conversion is not done in WMI.
|
* By default pdev_id conversion is not done in WMI.
|
||||||
|
Reference in New Issue
Block a user