diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 50a8e44d98b3..85ab73d32571 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -287,6 +287,17 @@ static int enable_11d = -1; static int enable_dfs_chan_scan = -1; static bool is_mode_change_psoc_idle_shutdown; +#define BUF_LEN_SAR 10 +static char sar_sta_buffer[BUF_LEN_SAR]; +static struct kparam_string sar_sta = { + .string = sar_sta_buffer, + .maxlen = BUF_LEN_SAR, +}; +static char sar_mhs_buffer[BUF_LEN_SAR]; +static struct kparam_string sar_mhs = { + .string = sar_mhs_buffer, + .maxlen = BUF_LEN_SAR, +}; #define WLAN_NLINK_CESIUM 30 static qdf_wake_lock_t wlan_wake_lock; @@ -17745,6 +17756,11 @@ exit: return errno; } +static int sar_changed_handler(const char *kmessage, + const struct kernel_param *kp) +{ + return param_set_copystring(kmessage, kp); +} static int hdd_set_con_mode(enum QDF_GLOBAL_MODE mode) { con_mode = mode; @@ -19584,6 +19600,11 @@ static const struct kernel_param_ops fwpath_ops = { .get = param_get_string, }; +static const struct kernel_param_ops sar_ops = { + .set = sar_changed_handler, + .get = param_get_string, +}; + static int __pcie_set_gen_speed_handler(void) { int ret; @@ -19650,6 +19671,11 @@ module_param_cb(con_mode_epping, &con_mode_epping_ops, module_param_cb(fwpath, &fwpath_ops, &fwpath, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param_cb(sar_sta, &sar_ops, &sar_sta, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param_cb(sar_mhs, &sar_ops, &sar_mhs, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + module_param(enable_dfs_chan_scan, int, S_IRUSR | S_IRGRP | S_IROTH);