Browse Source

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
Alan Chen 4 years ago
parent
commit
1b4b46f32f
1 changed files with 22 additions and 0 deletions
  1. 22 0
      core/hdd/src/wlan_hdd_main.c

+ 22 - 0
core/hdd/src/wlan_hdd_main.c

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