Subject: [PATCH] ath6kl: Remove unnecessary retrieval of first list entry in ath6kl_htc_tx_setup_scat_list()

It is unnecessary to take the first list entry from queue again for
transmission. Sometimes it may look racy when the head of the list
changes between subsequent retrival, but should not happen in
practical.

Reported-by: Jouni Malinen <[email protected]>
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/htc.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 9aa2e44..feed985 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -389,7 +389,6 @@ static int ath6kl_htc_tx_setup_scat_list(struct htc_target *target,

rem_scat -= len;
/* now remove it from the queue */
- packet = list_first_entry(queue, struct htc_packet, list);
list_del(&packet->list);

scat_req->scat_list[i].packet = packet;
--
1.7.0.4



2011-09-27 07:21:52

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath6kl: Remove unnecessary retrieval of first list entry in ath6kl_htc_tx_setup_scat_list()

On 09/26/2011 12:19 PM, Vasanthakumar Thiagarajan wrote:
> It is unnecessary to take the first list entry from queue again for
> transmission. Sometimes it may look racy when the head of the list
> changes between subsequent retrival, but should not happen in
> practical.

Thanks, applied.

Kalle