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>
This commit is contained in:
parent
c0719334bf
commit
5b4c6b4f0b
1 changed files with 6 additions and 3 deletions
|
@ -220,6 +220,7 @@ int p54_download_eeprom(struct p54_common *priv, void *buf,
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
size_t eeprom_hdr_size;
|
size_t eeprom_hdr_size;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
long timeout;
|
||||||
|
|
||||||
if (priv->fw_var >= 0x509)
|
if (priv->fw_var >= 0x509)
|
||||||
eeprom_hdr_size = sizeof(*eeprom_hdr);
|
eeprom_hdr_size = sizeof(*eeprom_hdr);
|
||||||
|
@ -249,9 +250,11 @@ int p54_download_eeprom(struct p54_common *priv, void *buf,
|
||||||
|
|
||||||
p54_tx(priv, skb);
|
p54_tx(priv, skb);
|
||||||
|
|
||||||
if (!wait_for_completion_interruptible_timeout(
|
timeout = wait_for_completion_interruptible_timeout(
|
||||||
&priv->eeprom_comp, HZ)) {
|
&priv->eeprom_comp, HZ);
|
||||||
wiphy_err(priv->hw->wiphy, "device does not respond!\n");
|
if (timeout <= 0) {
|
||||||
|
wiphy_err(priv->hw->wiphy,
|
||||||
|
"device does not respond or signal received!\n");
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
}
|
}
|
||||||
priv->eeprom = NULL;
|
priv->eeprom = NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue