Skip to content

Commit 961d1bb

Browse files
hofratKalle Valo
authored andcommitted
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>
1 parent 5b4c6b4 commit 961d1bb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎drivers/net/wireless/p54/p54pci.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ static int p54p_open(struct ieee80211_hw *dev)
431431
{
432432
struct p54p_priv *priv = dev->priv;
433433
int err;
434+
long timeout;
434435

435436
init_completion(&priv->boot_comp);
436437
err = request_irq(priv->pdev->irq, p54p_interrupt,
@@ -468,10 +469,12 @@ static int p54p_open(struct ieee80211_hw *dev)
468469
P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
469470
P54P_READ(dev_int);
470471

471-
if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
472+
timeout = wait_for_completion_interruptible_timeout(
473+
&priv->boot_comp, HZ);
474+
if (timeout <= 0) {
472475
wiphy_err(dev->wiphy, "Cannot boot firmware!\n");
473476
p54p_stop(dev);
474-
return -ETIMEDOUT;
477+
return timeout ? -ERESTARTSYS : -ETIMEDOUT;
475478
}
476479

477480
P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));

0 commit comments

Comments
 (0)