aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-04-23 00:58:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-26 14:21:22 -0400
commitd8f996f6ff7e6eab4c7b96e908ba789533595e7d (patch)
tree4efb0581691096ff55c9c2bd1d19950ca79677b8
parent0d36d71da2a3e5b28b4e7743c0041515cca798ef (diff)
ath9k_htc: Really fix device hotunplug
All commands to the target are disabled when the device is unplugged, but a normal module unload has to be differentiated from this case, as we could still receive data in the RX endpoint. Fix this by checking if the device is attached or not. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 49b7a8970ddd..74872ca76f9a 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -922,7 +922,8 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
922 (struct hif_device_usb *) usb_get_intfdata(interface); 922 (struct hif_device_usb *) usb_get_intfdata(interface);
923 923
924 if (hif_dev) { 924 if (hif_dev) {
925 ath9k_htc_hw_deinit(hif_dev->htc_handle, true); 925 ath9k_htc_hw_deinit(hif_dev->htc_handle,
926 (udev->state == USB_STATE_NOTATTACHED) ? true : false);
926 ath9k_htc_hw_free(hif_dev->htc_handle); 927 ath9k_htc_hw_free(hif_dev->htc_handle);
927 ath9k_hif_usb_dev_deinit(hif_dev); 928 ath9k_hif_usb_dev_deinit(hif_dev);
928 usb_set_intfdata(interface, NULL); 929 usb_set_intfdata(interface, NULL);