qcacld-3.0: notify reg change event once wifi on from GUI

Add regulatory notify event when wifi ON by GUI.
In new framework test, When turning on Wi-Fi, it is
expecting driver to indicate NL80211_CMD_[WIPHY]_ REG_CHANGE
event with country code to wificond.

Change-Id: Icb0bdec097db14905de6234573d05fffbe0e4500
CRs-Fixed: 3186188
This commit is contained in:
Liangwei Dong
2022-05-16 10:10:46 +08:00
committed by Madan Koyyalamudi
szülő 10193c6987
commit 010e18b838

Fájl megtekintése

@@ -17785,6 +17785,36 @@ static void hdd_inform_wifi_off(void)
osif_psoc_sync_op_stop(psoc_sync); 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) static int hdd_validate_wlan_string(const char __user *user_buf)
{ {
char buf[15]; 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; hdd_ctx->is_wlan_disabled = false;
} }
if (id == WLAN_ON_STR)
hdd_inform_wifi_on();
exit: exit:
hdd_exit(); hdd_exit();
return count; return count;