mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 08:40:37 +02:00
atusb/fw/mac.c (do_tx): add timeout for transition to TRX_STATUS_RX_[AACK_]ON
This commit is contained in:
parent
cd566129ec
commit
c9ab070ffd
@ -135,10 +135,19 @@ int mac_rx(int on)
|
||||
|
||||
static void do_tx(void *user)
|
||||
{
|
||||
uint16_t timeout = 0xffff;
|
||||
uint8_t status;
|
||||
uint8_t i;
|
||||
|
||||
do status = reg_read(REG_TRX_STATUS) & TRX_STATUS_MASK;
|
||||
/*
|
||||
* If we time out here, the host driver will time out waiting for the
|
||||
* TRX_END acknowledgement.
|
||||
*/
|
||||
do {
|
||||
if (!--timeout)
|
||||
return;
|
||||
status = reg_read(REG_TRX_STATUS) & TRX_STATUS_MASK;
|
||||
}
|
||||
while (status != TRX_STATUS_RX_ON && status != TRX_STATUS_RX_AACK_ON);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user