diff options
author | Arend Van Spriel <arend.vanspriel@broadcom.com> | 2018-05-16 14:12:00 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-05-23 17:51:49 +0200 |
commit | 21c5c83ce83359f0ab930824c67984575c051550 (patch) | |
tree | 4988b6d9226d8b7c3c1af18c6a12581faa70a3fc /drivers/net/wireless/marvell/mwifiex/usb.c | |
parent | brcmfmac: add support for sysfs initiated coredump (diff) | |
download | linux-21c5c83ce83359f0ab930824c67984575c051550.tar.xz linux-21c5c83ce83359f0ab930824c67984575c051550.zip |
mwifiex: support sysfs initiated device coredump
Since commit 3c47d19ff4dc ("drivers: base: add coredump driver ops")
it is possible to initiate a device coredump from user-space. This
patch adds support for it adding the .coredump() driver callback.
As there is no longer a need to initiate it through debugfs remove
that code.
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/usb.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/usb.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c index 4bc244801636..7aa39878ce49 100644 --- a/drivers/net/wireless/marvell/mwifiex/usb.c +++ b/drivers/net/wireless/marvell/mwifiex/usb.c @@ -653,6 +653,16 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) usb_put_dev(interface_to_usbdev(intf)); } +static void mwifiex_usb_coredump(struct device *dev) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct usb_card_rec *card = usb_get_intfdata(intf); + + mwifiex_send_cmd(mwifiex_get_priv(card->adapter, MWIFIEX_BSS_ROLE_ANY), + HostCmd_CMD_FW_DUMP_EVENT, HostCmd_ACT_GEN_SET, 0, + NULL, true); +} + static struct usb_driver mwifiex_usb_driver = { .name = "mwifiex_usb", .probe = mwifiex_usb_probe, @@ -661,6 +671,9 @@ static struct usb_driver mwifiex_usb_driver = { .suspend = mwifiex_usb_suspend, .resume = mwifiex_usb_resume, .soft_unbind = 1, + .drvwrap.driver = { + .coredump = mwifiex_usb_coredump, + }, }; static int mwifiex_write_data_sync(struct mwifiex_adapter *adapter, u8 *pbuf, |