|
@@ -17785,6 +17785,36 @@ static void hdd_inform_wifi_off(void)
|
|
|
osif_psoc_sync_op_stop(psoc_sync);
|
|
|
}
|
|
|
|
|
|
+#if defined CFG80211_USER_HINT_CELL_BASE_SELF_MANAGED || \
|
|
|
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0))
|
|
|
+static void hdd_inform_wifi_on(void)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+ struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
+ struct osif_psoc_sync *psoc_sync;
|
|
|
+
|
|
|
+ hdd_nofl_debug("inform regdomain for wifi on");
|
|
|
+ ret = wlan_hdd_validate_context(hdd_ctx);
|
|
|
+ if (ret)
|
|
|
+ return;
|
|
|
+ if (!wlan_hdd_validate_modules_state(hdd_ctx))
|
|
|
+ return;
|
|
|
+ if (!hdd_ctx->wiphy)
|
|
|
+ return;
|
|
|
+ ret = osif_psoc_sync_op_start(wiphy_dev(hdd_ctx->wiphy), &psoc_sync);
|
|
|
+ if (ret)
|
|
|
+ return;
|
|
|
+ if (hdd_ctx->wiphy->registered)
|
|
|
+ hdd_send_wiphy_regd_sync_event(hdd_ctx);
|
|
|
+
|
|
|
+ osif_psoc_sync_op_stop(psoc_sync);
|
|
|
+}
|
|
|
+#else
|
|
|
+static void hdd_inform_wifi_on(void)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
static int hdd_validate_wlan_string(const char __user *user_buf)
|
|
|
{
|
|
|
char buf[15];
|
|
@@ -18014,6 +18044,9 @@ static ssize_t wlan_hdd_state_ctrl_param_write(struct file *filp,
|
|
|
}
|
|
|
hdd_ctx->is_wlan_disabled = false;
|
|
|
}
|
|
|
+
|
|
|
+ if (id == WLAN_ON_STR)
|
|
|
+ hdd_inform_wifi_on();
|
|
|
exit:
|
|
|
hdd_exit();
|
|
|
return count;
|