@@ -2393,6 +2393,19 @@ void ws_bootstrap_configuration_trickle_reset(protocol_interface_info_entry_t *c
2393
2393
trickle_inconsistent_heard (& cur -> ws_info -> trickle_pan_config , & cur -> ws_info -> trickle_params_pan_discovery );
2394
2394
}
2395
2395
2396
+ static void ws_set_asynch_channel_list (protocol_interface_info_entry_t * cur , asynch_request_t * async_req )
2397
+ {
2398
+ memset (& async_req -> channel_list , 0 , sizeof (channel_list_s ));
2399
+ if (cur -> ws_info -> fhss_uc_channel_function == WS_FIXED_CHANNEL ) {
2400
+ //SET 1 Channel only
2401
+ uint16_t channel_number = cur -> ws_info -> fhss_uc_fixed_channel ;
2402
+ async_req -> channel_list .channel_mask [0 + (channel_number / 32 )] = (1 << (channel_number % 32 ));
2403
+ } else {
2404
+ 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 );
2405
+ }
2406
+
2407
+ async_req -> channel_list .channel_page = CHANNEL_PAGE_10 ;
2408
+ }
2396
2409
2397
2410
static void ws_bootstrap_pan_advert_solicit (protocol_interface_info_entry_t * cur )
2398
2411
{
@@ -2404,9 +2417,9 @@ static void ws_bootstrap_pan_advert_solicit(protocol_interface_info_entry_t *cur
2404
2417
async_req .wp_requested_nested_ie_list .us_ie = true;
2405
2418
async_req .wp_requested_nested_ie_list .net_name_ie = true;
2406
2419
2407
- 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 );
2420
+ ws_set_asynch_channel_list (cur , & async_req );
2421
+
2408
2422
2409
- async_req .channel_list .channel_page = CHANNEL_PAGE_10 ;
2410
2423
async_req .security .SecurityLevel = 0 ;
2411
2424
2412
2425
ws_llc_asynch_request (cur , & async_req );
@@ -2422,9 +2435,7 @@ static void ws_bootstrap_pan_config_solicit(protocol_interface_info_entry_t *cur
2422
2435
async_req .wp_requested_nested_ie_list .us_ie = true;
2423
2436
async_req .wp_requested_nested_ie_list .net_name_ie = true;
2424
2437
2425
- 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 );
2426
-
2427
- async_req .channel_list .channel_page = CHANNEL_PAGE_10 ;
2438
+ ws_set_asynch_channel_list (cur , & async_req );
2428
2439
async_req .security .SecurityLevel = 0 ;
2429
2440
2430
2441
ws_llc_asynch_request (cur , & async_req );
@@ -2501,9 +2512,7 @@ static void ws_bootstrap_pan_advert(protocol_interface_info_entry_t *cur)
2501
2512
async_req .wp_requested_nested_ie_list .pan_ie = true;
2502
2513
async_req .wp_requested_nested_ie_list .net_name_ie = true;
2503
2514
2504
- 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 );
2505
-
2506
- async_req .channel_list .channel_page = CHANNEL_PAGE_10 ;
2515
+ ws_set_asynch_channel_list (cur , & async_req );
2507
2516
async_req .security .SecurityLevel = 0 ;
2508
2517
2509
2518
if (cur -> bootsrap_mode == ARM_NWK_BOOTSRAP_MODE_6LoWPAN_BORDER_ROUTER ) {
@@ -2534,9 +2543,8 @@ static void ws_bootstrap_pan_config(protocol_interface_info_entry_t *cur)
2534
2543
async_req .wp_requested_nested_ie_list .gtkhash_ie = true;
2535
2544
async_req .wp_requested_nested_ie_list .vp_ie = true;
2536
2545
2537
- 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 );
2546
+ ws_set_asynch_channel_list ( cur , & async_req );
2538
2547
2539
- async_req .channel_list .channel_page = CHANNEL_PAGE_10 ;
2540
2548
async_req .security .SecurityLevel = mac_helper_default_security_level_get (cur );
2541
2549
async_req .security .KeyIdMode = mac_helper_default_security_key_id_mode_get (cur );
2542
2550
async_req .security .KeyIndex = mac_helper_default_key_index_get (cur );
0 commit comments