From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/7] iwlwifi: warn when send tx power settings during scan
Date: Fri, 22 Oct 2010 08:23:05 -0700 [thread overview]
Message-ID: <1287760985.8143.0.camel@wwguy-ubuntu> (raw)
In-Reply-To: <1287759870-5758-1-git-send-email-sgruszka@redhat.com>
Hi Stanislaw,
On Fri, 2010-10-22 at 08:04 -0700, Stanislaw Gruszka wrote:
> Add WARN_ONCE when scanning is pending. Use STATUS_SCAN_HW bit since we
> can have scan canceled or completed but STATUS_SCANNING bit still set.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-3945.c | 4 ++++
> drivers/net/wireless/iwlwifi/iwl-4965.c | 10 +++-------
> drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 4 ++++
> 3 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
> index 176e525..93db6a0 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-3945.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
> @@ -1451,6 +1451,10 @@ static int iwl3945_send_tx_power(struct iwl_priv *priv)
> };
> u16 chan;
>
> + if (WARN_ONCE(test_bit(STATUS_SCAN_HW, &priv->status),
> + "TX Power requested while scanning!\n"))
> + return -EIO;
> +
> chan = le16_to_cpu(priv->contexts[IWL_RXON_CTX_BSS].active.channel);
>
> txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1;
> diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
> index b207e3e..924f335 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-4965.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
> @@ -1377,13 +1377,9 @@ static int iwl4965_send_tx_power(struct iwl_priv *priv)
> u8 ctrl_chan_high = 0;
> struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
>
> - if (test_bit(STATUS_SCANNING, &priv->status)) {
> - /* If this gets hit a lot, switch it to a BUG() and catch
> - * the stack trace to find out who is calling this during
> - * a scan. */
> - IWL_WARN(priv, "TX Power requested while scanning!\n");
> - return -EAGAIN;
> - }
> + if (WARN_ONCE(test_bit(STATUS_SCAN_HW, &priv->status),
> + "TX Power requested while scanning!\n"))
> + return -EIO;
what reason we want to return -EIO instead of -EAGAIN?
Wey
next prev parent reply other threads:[~2010-10-22 15:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 15:04 [PATCH 1/7] iwlwifi: warn when send tx power settings during scan Stanislaw Gruszka
2010-10-22 15:04 ` [PATCH 2/7] iwlwifi: send tx_power_cmd synchronously Stanislaw Gruszka
2010-10-25 14:46 ` Guy, Wey-Yi
2010-10-22 15:04 ` [PATCH 3/7] iwlwifi: fix set_tx_power vs scan Stanislaw Gruszka
2010-10-25 14:47 ` Guy, Wey-Yi
2010-10-22 15:04 ` [PATCH 4/7] iwlwifi: avoid commit rxon during scan in iwlagn_configure_filter Stanislaw Gruszka
2010-10-25 14:47 ` Guy, Wey-Yi
2010-10-22 15:04 ` [PATCH 5/7] iwlwifi: avoid commit rxon during scan in iwlagn_bt_traffic_change_work Stanislaw Gruszka
2010-10-25 14:47 ` Guy, Wey-Yi
2010-10-22 15:04 ` [PATCH 6/7] iwlwifi: defer update power mode while scan Stanislaw Gruszka
2010-10-22 15:33 ` Guy, Wey-Yi
2010-10-25 8:18 ` Stanislaw Gruszka
2010-10-25 14:47 ` Guy, Wey-Yi
2010-10-22 15:04 ` [PATCH 7/7] iwlwifi: avoid commit rxon during scan in iwl_set_no_assoc Stanislaw Gruszka
2010-10-25 14:48 ` Guy, Wey-Yi
2010-10-22 15:23 ` Guy, Wey-Yi [this message]
2010-10-25 8:34 ` [PATCH 1/7] iwlwifi: warn when send tx power settings during scan Stanislaw Gruszka
2010-10-25 14:38 ` Guy, Wey-Yi
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=1287760985.8143.0.camel@wwguy-ubuntu \
--to=wey-yi.w.guy@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=sgruszka@redhat.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.