diff options
| author | Himanshu Agarwal <himanaga@codeaurora.org> | 2018-04-19 18:16:46 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-04-25 09:00:03 -0700 |
| commit | 34e4e9a4a4994f78684fcc0ccbffee087575c59f (patch) | |
| tree | 6079b74061e2f6cb6fcf46d1dc40d5e2c1b5f53e | |
| parent | 10201e6499caa1ae640d407e7c636d325c32ca4c (diff) | |
qcacld-3.0: Don't fill any WMA request if target is not ready
If any WMA request is queued in wma hold req/vdev resp queue after fw
has crashed and sent the corresponding uevent to HOST, request will
timeout and if at the same time, SSR is also going on, it may lead to
various issues and crashes.
Check whether target is ready or not before queuing any request
in wma hold req/vdev resp queue.
Change-Id: I358841566f858e115b3b04f12f4d8b70b75d1dfc
CRs-Fixed: 2226497
| -rw-r--r-- | core/hdd/src/wlan_hdd_driver_ops.c | 1 | ||||
| -rw-r--r-- | core/wma/src/wma_data.c | 1 | ||||
| -rw-r--r-- | core/wma/src/wma_dev_if.c | 10 |
3 files changed, 12 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 4ff082336d1f..efee8e24a389 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1418,6 +1418,7 @@ static void wlan_hdd_pld_uevent(struct device *dev, mutex_lock(&hdd_init_deinit_lock); switch (uevent->uevent) { case PLD_RECOVERY: + cds_set_target_ready(false); hdd_pld_ipa_uc_shutdown_pipes(); wlan_hdd_purge_notifier(); break; diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index 83b56fda8e8d..6037f0872f59 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -1224,6 +1224,7 @@ void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params) WMA_LOGP(FL("Failed to fill vdev request for vdev_id %d"), vdev_id); params->status = false; + goto out; } status = wma_send_vdev_stop_to_fw(wma, vdev_id); diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index f8a72c592cc0..f7d7d0b7aefd 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -3179,6 +3179,11 @@ struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, struct wma_target_req *req; QDF_STATUS status; + if (!cds_is_target_ready()) { + WMA_LOGE("target not ready, drop the request"); + return NULL; + } + req = qdf_mem_malloc(sizeof(*req)); if (!req) { WMA_LOGE(FL("Failed to allocate memory for msg %d vdev %d"), @@ -3499,6 +3504,11 @@ struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, struct wma_target_req *req; QDF_STATUS status; + if (!cds_is_target_ready()) { + WMA_LOGE("target not ready, drop the request"); + return NULL; + } + req = qdf_mem_malloc(sizeof(*req)); if (!req) { WMA_LOGE("%s: Failed to allocate memory for msg %d vdev %d", |
