diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-04-06 05:58:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-08 15:24:09 -0400 |
commit | 66b10e33f742bb45a29b7dbbc8dc85583d4c9ef6 (patch) | |
tree | 574c4e70c5bcfe89e7178b65356c4c0a7bb58d34 /drivers/net | |
parent | 46baa1a24945b5813097af5a632db721f9c9d03b (diff) |
ath9k_htc: Fix RX URB reference count
RX URBs are automatically freed when the reference
count drops to zero - this currently doesn't happen when
usb_kill_anchored_urbs() is called during unload.
Fix this by dropping the reference count by one during
initial submission.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 8838cdfcc49..4528df4a5bd 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -652,6 +652,12 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) | |||
652 | usb_unanchor_urb(urb); | 652 | usb_unanchor_urb(urb); |
653 | goto err_submit; | 653 | goto err_submit; |
654 | } | 654 | } |
655 | |||
656 | /* | ||
657 | * Drop reference count. | ||
658 | * This ensures that the URB is freed when killing them. | ||
659 | */ | ||
660 | usb_free_urb(urb); | ||
655 | } | 661 | } |
656 | 662 | ||
657 | return 0; | 663 | return 0; |