Skip to content

Commit

Permalink
ath9k_htc: Really fix device hotunplug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith authored and John W. Linville committed Apr 26, 2010
1 parent 0d36d71 commit d8f996f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
(struct hif_device_usb *) usb_get_intfdata(interface);

if (hif_dev) {
ath9k_htc_hw_deinit(hif_dev->htc_handle, true);
ath9k_htc_hw_deinit(hif_dev->htc_handle,
(udev->state == USB_STATE_NOTATTACHED) ? true : false);
ath9k_htc_hw_free(hif_dev->htc_handle);
ath9k_hif_usb_dev_deinit(hif_dev);
usb_set_intfdata(interface, NULL);
Expand Down

0 comments on commit d8f996f

Please sign in to comment.