summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2012-05-17 12:42:59 +0300
committerJohannes Berg <johannes.berg@intel.com>2012-06-06 13:08:41 +0200
commit76a3aa89937cf0b9a560e4c778e54e993018da60 (patch)
treec8c1610b1c16fa1a704c5dd1c073fed9f352652d
parent53e1116ebd3c0bab4d6daf0da4492f813b778cf8 (diff)
downloadop-kernel-dev-76a3aa89937cf0b9a560e4c778e54e993018da60.zip
op-kernel-dev-76a3aa89937cf0b9a560e4c778e54e993018da60.tar.gz
iwlwifi: clear STATUS_SCAN_HW when PAN_PARAMS fails
The STATUS_SCAN_HW is set before calling iwlagn_set_pan_params (used as an input to calculate slot time allocation). The bit needs to be cleared in case sending the command fails. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 069849e..a32b35e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -966,8 +966,10 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
set_bit(STATUS_SCAN_HW, &priv->status);
ret = iwlagn_set_pan_params(priv);
- if (ret)
+ if (ret) {
+ clear_bit(STATUS_SCAN_HW, &priv->status);
return ret;
+ }
ret = iwl_dvm_send_cmd(priv, &cmd);
if (ret) {
OpenPOWER on IntegriCloud