]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ath10k: add soft/hard firmware crash option to simulate_fw_crash
authorMarek Puzyniak <marek.puzyniak@tieto.com>
Fri, 21 Mar 2014 15:46:56 +0000 (17:46 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 24 Mar 2014 08:23:50 +0000 (10:23 +0200)
commit8c65699274a695df941407ccb91c633819039193
treea4c8415ad223baf32d824f680066d40d06941c80
parente8dc1a968d129f6f96d57a050e35660edb03c216
ath10k: add soft/hard firmware crash option to simulate_fw_crash

Command WMI_FORCE_FW_HANG_CMDID is not supported in firmware 10.1.
In order to have firmware crash simulation functionality also
in firmware 10.1 driver can force firmware crash by performing not allowed
operation. Driver can deliberately crash firmware when setting vdev param for
vdev id out of range.  This patch introduces two keywords to simulate_fw_crash:

'soft' which will cause firmware crash that is recoverable
       by warm firmware reset but supported only in main firmware.
'hard' which will cause firmware crash recoverable by cold
       firmware reset, this option works for both firmwares.

Commands to trigger firmware soft/hard crash:

echo 'soft' > /sys/kernel/debug/ieee80211/phyX/ath10k/simulate_fw_crash
echo 'hard' > /sys/kernel/debug/ieee80211/phyX/ath10k/simulate_fw_crash

kvalo: remove '\n' before checking the command and simplify how buf is null
terminated

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/debug.c