drivers: ieee802154: cc2520: do not recalibrate rx after tx

As we use STXONCCA, RX will be stopped and reinstated afterwards.
We would be using STXON, since FRMCTRL1_SET_RXENMASK_ON_TX bit is set,
behavior would be the same.

Recalibrating the RX will uselessly abort any received frames before TX
or right after RX got reinstated. So, let's not do that and trust that
RX is anyway properly calibrated after TX.

Change-Id: Iac4fa03a175f8d139c1fc821de01caab1ec86e6b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2016-10-21 15:31:52 +02:00 committed by Jukka Rissanen
parent d5f906d493
commit 1cd4190b2f

View file

@ -457,20 +457,6 @@ static inline bool verify_tx_done(struct cc2520_context *cc2520)
return !!(status & EXCFLAG0_TX_FRM_DONE);
}
static inline void enable_reception(struct cc2520_context *cc2520)
{
/* Note: Errata document - 1.1 */
enable_fifop_interrupt(cc2520, false);
instruct_srxon(&cc2520->spi);
instruct_sflushrx(&cc2520->spi);
instruct_sflushrx(&cc2520->spi);
enable_fifop_interrupt(cc2520, true);
write_reg_excflag0(&cc2520->spi, EXCFLAG0_RESET_RX_FLAGS);
}
/****************
* RX functions *
***************/
@ -859,13 +845,10 @@ static int cc2520_tx(struct device *dev, struct net_buf *buf)
goto error;
}
enable_reception(cc2520);
return 0;
error:
atomic_set(&cc2520->tx, 0);
instruct_sflushtx(&cc2520->spi);
enable_reception(cc2520);
return -EIO;
}