From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: Keith Packard <keithp@keithp.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iwlagn: check for !priv->txq in iwlagn_wait_tx_queue_empty
Date: Mon, 25 Jul 2011 12:21:55 -0700 [thread overview]
Message-ID: <1311621715.5579.138.camel@wwguy-huron> (raw)
In-Reply-To: <1311622702-4807-1-git-send-email-keithp@keithp.com>
On Mon, 2011-07-25 at 12:38 -0700, Keith Packard wrote:
> If the interface is down, txq is NULL. iwlagn_wait_tx_queue_empty
> needs to check for this case to avoid dereferencing that pointer.
>
> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---
>
> This is on top of v3.0
>
> drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> index f803fb6..d6ae444 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> @@ -1487,6 +1487,9 @@ int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv)
> unsigned long now = jiffies;
> int ret = 0;
>
> + if (!priv->txq)
> + return 0;
> +
> /* waiting for all the tx frames complete might take a while */
> for (cnt = 0; cnt < priv->hw_params.max_txq_num; cnt++) {
> if (cnt == priv->cmd_queue)
but why you need it?, "start device" call will fail if can not allocate
priv->txq
Thanks
Wey
next prev parent reply other threads:[~2011-07-25 19:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-25 19:38 [PATCH] iwlagn: check for !priv->txq in iwlagn_wait_tx_queue_empty Keith Packard
2011-07-25 19:21 ` Guy, Wey-Yi [this message]
2011-07-25 20:03 ` Keith Packard
2011-07-25 20:59 ` wwguy
2011-07-26 6:45 ` Keith Packard
2011-07-26 13:22 ` Guy, Wey-Yi
2011-07-30 0:52 ` Keith Packard
2011-07-25 19:36 ` wwguy
2011-07-25 19:43 ` Keith Packard
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=1311621715.5579.138.camel@wwguy-huron \
--to=wey-yi.w.guy@intel.com \
--cc=ilw@linux.intel.com \
--cc=keithp@keithp.com \
--cc=linux-kernel@vger.kernel.org \
--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.