Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06e01418 authored by Binesh B's avatar Binesh B Committed by Sooraj S
Browse files

moto: prima: Add new sysfs entries for SAR cutback

create sar_mhs and sar_sta sysfs entries for recording wlan states
for SAR cutback. The WLAN driver does not care about these entries
but they are needed as IPC over to the mdmcutback daemon

Change-Id: I8241e92f8033241664eae638abcf6bef6d6dea24
Reviewed-on: https://gerrit.mot.com/1263877


SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: default avatarBinesh Balasingh <binesh@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: default avatarAndrew Hexen <SyberHexen@gmail.com>
parent 3693c62d
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -153,6 +153,18 @@ static char *country_code;
static int   enable_11d = -1;
static int   enable_dfs_chan_scan = -1;
#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,
};
#ifndef MODULE
static int wlan_hdd_inited;
#endif
@@ -18572,6 +18584,12 @@ bool hdd_is_cli_iface_up(hdd_context_t *hdd_ctx)
	return false;
}
static int sar_changed_handler(const char *kmessage,
                                  const struct kernel_param *kp)
{
   return param_set_copystring(kmessage, kp);
}
//Register the module init/exit functions
module_init(hdd_module_init);
module_exit(hdd_module_exit);
@@ -18590,6 +18608,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,
};
#ifdef MODULE
module_param(con_mode, int, 0);
#else
@@ -18608,3 +18631,10 @@ module_param(enable_11d, int,
module_param(country_code, charp,
             S_IRUSR | 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);