mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
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=15419 Reported-by: Maurizio Avogadro <mavoga@gmail.com> Tested-by: Maurizio Avogadro <mavoga@gmail.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9f01a84e81
commit
e65054b64f
@ -2348,16 +2348,25 @@ static void ipw_bg_adapter_restart(struct work_struct *work)
|
||||
mutex_unlock(&priv->mutex);
|
||||
}
|
||||
|
||||
#define IPW_SCAN_CHECK_WATCHDOG (5 * HZ)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user