From ee3e059c9dd3092c588f98c3cf3084e33f067fe1 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Thu, 7 Sep 2017 13:50:11 -0700 Subject: [PATCH] qcacld-3.0: Vote link up after HIF configuration Currently, HDD may attempt to prevent the bus link from going down before HIF receives any configuration settings. In this situation, HIF will drop the call to prevent runtime suspend, since it is not yet enabled in HIF at the time. Reorder the vote for link up to after HIF receives its configuration. Change-Id: Id70d7bd2502fb6673a20b1826d8bd863a59bfba5 CRs-Fixed: 2106120 --- core/hdd/src/wlan_hdd_driver_ops.c | 3 --- core/hdd/src/wlan_hdd_main.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index d27a31f35538..10343a97a524 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -230,9 +230,6 @@ int hdd_hif_open(struct device *dev, void *bdev, const struct hif_bus_id *bid, goto err_hif_close; } - if (hdd_ctx->config->prevent_link_down) - hif_vote_link_up(hif_ctx); - status = hif_enable(hif_ctx, dev, bdev, bid, bus_type, (reinit == true) ? HIF_ENABLE_TYPE_REINIT : HIF_ENABLE_TYPE_PROBE); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 735e65bc7213..da5011d980a5 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -11796,6 +11796,9 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx) cfg.enable_self_recovery = hdd_ctx->config->enableSelfRecovery; hdd_populate_runtime_cfg(hdd_ctx, &cfg); hif_init_ini_config(scn, &cfg); + + if (hdd_ctx->config->prevent_link_down) + hif_vote_link_up(scn); } /**