From: Ivan Priest Date: Tue, 12 Jun 2018 16:03:32 +0000 (+0100) Subject: [9610][7885][7570] wlbt: module param override for HCF path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=44175f8d2857fadb5b6610100788eb22f3646909;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [9610][7885][7570] wlbt: module param override for HCF path Add the cfg_platform module parameter which allows the subdirectory containing the HCF files to be overridden. Use "echo -n " to override. Change-Id: I1e2980821d05e35697471a6c7867ae46640243c6 SCSC-Bug-Id: SSB-40752 Signed-off-by: Ivan Priest (cherry picked from commit cc33db2d54d068505e8cf6998d836b57d19fc48e) --- diff --git a/drivers/misc/samsung/scsc/mx140_file.c b/drivers/misc/samsung/scsc/mx140_file.c index 4beba19706ad..4ee6d6ed3316 100644 --- a/drivers/misc/samsung/scsc/mx140_file.c +++ b/drivers/misc/samsung/scsc/mx140_file.c @@ -118,6 +118,10 @@ static bool use_new_fw_structure = true; module_param(use_new_fw_structure, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(use_new_fw_structure, "deprecated"); +static char *cfg_platform = "default"; +module_param(cfg_platform, charp, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(cfg_platform, "HCF config subdirectory"); + /* Reads a configuration file into memory (f/w profile specific) */ static int __mx140_file_request_conf(struct scsc_mx *mx, const struct firmware **conf, @@ -150,7 +154,15 @@ int mx140_file_request_conf(struct scsc_mx *mx, const struct firmware **conf, co { int r; - /* First search in generic location. This is an override. + /* First, if the config subdirectory has been overriden by cfg_platform + * module parameter, search only in that location. + */ + if (strcmp(cfg_platform, "default")) { + SCSC_TAG_INFO(MX_FILE, "module param cfg_platform = %s\n", cfg_platform); + return __mx140_file_request_conf(mx, conf, cfg_platform, config_rel_path); + } + + /* Search in generic location. This is an override. * e.g. /etc/wifi/mx140/conf/wlan/wlan.hcf */ r = __mx140_file_request_conf(mx, conf, "", config_rel_path);