diff options
-rw-r--r-- | drivers/net/ieee802154/mrf24j40.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c index 42e6deee6db5..66bb4ceaabe8 100644 --- a/drivers/net/ieee802154/mrf24j40.c +++ b/drivers/net/ieee802154/mrf24j40.c | |||
@@ -344,6 +344,8 @@ static int mrf24j40_tx(struct ieee802154_dev *dev, struct sk_buff *skb) | |||
344 | if (ret) | 344 | if (ret) |
345 | goto err; | 345 | goto err; |
346 | 346 | ||
347 | INIT_COMPLETION(devrec->tx_complete); | ||
348 | |||
347 | /* Set TXNTRIG bit of TXNCON to send packet */ | 349 | /* Set TXNTRIG bit of TXNCON to send packet */ |
348 | ret = read_short_reg(devrec, REG_TXNCON, &val); | 350 | ret = read_short_reg(devrec, REG_TXNCON, &val); |
349 | if (ret) | 351 | if (ret) |
@@ -354,8 +356,6 @@ static int mrf24j40_tx(struct ieee802154_dev *dev, struct sk_buff *skb) | |||
354 | val |= 0x4; | 356 | val |= 0x4; |
355 | write_short_reg(devrec, REG_TXNCON, val); | 357 | write_short_reg(devrec, REG_TXNCON, val); |
356 | 358 | ||
357 | INIT_COMPLETION(devrec->tx_complete); | ||
358 | |||
359 | /* Wait for the device to send the TX complete interrupt. */ | 359 | /* Wait for the device to send the TX complete interrupt. */ |
360 | ret = wait_for_completion_interruptible_timeout( | 360 | ret = wait_for_completion_interruptible_timeout( |
361 | &devrec->tx_complete, | 361 | &devrec->tx_complete, |