: prop (CR): 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: I277f7c68e3b74557edb6ff82fa0224d1f470fd95
Reviewed-on: https://gerrit.mot.com/1264155
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Binesh Balasingh <binesh@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1456500
Reviewed-by: Prashanth Chakravarthy <a19110@motorola.com>
Submit-Approved: Raja Phani K <a16821@motorola.com>
This commit is contained in:
Prashanth Chakravarthy 2018-11-02 15:23:51 +05:30 • committed by panyq6
commit 4de485412c

View file

@ -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);