Skip to contentSkip to conversation

ath6kl: Fix system crash sometimes for USB hotplug

PATCH Applied [email protected] 2 participants 2 messages Apr 12, 2012 – Apr 16, 2012 Atheros ATH6KL wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath6kl: Fix system crash sometimes for USB hotplug

From: Ray Chen <[email protected]>

System crash because of NULL pointer reference due to cleanup_scatter is not implemented for USB.

---
 drivers/net/wireless/ath/ath6kl/usb.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath6kl/usb.c +9 -0
index 73aacdd..dfbbe9e 100644
@@ -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,
@@ -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 */
Signature · 1 line
1.7.0.4