qcacld-3.0: Add a driver module parameter for PCIe gen speed

Add a driver module parameter to configure PCIe gen speed.

Change-Id: Ieab47ec3c2450f503c3c5eda6f5dee4ee70b33e4
CRs-Fixed: 2732188
This commit is contained in:
Alan Chen 2020-07-14 16:56:01 -07:00 • committed by snandini
commit 1b4b46f32f

View file

@ -1061,6 +1061,8 @@ static int con_mode;
static int con_mode_ftm;
int con_mode_epping;
static int pcie_gen_speed;
/* Variable to hold connection mode including module parameter con_mode */
static int curr_con_mode;
@ -17810,12 +17812,32 @@ static const struct kernel_param_ops fwpath_ops = {
.get = param_get_string,
};
static int pcie_set_gen_speed_handler(const char *kmessage,
const struct kernel_param *kp)
{
int ret;
ret = param_set_int(kmessage, kp);
hdd_info_rl("Received PCIe gen speed %d", pcie_gen_speed);
return ret;
}
static const struct kernel_param_ops pcie_gen_speed_ops = {
.set = pcie_set_gen_speed_handler,
.get = param_get_int,
};
module_param_cb(con_mode, &con_mode_ops, &con_mode,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
module_param_cb(con_mode_ftm, &con_mode_ftm_ops, &con_mode_ftm,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
module_param_cb(pcie_gen_speed, &pcie_gen_speed_ops, &pcie_gen_speed,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#ifdef WLAN_FEATURE_EPPING
module_param_cb(con_mode_epping, &con_mode_epping_ops,
&con_mode_epping, 0644);