aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/htc_hst.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-04-06 05:58:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-08 15:24:11 -0400
commitf984d94c500c79048b33ab14923dfcec336d9968 (patch)
tree3a955bb6f52f2824de4b3bf819e71992a18e54fe /drivers/net/wireless/ath/ath9k/htc_hst.c
parent6f0f2669f508fb239a0f589a8b453dbe22112bf9 (diff)
ath9k_htc: Fix HTC layer memleak
Messages that are generated by the HTC layer don't have any TX callback endpoints assigned to them. Consequently, the allocated SKBs are never freed. Fix this issue by handling this case in the HTC layer itself. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_hst.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_hst.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 30f608bfc56..24d7b886fe2 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -326,11 +326,13 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,
326 if (htc_handle->htc_flags & HTC_OP_CONFIG_PIPE_CREDITS) { 326 if (htc_handle->htc_flags & HTC_OP_CONFIG_PIPE_CREDITS) {
327 complete(&htc_handle->cmd_wait); 327 complete(&htc_handle->cmd_wait);
328 htc_handle->htc_flags &= ~HTC_OP_CONFIG_PIPE_CREDITS; 328 htc_handle->htc_flags &= ~HTC_OP_CONFIG_PIPE_CREDITS;
329 goto ret;
329 } 330 }
330 331
331 if (htc_handle->htc_flags & HTC_OP_START_WAIT) { 332 if (htc_handle->htc_flags & HTC_OP_START_WAIT) {
332 complete(&htc_handle->cmd_wait); 333 complete(&htc_handle->cmd_wait);
333 htc_handle->htc_flags &= ~HTC_OP_START_WAIT; 334 htc_handle->htc_flags &= ~HTC_OP_START_WAIT;
335 goto ret;
334 } 336 }
335 337
336 if (skb) { 338 if (skb) {
@@ -343,6 +345,11 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,
343 htc_hdr->endpoint_id, txok); 345 htc_hdr->endpoint_id, txok);
344 } 346 }
345 } 347 }
348
349 return;
350ret:
351 /* HTC-generated packets are freed here. */
352 dev_kfree_skb_any(skb);
346} 353}
347 354
348/* 355/*