Skip to contentSkip to conversation

ath10k: Improve 'hard' simulate fw crash.

PATCH Applied [email protected] 2 participants 2 messages Jul 22, 2014 – Jul 28, 2014 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Improve 'hard' simulate fw crash.

From: Ben Greear <[email protected]>

Different firmware may support different numbers of vdevs. Use value that is always out of range for all firmware.

---
 drivers/net/wireless/ath/ath10k/debug.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/debug.c +4 -1
index 3030158..c9e35c87e 100644
@@ -531,7 +531,10 @@ static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
 		ret = ath10k_wmi_force_fw_hang(ar, WMI_FORCE_FW_HANG_ASSERT, 0);
 	} else if (!strcmp(buf, "hard")) {
 		ath10k_info("simulating hard firmware crash\n");
-		ret = ath10k_wmi_vdev_set_param(ar, TARGET_NUM_VDEVS + 1,
+		/* 0x7fff is vdev id, and it is always out of range for all
+		 * firmware variants in order to force a firmware crash.
+		 */
+		ret = ath10k_wmi_vdev_set_param(ar, 0x7fff,
 					ar->wmi.vdev_param->rts_threshold, 0);
 	} else {
 		ret = -EINVAL;
Signature · 1 line
1.7.11.7