summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2017-12-12 15:38:13 +0800
committerKalle Valo <kvalo@codeaurora.org>2018-01-08 19:36:56 +0200
commit18d605013357563de79afeee9e9d2000161eb6a0 (patch)
treec00a3e7a0fde718d8aba67e520d54019cddf565d /drivers/net/wireless/marvell/mwifiex/cmdevt.c
parentf5ecd02a8b20f900701d6809a3ea5f12e5c87de8 (diff)
mwifiex: debugfs: trigger device dump for usb interface
This patch extend device_dump debugfs function to make it works for usb interface. For command timeouts, USB firmware will automatically emit firmware dump events, so we don't implement device_dump(). For user-initiated dumps, we trigger it by issue firmware dump event command to firmware, as there is no command response, do not start 10s timer. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/cmdevt.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/cmdevt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index dcc529e9c0ef..874660052055 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -290,13 +290,16 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
adapter->dbg.last_cmd_act[adapter->dbg.last_cmd_index] =
get_unaligned_le16((u8 *)host_cmd + S_DS_GEN);
+ /* Setup the timer after transmit command, except that specific
+ * command might not have command response.
+ */
+ if (cmd_code != HostCmd_CMD_FW_DUMP_EVENT)
+ mod_timer(&adapter->cmd_timer,
+ jiffies + msecs_to_jiffies(MWIFIEX_TIMER_10S));
+
/* Clear BSS_NO_BITS from HostCmd */
cmd_code &= HostCmd_CMD_ID_MASK;
- /* Setup the timer after transmit command */
- mod_timer(&adapter->cmd_timer,
- jiffies + msecs_to_jiffies(MWIFIEX_TIMER_10S));
-
return 0;
}