diff options
author | Nicholas Mc Guire <der.herr@hofr.at> | 2015-01-20 00:25:43 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-23 14:33:42 -0500 |
commit | 5b4c6b4f0b2778351c5bef74888a5fbdfbdd0ef5 (patch) | |
tree | d4192dc46318109852402964ec2753c715d70e32 /drivers/net/wireless/p54 | |
parent | c0719334bf0b4d72fc0d22c484c698eec2a95c6d (diff) |
p54: add handling of the 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/fwio.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c index bc065e8e348b..5367d510b22d 100644 --- a/drivers/net/wireless/p54/fwio.c +++ b/drivers/net/wireless/p54/fwio.c | |||
@@ -220,6 +220,7 @@ int p54_download_eeprom(struct p54_common *priv, void *buf, | |||
220 | struct sk_buff *skb; | 220 | struct sk_buff *skb; |
221 | size_t eeprom_hdr_size; | 221 | size_t eeprom_hdr_size; |
222 | int ret = 0; | 222 | int ret = 0; |
223 | long timeout; | ||
223 | 224 | ||
224 | if (priv->fw_var >= 0x509) | 225 | if (priv->fw_var >= 0x509) |
225 | eeprom_hdr_size = sizeof(*eeprom_hdr); | 226 | eeprom_hdr_size = sizeof(*eeprom_hdr); |
@@ -249,9 +250,11 @@ int p54_download_eeprom(struct p54_common *priv, void *buf, | |||
249 | 250 | ||
250 | p54_tx(priv, skb); | 251 | p54_tx(priv, skb); |
251 | 252 | ||
252 | if (!wait_for_completion_interruptible_timeout( | 253 | timeout = wait_for_completion_interruptible_timeout( |
253 | &priv->eeprom_comp, HZ)) { | 254 | &priv->eeprom_comp, HZ); |
254 | wiphy_err(priv->hw->wiphy, "device does not respond!\n"); | 255 | if (timeout <= 0) { |
256 | wiphy_err(priv->hw->wiphy, | ||
257 | "device does not respond or signal received!\n"); | ||
255 | ret = -EBUSY; | 258 | ret = -EBUSY; |
256 | } | 259 | } |
257 | priv->eeprom = NULL; | 260 | priv->eeprom = NULL; |