> > @@ -554,7 +543,7 @@ static void iwl_bg_scan_completed(struct > work_struct *work) > > { > > struct iwl_priv *priv = > > container_of(work, struct iwl_priv, scan_completed); > > - bool internal = false; > > + bool internal = false, aborted; > > struct iwl_rxon_context *ctx; > > > > IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); > > @@ -562,6 +551,15 @@ static void iwl_bg_scan_completed(struct > work_struct *work) > > cancel_delayed_work(&priv->scan_check); > > > > mutex_lock(&priv->mutex); > > + > > + aborted = test_and_clear_bit(STATUS_SCAN_ABORTING, &priv- > >status); > > + if (aborted) > > + IWL_DEBUG_INFO(priv, "Aborted scan completed.\n"); > > + > > + IWL_DEBUG_INFO(priv, "Setting scan to off\n"); > > + > > + clear_bit(STATUS_SCANNING, &priv->status); > > + > > if (priv->is_internal_short_scan) { > > priv->is_internal_short_scan = false; > > IWL_DEBUG_SCAN(priv, "internal short scan completed\n"); > > @@ -569,7 +567,7 @@ static void iwl_bg_scan_completed(struct > work_struct *work) > > } else if (priv->scan_request) { > > priv->scan_request = NULL; > > priv->scan_vif = NULL; > > - ieee80211_scan_completed(priv->hw, false); > > + ieee80211_scan_completed(priv->hw, aborted); > > } > > > > if (test_bit(STATUS_EXIT_PENDING, &priv->status)) > > Not too sure about the flow, just asking is it ok to do all thses > before check "STATUS_EXIT_PENFING"? I believe it's necessary, because otherwise in the exit pending case we will never complete with mac80211. johannes -------------------------------------------------------------------------------------- Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html