summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2010-10-25 10:34:50 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:24:22 -0500
commit4beeba7dc59cc10d6a47346c857d1a64a9ec9642 (patch)
tree41c4c1fb9cc2c65840f3b0beb4ef9ce329817133 /drivers/net/wireless/iwlwifi/iwl-3945.c
parentc7317e41df30c7e04dca46360e5ebb0cb36dda45 (diff)
downloadlwn-4beeba7dc59cc10d6a47346c857d1a64a9ec9642.tar.gz
lwn-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-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 176e52577673..4d7130c9b72c 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 -EAGAIN;
+
chan = le16_to_cpu(priv->contexts[IWL_RXON_CTX_BSS].active.channel);
txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1;