All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: <kvalo@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>, <ath6kl-devel@qualcomm.com>
Subject: Re: [PATCH 2/2] ath6kl: Complete failed tx packet in ath6kl_htc_tx_from_queue()
Date: Tue, 22 May 2012 12:55:12 +0530	[thread overview]
Message-ID: <4FBB3F58.2080104@qca.qualcomm.com> (raw)
In-Reply-To: <1337671370-32519-3-git-send-email-vthiagar@qca.qualcomm.com>


Oops, please forget this crap, mistakenly sent the older patches.
I'm really sorry.

Vasanth

On Tuesday 22 May 2012 12:52 PM, Vasanthakumar Thiagarajan wrote:
> Return status of ath6kl_htc_tx_issue() is ignored in
> ath6kl_htc_tx_from_queue(), but failed tx packet is
> is not cleaned up. To fix memory leak in this case, call
> completion with error. Also, throw an error debug message
> when tx fails in ath6kl_sdio_write_async() due to shortage
> in bus request buffer.
>
> Signed-off-by: Vasanthakumar Thiagarajan<vthiagar@qca.qualcomm.com>
> ---
>   drivers/net/wireless/ath/ath6kl/htc_mbox.c |    8 +++++++-
>   drivers/net/wireless/ath/ath6kl/sdio.c     |    4 +++-
>   2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
> index 65310d5..8729803 100644
> --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
> +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
> @@ -850,6 +850,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
>   	int bundle_sent;
>   	int n_pkts_bundle;
>   	u8 ac = WMM_NUM_AC;
> +	int status;
>
>   	spin_lock_bh(&target->tx_lock);
>
> @@ -911,7 +912,12 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
>
>   			ath6kl_htc_tx_prep_pkt(packet, packet->info.tx.flags,
>   					       0, packet->info.tx.seqno);
> -			ath6kl_htc_tx_issue(target, packet);
> +			status = ath6kl_htc_tx_issue(target, packet);
> +
> +			if (status) {
> +				packet->status = status;
> +				packet->completion(packet->context, packet);
> +			}
>   		}
>
>   		spin_lock_bh(&target->tx_lock);
> diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
> index 0384a0f..efe083f 100644
> --- a/drivers/net/wireless/ath/ath6kl/sdio.c
> +++ b/drivers/net/wireless/ath/ath6kl/sdio.c
> @@ -552,8 +552,10 @@ static int ath6kl_sdio_write_async(struct ath6kl *ar, u32 address, u8 *buffer,
>
>   	bus_req = ath6kl_sdio_alloc_busreq(ar_sdio);
>
> -	if (!bus_req)
> +	if (!bus_req) {
> +		ath6kl_err("Ran out of bus request buffer for tx\n");
>   		return -ENOMEM;
> +	}
>
>   	bus_req->address = address;
>   	bus_req->buffer = buffer;

  reply	other threads:[~2012-05-22  7:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22  7:22 [PATCH] ath6kl: Fix missing gpio pin 9 configuration Vasanthakumar Thiagarajan
2012-05-22  7:22 ` [PATCH 1/2] ath6kl: Update netstats for some of the tx failrues in ath6kl_data_tx() Vasanthakumar Thiagarajan
2012-05-22  7:22 ` [PATCH 2/2] ath6kl: Complete failed tx packet in ath6kl_htc_tx_from_queue() Vasanthakumar Thiagarajan
2012-05-22  7:25   ` Vasanthakumar Thiagarajan [this message]
2012-05-22 12:28     ` Kalle Valo
2012-05-23  7:16 ` [PATCH] ath6kl: Fix missing gpio pin 9 configuration Vasanthakumar Thiagarajan
2012-05-23  7:18   ` Kalle Valo
2012-05-24  7:13 ` Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2012-04-26 14:56 [PATCH 1/2] ath6kl: Update netstats for some of the tx failrues in ath6kl_data_tx() Vasanthakumar Thiagarajan
2012-04-26 14:56 ` [PATCH 2/2] ath6kl: Complete failed tx packet in ath6kl_htc_tx_from_queue() Vasanthakumar Thiagarajan
2012-04-26 18:21   ` Kalle Valo
2012-04-27  4:09     ` Vasanthakumar Thiagarajan
2012-04-27  6:34       ` Kalle Valo
2012-04-27  6:52         ` Vasanthakumar Thiagarajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBB3F58.2080104@qca.qualcomm.com \
    --to=vthiagar@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.