diff options
author | Nicholas Mc Guire <der.herr@hofr.at> | 2015-01-20 00:26:17 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-23 14:37:04 -0500 |
commit | 961d1bbecf33de0321cc59f0ea16dd517ecbf3fb (patch) | |
tree | e8824912be55b4c5c95cceefe146737a381bf0eb /drivers/net/wireless/p54 | |
parent | 5b4c6b4f0b2778351c5bef74888a5fbdfbdd0ef5 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r-- | drivers/net/wireless/p54/p54pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index d4aee64fb5ea..27a49068d32d 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
@@ -431,6 +431,7 @@ static int p54p_open(struct ieee80211_hw *dev) | |||
431 | { | 431 | { |
432 | struct p54p_priv *priv = dev->priv; | 432 | struct p54p_priv *priv = dev->priv; |
433 | int err; | 433 | int err; |
434 | long timeout; | ||
434 | 435 | ||
435 | init_completion(&priv->boot_comp); | 436 | init_completion(&priv->boot_comp); |
436 | err = request_irq(priv->pdev->irq, p54p_interrupt, | 437 | err = request_irq(priv->pdev->irq, p54p_interrupt, |
@@ -468,10 +469,12 @@ static int p54p_open(struct ieee80211_hw *dev) | |||
468 | P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); | 469 | P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); |
469 | P54P_READ(dev_int); | 470 | P54P_READ(dev_int); |
470 | 471 | ||
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) { | ||
472 | wiphy_err(dev->wiphy, "Cannot boot firmware!\n"); | 475 | wiphy_err(dev->wiphy, "Cannot boot firmware!\n"); |
473 | p54p_stop(dev); | 476 | p54p_stop(dev); |
474 | return -ETIMEDOUT; | 477 | return timeout ? -ERESTARTSYS : -ETIMEDOUT; |
475 | } | 478 | } |
476 | 479 | ||
477 | P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE)); | 480 | P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE)); |