move check for acl packets after state machines for CMAC, key generation, random address generation

This commit is contained in:
matthias.ringwald 2014-08-27 12:52:20 +00:00
parent d37bc63c22
commit b1bb02c964

View File

@ -855,9 +855,8 @@ static void sm_pdu_received_in_wrong_state(){
static void sm_run(void){
// assert that we can send either one
// assert that we can send at least commands
if (!hci_can_send_command_packet_now()) return;
if (!l2cap_can_send_fixed_channel_packet_now(connection->sm_handle)) return;
sm_key_t plaintext;
@ -977,6 +976,9 @@ static void sm_run(void){
break;
}
// assert that we could send a SM PDU - not needed for all of the following
if (!l2cap_can_send_fixed_channel_packet_now(connection->sm_handle)) return;
// responding state
switch (connection->sm_engine_state){