diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 6923d0d5554c..17d36d4e30cf 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -14517,11 +14517,12 @@ static int wlan_hdd_state_ctrl_param_open(struct inode *inode, static void hdd_inform_wifi_off(void) { struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + int ret; - if (!hdd_ctx) { - hdd_err("Invalid hdd/pdev context"); + ret = wlan_hdd_validate_context(hdd_ctx); + if (ret != 0) return; - } + ucfg_blm_wifi_off(hdd_ctx->pdev); }