iwlwifi: clear STATUS_SCAN_HW when PAN_PARAMS fails
authorIlan Peer <ilan.peer@intel.com>
Thu, 17 May 2012 09:42:59 +0000 (12:42 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Jun 2012 11:08:41 +0000 (13:08 +0200)
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>
drivers/net/wireless/iwlwifi/iwl-scan.c

index 069849e6623430f6138c844280be7c658970b70d..a32b35ea9e609df82dbcb1cdacf2906a063aa069 100644 (file)
@@ -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) {