mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 19:20:54 +00:00
move check for acl packets after state machines for CMAC, key generation, random address generation
This commit is contained in:
parent
d37bc63c22
commit
b1bb02c964
6
ble/sm.c
6
ble/sm.c
@ -855,9 +855,8 @@ static void sm_pdu_received_in_wrong_state(){
|
|||||||
|
|
||||||
static void sm_run(void){
|
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 (!hci_can_send_command_packet_now()) return;
|
||||||
if (!l2cap_can_send_fixed_channel_packet_now(connection->sm_handle)) return;
|
|
||||||
|
|
||||||
sm_key_t plaintext;
|
sm_key_t plaintext;
|
||||||
|
|
||||||
@ -977,6 +976,9 @@ static void sm_run(void){
|
|||||||
break;
|
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
|
// responding state
|
||||||
switch (connection->sm_engine_state){
|
switch (connection->sm_engine_state){
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user