@@ -172,7 +172,9 @@ static bool thread_parent_discover_timeout_cb(int8_t interface_id, uint16_t msgI
172172 thread_management_key_sets_calc (cur , linkConfiguration , cur -> thread_info -> thread_attach_scanned_parent -> keySequence );
173173 thread_calculate_key_guard_timer (cur , linkConfiguration , true);
174174
175- mac_helper_devicetable_set (entry_temp , cur , parent -> linLayerFrameCounter , mac_helper_default_key_index_get (cur ));
175+ mlme_device_descriptor_t device_desc ;
176+ mac_helper_device_description_write (cur , & device_desc , entry_temp -> mac64 , entry_temp -> short_adr ,parent -> linLayerFrameCounter , false);
177+ mac_helper_devicetable_set (& device_desc , cur ,entry_temp -> attribute_index , mac_helper_default_key_index_get (cur ));
176178 mle_entry_timeout_update (entry_temp , THREAD_DEFAULT_LINK_LIFETIME );
177179
178180 if (cur -> thread_info -> thread_device_mode == THREAD_DEVICE_MODE_SLEEPY_END_DEVICE ) {
@@ -343,7 +345,10 @@ static int thread_end_device_synch_response_validate(protocol_interface_info_ent
343345
344346 mac_helper_coordinator_address_set (cur , ADDR_802_15_4_SHORT , shortAddress );
345347 mle_entry_timeout_update (entry_temp , thread_info (cur )-> host_link_timeout );
346- mac_helper_devicetable_set (entry_temp , cur , llFrameCounter , securityHeader -> KeyIndex );
348+
349+ mlme_device_descriptor_t device_desc ;
350+ mac_helper_device_description_write (cur , & device_desc , entry_temp -> mac64 , entry_temp -> short_adr ,llFrameCounter , false);
351+ mac_helper_devicetable_set (& device_desc , cur , entry_temp -> attribute_index , securityHeader -> KeyIndex );
347352
348353 thread_info (cur )-> thread_attached_state = THREAD_STATE_CONNECTED ;
349354 thread_bootstrap_update_ml16_address (cur , address16 );
@@ -832,7 +837,10 @@ static void thread_mle_child_request_receive_cb(int8_t interface_id, mle_message
832837
833838 mac_helper_coordinator_address_set (cur , ADDR_802_15_4_SHORT , shortAddress );
834839 mle_entry_timeout_update (entry_temp , thread_info (cur )-> host_link_timeout );
835- mac_helper_devicetable_set (entry_temp , cur , scan_result -> linLayerFrameCounter , security_headers -> KeyIndex );
840+
841+ mlme_device_descriptor_t device_desc ;
842+ mac_helper_device_description_write (cur , & device_desc , entry_temp -> mac64 , entry_temp -> short_adr ,scan_result -> linLayerFrameCounter , false);
843+ mac_helper_devicetable_set (& device_desc , cur , entry_temp -> attribute_index , security_headers -> KeyIndex );
836844
837845 thread_info (cur )-> thread_attached_state = THREAD_STATE_CONNECTED ;
838846
@@ -941,7 +949,9 @@ void thread_endevice_synch_start(protocol_interface_info_entry_t *cur)
941949 mle_entry_timeout_update (entry_temp , 20 );
942950
943951 // Add the parent to the MAC table (for e.g. secured/fragmented Child Update Response)
944- mac_helper_devicetable_set (entry_temp , cur , 0 , cur -> mac_parameters -> mac_default_key_index );
952+ mlme_device_descriptor_t device_desc ;
953+ mac_helper_device_description_write (cur , & device_desc , entry_temp -> mac64 , entry_temp -> short_adr ,0 , false);
954+ mac_helper_devicetable_set (& device_desc , cur , entry_temp -> attribute_index , cur -> mac_parameters -> mac_default_key_index );
945955 }
946956 }
947957
0 commit comments