diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2010-10-25 10:34:50 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 19:24:22 +0100 |
commit | 4beeba7dc59cc10d6a47346c857d1a64a9ec9642 (patch) | |
tree | 41c4c1fb9cc2c65840f3b0beb4ef9ce329817133 /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | mac80211: minstrel_ht - reduce the overhead of rate sampling (diff) | |
download | linux-4beeba7dc59cc10d6a47346c857d1a64a9ec9642.tar.xz linux-4beeba7dc59cc10d6a47346c857d1a64a9ec9642.zip |
iwlwifi: warn when send tx power settings during scan
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.
v1 -> v2: replace EIO to EAGAIN
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index b207e3e9299f..ee9c582c8cf2 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"); + if (WARN_ONCE(test_bit(STATUS_SCAN_HW, &priv->status), + "TX Power requested while scanning!\n")) return -EAGAIN; - } band = priv->band == IEEE80211_BAND_2GHZ; |