diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 9e582e14da74..2469db5a5bb1 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -1082,7 +1082,7 @@ static void ath9k_hif_usb_firmware_fail(struct hif_device_usb *hif_dev) | |||
1082 | struct device *dev = &hif_dev->udev->dev; | 1082 | struct device *dev = &hif_dev->udev->dev; |
1083 | struct device *parent = dev->parent; | 1083 | struct device *parent = dev->parent; |
1084 | 1084 | ||
1085 | complete(&hif_dev->fw_done); | 1085 | complete_all(&hif_dev->fw_done); |
1086 | 1086 | ||
1087 | if (parent) | 1087 | if (parent) |
1088 | device_lock(parent); | 1088 | device_lock(parent); |
@@ -1131,7 +1131,7 @@ static void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context) | |||
1131 | 1131 | ||
1132 | release_firmware(fw); | 1132 | release_firmware(fw); |
1133 | hif_dev->flags |= HIF_USB_READY; | 1133 | hif_dev->flags |= HIF_USB_READY; |
1134 | complete(&hif_dev->fw_done); | 1134 | complete_all(&hif_dev->fw_done); |
1135 | 1135 | ||
1136 | return; | 1136 | return; |
1137 | 1137 | ||
@@ -1316,7 +1316,10 @@ static int ath9k_hif_usb_suspend(struct usb_interface *interface, | |||
1316 | if (!(hif_dev->flags & HIF_USB_START)) | 1316 | if (!(hif_dev->flags & HIF_USB_START)) |
1317 | ath9k_htc_suspend(hif_dev->htc_handle); | 1317 | ath9k_htc_suspend(hif_dev->htc_handle); |
1318 | 1318 | ||
1319 | ath9k_hif_usb_dealloc_urbs(hif_dev); | 1319 | wait_for_completion(&hif_dev->fw_done); |
1320 | |||
1321 | if (hif_dev->flags & HIF_USB_READY) | ||
1322 | ath9k_hif_usb_dealloc_urbs(hif_dev); | ||
1320 | 1323 | ||
1321 | return 0; | 1324 | return 0; |
1322 | } | 1325 | } |