p54pci: add handling of signal case
if(!wait_for_completion_interruptible_timeout(...)) only handles the timeout case - this patch adds handling the signal case the same as timeout. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Родитель
5b4c6b4f0b
Коммит
961d1bbecf
|
@ -431,6 +431,7 @@ static int p54p_open(struct ieee80211_hw *dev)
|
||||||
{
|
{
|
||||||
struct p54p_priv *priv = dev->priv;
|
struct p54p_priv *priv = dev->priv;
|
||||||
int err;
|
int err;
|
||||||
|
long timeout;
|
||||||
|
|
||||||
init_completion(&priv->boot_comp);
|
init_completion(&priv->boot_comp);
|
||||||
err = request_irq(priv->pdev->irq, p54p_interrupt,
|
err = request_irq(priv->pdev->irq, p54p_interrupt,
|
||||||
|
@ -468,10 +469,12 @@ static int p54p_open(struct ieee80211_hw *dev)
|
||||||
P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
|
P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
|
||||||
P54P_READ(dev_int);
|
P54P_READ(dev_int);
|
||||||
|
|
||||||
if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
|
timeout = wait_for_completion_interruptible_timeout(
|
||||||
|
&priv->boot_comp, HZ);
|
||||||
|
if (timeout <= 0) {
|
||||||
wiphy_err(dev->wiphy, "Cannot boot firmware!\n");
|
wiphy_err(dev->wiphy, "Cannot boot firmware!\n");
|
||||||
p54p_stop(dev);
|
p54p_stop(dev);
|
||||||
return -ETIMEDOUT;
|
return timeout ? -ERESTARTSYS : -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
|
P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче