qcacld-3.0: Remove legacy call to cds_is_target_ready

When wma_create_peer is called, driver checks for
cds_is_target_ready and the macro CDS_DRIVER_STATE_FW_READY is
unset during the wlan_hdd_pld_uevent. This results in race
condition where the wma_peer_create fails due to
cds_is_target_ready() failure and wma_vdev_delete is sent from
wma_vdev_attach. In wmi_stopinprogress is set when firmware is
down. But this is set only after a small delay and the vdev
commands reach the fw, which results in a race condition.

Remove the cds_is_target_ready() call from wma_create_peer.
Place the call to wma_wmi_stop() to set the wmi_stopinprogress
flag immediately after the wlan_hdd_pld_uevent is received.

Change-Id: Iea53931771afd93ffaeabf704bbaffcf2460284f
CRs-Fixed: 2320538
Bu işleme şunda yer alıyor:
Pragaspathi Thilagaraj
2018-09-25 15:15:22 +05:30
işlemeyi yapan: nshrivas
ebeveyn bec6de418b
işleme f445a4badf
3 değiştirilmiş dosya ile 1 ekleme ve 6 silme

Dosyayı Görüntüle

@@ -1571,6 +1571,7 @@ static void wlan_hdd_pld_uevent(struct device *dev,
hdd_enter();
hdd_info("pld event %d", uevent->uevent);
wma_wmi_stop();
wlan_hdd_set_the_pld_uevent(uevent);
mutex_lock(&hdd_init_deinit_lock);
wlan_hdd_handle_the_pld_uevent(uevent);

Dosyayı Görüntüle

@@ -1735,11 +1735,6 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
target_resource_config *wlan_res_cfg;
struct wlan_objmgr_peer *obj_peer = NULL;
if (!cds_is_target_ready()) {
WMA_LOGE(FL("target not ready, drop the request"));
return QDF_STATUS_E_BUSY;
}
if (!psoc) {
WMA_LOGE("%s: psoc is NULL", __func__);
return QDF_STATUS_E_INVAL;

Dosyayı Görüntüle

@@ -1961,7 +1961,6 @@ static void wma_shutdown_notifier_cb(void *priv)
qdf_event_set(&wma_handle->wma_resume_event);
pmo_ucfg_psoc_wakeup_host_event_received(wma_handle->psoc);
wmi_stop(wma_handle->wmi_handle);
msg.bodyptr = priv;
msg.callback = wma_cleanup_vdev_resp_and_hold_req;