All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] iwlwifi: zero fill txq->txb on queue reset
Date: Mon, 14 Feb 2011 15:53:39 +0100	[thread overview]
Message-ID: <1297695219.3953.5.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1297693999-15342-1-git-send-email-sgruszka@redhat.com>

On Mon, 2011-02-14 at 15:33 +0100, Stanislaw Gruszka wrote:
> We allocate txq->txb area with kzalloc, but when reseting queue
> during __iwl_down / __iwl_up we we leave old values, let's zero
> initialize in such case as well.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  drivers/net/wireless/iwlwifi/iwl-tx.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
> index a8935cd..0c8555c 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-tx.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
> @@ -418,6 +418,8 @@ void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq,
>  
>  	if (txq_id == priv->cmd_queue)
>  		actual_slots++;
> +	else
> +		memset(txq->txb, 0, sizeof(txq->txb[0]) * TFD_QUEUE_SIZE_MAX);

I don't mind -- but I think the changelog should say that this isn't
necessary since the device will never use any of those entries?

johannes


  reply	other threads:[~2011-02-14 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 14:33 [PATCH] iwlwifi: zero fill txq->txb on queue reset Stanislaw Gruszka
2011-02-14 14:53 ` Johannes Berg [this message]
2011-02-14 14:55   ` Johannes Berg
2011-02-15 11:39     ` Stanislaw Gruszka
2011-02-15 11:48       ` Johannes Berg
2011-02-15 13:06         ` Stanislaw Gruszka

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=1297695219.3953.5.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ilw@linux.intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.com \
    --cc=wey-yi.w.guy@intel.com \
    /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.