@@ -553,7 +553,7 @@ static uint8_t ws_generate_exluded_channel_list_from_active_channels(ws_excluded
553
553
memset (excluded_data , 0 , sizeof (ws_excluded_channel_data_t ));
554
554
555
555
for (uint8_t i = 0 ; i < number_of_channels ; i ++ ) {
556
- if (!(global_channel_mask [0 + ( i / 32 ) ] & (1U << (i % 32 )))) {
556
+ if (!(global_channel_mask [i / 32 ] & (1U << (i % 32 )))) {
557
557
//Global exluded channel
558
558
if (active_range ) {
559
559
//Mark range stop here
@@ -562,15 +562,15 @@ static uint8_t ws_generate_exluded_channel_list_from_active_channels(ws_excluded
562
562
continue ;
563
563
}
564
564
565
- if (selected_channel_mask [0 + ( i / 32 ) ] & (1U << (i % 32 ))) {
565
+ if (selected_channel_mask [i / 32 ] & (1U << (i % 32 ))) {
566
566
if (active_range ) {
567
567
//Mark range stop here
568
568
active_range = false;
569
569
}
570
570
} else {
571
571
//Mark excluded channel
572
572
//Swap Order already here
573
- excluded_data -> channel_mask [ 0 + ( i / 32 ) ] |= 1U << (31 - (i % 32 ));
573
+ excluded_data -> channel_mask [i / 32 ] |= 1U << (31 - (i % 32 ));
574
574
excluded_data -> excluded_channel_count ++ ;
575
575
576
576
if (excluded_data -> excluded_range_length < WS_EXCLUDED_MAX_RANGE_TO_SEND ) {
@@ -1359,7 +1359,7 @@ static void ws_bootstrap_decode_exclude_range_to_mask_by_range(void *mask_buffer
1359
1359
}
1360
1360
if (channel >= range_start && channel <= range_stop ) {
1361
1361
//mask_ptr[mask_index] |= 1U << (31 - channel_index);
1362
- mask_ptr [0 + ( channel / 32 ) ] |= 1U << (31 - (channel % 32 ));
1362
+ mask_ptr [channel / 32 ] |= 1U << (31 - (channel % 32 ));
1363
1363
} else if (channel > range_stop ) {
1364
1364
break ;
1365
1365
}
@@ -3506,7 +3506,7 @@ static void ws_set_asynch_channel_list(protocol_interface_info_entry_t *cur, asy
3506
3506
if (cur -> ws_info -> cfg -> fhss .fhss_uc_channel_function == WS_FIXED_CHANNEL ) {
3507
3507
//SET 1 Channel only
3508
3508
uint16_t channel_number = cur -> ws_info -> cfg -> fhss .fhss_uc_fixed_channel ;
3509
- async_req -> channel_list .channel_mask [0 + ( channel_number / 32 ) ] = 1U << (channel_number % 32 );
3509
+ async_req -> channel_list .channel_mask [channel_number / 32 ] = 1U << (channel_number % 32 );
3510
3510
} else {
3511
3511
ws_generate_channel_list (async_req -> channel_list .channel_mask , cur -> ws_info -> hopping_schdule .number_of_channels , cur -> ws_info -> hopping_schdule .regulatory_domain , cur -> ws_info -> hopping_schdule .operating_class , cur -> ws_info -> hopping_schdule .channel_plan_id );
3512
3512
}
0 commit comments