FoE: fix state transition when busy during read. Not working.

This commit is contained in:
Dave Page 2014-01-22 13:00:52 +13:00
parent 9412326b8b
commit b4b0474762
1 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,7 @@
// uint8_t reserved
// uint32_t PacketNo, Password, ErrorCode
//#define DEBUG_FOE
#define DEBUG_FOE
/*****************************************************************************/
@ -774,6 +774,7 @@ void ec_fsm_foe_state_data_read(
if (ec_foe_prepare_send_ack(fsm, datagram)) {
ec_foe_set_rx_error(fsm, FOE_PROT_ERROR);
}
fsm->state = ec_fsm_foe_state_sent_ack;
return;
}
@ -886,7 +887,7 @@ void ec_fsm_foe_state_sent_ack(
fsm->state = ec_fsm_foe_end;
}
else {
fsm->rx_expected_packet_no++;
fsm->rx_expected_packet_no++; // this should not be incremented when BUSY
fsm->retries = EC_FSM_RETRIES;
fsm->state = ec_fsm_foe_state_data_check;
}