summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2013-07-19 20:16:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-11 18:35:22 -0700
commite59f8a9d54603dcadbee294849988d1876d4bd38 (patch)
treeeb99e4cf7c1444c9e6f65151f11c95711617a9b4 /drivers
parent6edab054ac50f1c248eacf4d750dcbf5ff4f00b6 (diff)
downloadlinux-3.10-e59f8a9d54603dcadbee294849988d1876d4bd38.tar.gz
linux-3.10-e59f8a9d54603dcadbee294849988d1876d4bd38.tar.bz2
linux-3.10-e59f8a9d54603dcadbee294849988d1876d4bd38.zip
ath9k_htc: reboot firmware if it was loaded
commit 4928bd2ef8ece262f4f314630219999a91eaa440 upstream. Currently ath9k_htc will reboot firmware only if interface was ever started. Which lead to the problem in case where interface was never started but module need to be reloaded. This patch will partially fix bug "ath9k_htc: Target is unresponsive" https://github.com/qca/open-ath9k-htc-firmware/issues/1 Reproduction case: - plug adapter - make sure nothing will touch it. Stop Networkmanager or blacklist mac address of this adapter. - rmmod ath9k_htc; sleep 1; modprobe ath9k_htc Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index f5dda84176c..75a6376ed28 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1289,7 +1289,9 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
usb_set_intfdata(interface, NULL);
- if (!unplugged && (hif_dev->flags & HIF_USB_START))
+ /* If firmware was loaded we should drop it
+ * go back to first stage bootloader. */
+ if (!unplugged && (hif_dev->flags & HIF_USB_READY))
ath9k_hif_usb_reboot(udev);
kfree(hif_dev);