Because the 'is_tx = 0' can not be moved in the whole handler thanks to a probable race involving the delay in switching to STATE_RX_AACK_ON plus a new interrupt, we introduce an intermediate 'was_tx' boolean just for this purpose. There is absolutely no Fixes tag applying here, lots of improvements https://charlesl913jll7.wikibriefing.com/user