Commit e65054b6 authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville

ipw2200: restart adapter only when abort_scan doesn't work

When a scan watchdog is fired, try to send abort scan command
first before restarting the adapter. This avoids reconnection for
some users when scan hang is detected.

This fixed bug https://bugzilla.kernel.org/show_bug.cgi?id=15419Reported-by: default avatarMaurizio Avogadro <mavoga@gmail.com>
Tested-by: default avatarMaurizio Avogadro <mavoga@gmail.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9f01a84e
......@@ -2348,16 +2348,25 @@ static void ipw_bg_adapter_restart(struct work_struct *work)
mutex_unlock(&priv->mutex);
}
static void ipw_abort_scan(struct ipw_priv *priv);
#define IPW_SCAN_CHECK_WATCHDOG (5 * HZ)
static void ipw_scan_check(void *data)
{
struct ipw_priv *priv = data;
if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) {
if (priv->status & STATUS_SCAN_ABORTING) {
IPW_DEBUG_SCAN("Scan completion watchdog resetting "
"adapter after (%dms).\n",
jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG));
queue_work(priv->workqueue, &priv->adapter_restart);
} else if (priv->status & STATUS_SCANNING) {
IPW_DEBUG_SCAN("Scan completion watchdog aborting scan "
"after (%dms).\n",
jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG));
ipw_abort_scan(priv);
queue_delayed_work(priv->workqueue, &priv->scan_check, HZ);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment