Skip to content

Commit 4271a9d

Browse files
author
Arto Kinnunen
authored
Merge pull request #2335 from ARMmbed/sync_with_mbedos
Sync with Mbed OS
2 parents 132cd12 + e2db6ff commit 4271a9d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

source/MAC/IEEE802_15_4/mac_header_helper_functions.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static uint8_t *mcps_mac_security_aux_header_start_pointer_get(const mac_pre_par
3232
static uint8_t *mac_header_information_elements_write(const mac_pre_build_frame_t *buffer, uint8_t *ptr);
3333

3434

35-
static uint8_t mac_fcf_lenght(const mac_fcf_sequence_t *header)
35+
static uint8_t mac_fcf_length(const mac_fcf_sequence_t *header)
3636
{
3737
uint8_t length;
3838
if (header->frameVersion == MAC_FRAME_VERSION_2015) {
@@ -298,7 +298,7 @@ static uint8_t *mac_header_write_fcf_dsn(const mac_fcf_sequence_t *header, uint8
298298
uint16_t mac_header_off_set_to_aux_header(const mac_fcf_sequence_t *fcf)
299299
{
300300
//Skip first FCF & address field
301-
uint16_t offset = mac_fcf_lenght(fcf);//Skip FCF + DSN
301+
uint16_t offset = mac_fcf_length(fcf);//Skip FCF + DSN
302302
offset += mac_dst_address_length_with_panid(fcf);
303303
offset += mac_address_length(fcf->SrcAddrMode);
304304
if (fcf->SrcPanPresents) {
@@ -351,7 +351,7 @@ static bool mac_header_pan_full_compressed(const mac_fcf_sequence_t *header)
351351

352352
static uint16_t mac_header_read_src_pan(const mac_fcf_sequence_t *header, const uint8_t *ptr)
353353
{
354-
ptr += mac_fcf_lenght(header);//Skip FCF + DSN
354+
ptr += mac_fcf_length(header);//Skip FCF + DSN
355355

356356
ptr += mac_dst_address_length_with_panid(header); //Skip Dst panID & Address
357357

@@ -360,7 +360,7 @@ static uint16_t mac_header_read_src_pan(const mac_fcf_sequence_t *header, const
360360

361361
static uint16_t mac_header_read_dst_pan(const mac_fcf_sequence_t *header, const uint8_t *ptr)
362362
{
363-
ptr += mac_fcf_lenght(header);//Skip FCF + DSN
363+
ptr += mac_fcf_length(header);//Skip FCF + DSN
364364

365365
return common_read_16_bit_inverse(ptr);
366366
}
@@ -403,7 +403,7 @@ void mac_header_get_src_address(const mac_fcf_sequence_t *header, const uint8_t
403403
return;
404404
}
405405

406-
ptr += mac_fcf_lenght(header);//Skip FCF + DSN
406+
ptr += mac_fcf_length(header);//Skip FCF + DSN
407407

408408
ptr += mac_dst_address_length_with_panid(header);
409409

@@ -430,7 +430,7 @@ void mac_header_get_dst_address(const mac_fcf_sequence_t *header, const uint8_t
430430
}
431431
uint8_t address_len, address_index, i;
432432

433-
ptr += mac_fcf_lenght(header);//Skip FCF + DSN
433+
ptr += mac_fcf_length(header);//Skip FCF + DSN
434434

435435
address_len = mac_address_length(header->DstAddrMode);
436436

source/MAC/IEEE802_15_4/mac_security_mib.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int mac_sec_mib_frame_counter_key_buffer_allocate(protocol_interface_rf_m
9090
mlme_key_descriptor_t *key_descriptor_list = rf_mac_setup->key_description_table;
9191
uint32_t *frame_counter_pointer = rf_mac_setup->key_device_frame_counter_list_buffer;
9292
for (uint8_t i = 0; i < rf_mac_setup->key_description_table_size; i++) {
93-
key_descriptor_list->KeyDeviceFrameCouterList = frame_counter_pointer;
93+
key_descriptor_list->KeyDeviceFrameCounterList = frame_counter_pointer;
9494
key_descriptor_list->KeyFrameCounterPerKey = true;
9595
key_descriptor_list->KeyFrameCounter = 0;
9696
//Update Pointers
@@ -105,7 +105,7 @@ static void mac_sec_mib_frame_counter_key_buffer_free(protocol_interface_rf_mac_
105105
{
106106
mlme_key_descriptor_t *key_descriptor_list = rf_mac_setup->key_description_table;
107107
for (uint8_t i = 0; i < rf_mac_setup->key_description_table_size; i++) {
108-
key_descriptor_list->KeyDeviceFrameCouterList = NULL;
108+
key_descriptor_list->KeyDeviceFrameCounterList = NULL;
109109
key_descriptor_list->KeyFrameCounterPerKey = false;
110110
//Update Pointers
111111
key_descriptor_list++;
@@ -368,7 +368,7 @@ int8_t mac_sec_mib_key_description_set(uint8_t atribute_index, mlme_key_descript
368368
key_ptr->KeyFrameCounter = 0;
369369
if (key_ptr->KeyDeviceListEntries == 0) {
370370
//Clear all frame counters from old possible user's
371-
uint32_t *counter_ptr = key_ptr->KeyDeviceFrameCouterList;
371+
uint32_t *counter_ptr = key_ptr->KeyDeviceFrameCounterList;
372372
for (int i = 0; i < rf_mac_setup->device_description_table_size; i++) {
373373
*counter_ptr++ = 0;
374374
}
@@ -613,7 +613,7 @@ void mac_sec_mib_key_outgoing_frame_counter_decrement(struct protocol_interface_
613613
void mac_sec_mib_key_device_frame_counter_set(mlme_key_descriptor_t *key_descpription_table, mlme_device_descriptor_t *device_info, uint32_t frame_counter, uint8_t attribute_index)
614614
{
615615
if (key_descpription_table->KeyFrameCounterPerKey) {
616-
uint32_t *counter_ptr = key_descpription_table->KeyDeviceFrameCouterList + attribute_index;
616+
uint32_t *counter_ptr = key_descpription_table->KeyDeviceFrameCounterList + attribute_index;
617617
*counter_ptr = frame_counter;
618618
} else {
619619
device_info->FrameCounter = frame_counter;
@@ -623,7 +623,7 @@ void mac_sec_mib_key_device_frame_counter_set(mlme_key_descriptor_t *key_descpri
623623
uint32_t mac_mib_key_device_frame_counter_get(mlme_key_descriptor_t *key_descpription_table, mlme_device_descriptor_t *device_info, uint8_t attribute_index)
624624
{
625625
if (key_descpription_table->KeyFrameCounterPerKey) {
626-
uint32_t *counter_ptr = key_descpription_table->KeyDeviceFrameCouterList + attribute_index;
626+
uint32_t *counter_ptr = key_descpription_table->KeyDeviceFrameCounterList + attribute_index;
627627
return *counter_ptr;
628628
}
629629
return device_info->FrameCounter;

source/MAC/IEEE802_15_4/mac_security_mib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ typedef struct mlme_key_descriptor_s {
2727
mlme_key_id_lookup_descriptor_t *KeyIdLookupList;
2828
mlme_key_device_descriptor_t *KeyDeviceList;
2929
mlme_key_usage_descriptor_t *KeyUsageList;
30-
uint32_t *KeyDeviceFrameCouterList;
30+
uint32_t *KeyDeviceFrameCounterList;
3131
uint32_t KeyFrameCounter;
3232
uint8_t Key[16];
3333
uint8_t KeyDeviceListSize;

0 commit comments

Comments
 (0)