sm.c (8601e696a76c54b652f4db971e030a1f8dd88981) sm.c (4a688bd119d5f93d3b78af6b014d2525ba34c10f)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 3678 unchanged lines hidden (view full) ---

3687#ifdef ENABLE_LE_SECURE_CONNECTIONS
3688 // trigger ECC key generation
3689 if (ec_key_generation_state == EC_KEY_GENERATION_IDLE){
3690 sm_ec_generate_new_key();
3691 }
3692#endif
3693
3694 // restart random address updates after power cycle
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 3678 unchanged lines hidden (view full) ---

3687#ifdef ENABLE_LE_SECURE_CONNECTIONS
3688 // trigger ECC key generation
3689 if (ec_key_generation_state == EC_KEY_GENERATION_IDLE){
3690 sm_ec_generate_new_key();
3691 }
3692#endif
3693
3694 // restart random address updates after power cycle
3695 gap_random_address_set_mode(gap_random_adress_type);
3695 if (gap_random_adress_type == GAP_RANDOM_ADDRESS_TYPE_STATIC){
3696 gap_random_address_set(sm_random_address);
3697 } else {
3698 gap_random_address_set_mode(gap_random_adress_type);
3699 }
3696 break;
3697
3698 case HCI_STATE_OFF:
3699 case HCI_STATE_HALTING:
3700 log_info("SM: reset state");
3701 // stop random address update
3702 gap_random_address_update_stop();
3703 // reset state

--- 1544 unchanged lines hidden ---
3700 break;
3701
3702 case HCI_STATE_OFF:
3703 case HCI_STATE_HALTING:
3704 log_info("SM: reset state");
3705 // stop random address update
3706 gap_random_address_update_stop();
3707 // reset state

--- 1544 unchanged lines hidden ---