From fa60ff5562c6ac9f2b1325ee0246e620f20086a8 Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Tue, 22 Aug 2017 18:50:14 -0700 Subject: [PATCH] qcacld-3.0: Try to recover from htc_connect_service failure In the case of low memory allocation failures, the system should be able to continue functioning after the connect_service failure. Change-Id: Icd054d541aa95dbf4099426cf73f3dfe6c2c4565 CRs-Fixed: 2097391 --- core/dp/htt/htt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index 285c389c9983..560875716c8c 100644 --- a/core/dp/htt/htt.c +++ b/core/dp/htt/htt.c @@ -761,10 +761,14 @@ int htt_htc_attach(struct htt_pdev_t *pdev, uint16_t service_id) status = htc_connect_service(pdev->htc_pdev, &connect, &response); if (status != QDF_STATUS_SUCCESS) { - if (!cds_is_fw_down()) - QDF_BUG(0); + if (cds_is_fw_down()) + return -EIO; - return -EIO; /* failure */ + if (status == QDF_STATUS_E_NOMEM || + cds_is_self_recovery_enabled()) + return qdf_status_to_os_return(status); + + QDF_BUG(0); } htt_update_endpoint(pdev, service_id, response.Endpoint);