Skip to content

Commit

Permalink
ath6kl: Fix system crash sometimes for USB hotplug
Browse files Browse the repository at this point in the history
System crash because of NULL pointer reference due to
cleanup_scatter is not implemented for USB.

Signed-off-by: Ray Chen <raychen@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Ray Chen authored and Kalle Valo committed Apr 16, 2012
1 parent cdeb860 commit 08c6100
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/wireless/ath/ath6kl/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,14 @@ static void ath6kl_usb_stop(struct ath6kl *ar)
hif_stop(ar);
}

static void ath6kl_usb_cleanup_scatter(struct ath6kl *ar)
{
/*
* USB doesn't support it. Just return.
*/
return;
}

static const struct ath6kl_hif_ops ath6kl_usb_ops = {
.diag_read32 = ath6kl_usb_diag_read32,
.diag_write32 = ath6kl_usb_diag_write32,
Expand All @@ -1049,6 +1057,7 @@ static const struct ath6kl_hif_ops ath6kl_usb_ops = {
.pipe_get_default = ath6kl_usb_get_default_pipe,
.pipe_map_service = ath6kl_usb_map_service_pipe,
.pipe_get_free_queue_number = ath6kl_usb_get_free_queue_number,
.cleanup_scatter = ath6kl_usb_cleanup_scatter,
};

/* ath6kl usb driver registered functions */
Expand Down

0 comments on commit 08c6100

Please sign in to comment.