提交 672ddeff 编写于 作者: J Johannes Berg 提交者: John W. Linville

iwlwifi: do not spuriously call ieee80211_scan_completed

When a scan is aborted because the corresponding
virtual interface is removed, we may still later
attempt to tell mac80211 that the scan completed.
This is obviously wrong, since we already told it
that it was aborted, so don't do that.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 54c8067a
......@@ -508,6 +508,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 scan_completed = false;
IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");
......@@ -518,7 +519,8 @@ static void iwl_bg_scan_completed(struct work_struct *work)
priv->is_internal_short_scan = false;
IWL_DEBUG_SCAN(priv, "internal short scan completed\n");
internal = true;
} else {
} else if (priv->scan_request) {
scan_completed = true;
priv->scan_request = NULL;
priv->scan_vif = NULL;
}
......@@ -549,7 +551,7 @@ static void iwl_bg_scan_completed(struct work_struct *work)
* into driver again into functions that will attempt to take
* mutex.
*/
if (!internal)
if (scan_completed)
ieee80211_scan_completed(priv->hw, false);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册