File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
features/net/FEATURE_NANOSTACK/mbed-mesh-api/source Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ typedef struct {
72
72
73
73
/* Tasklet data */
74
74
static tasklet_data_str_t * tasklet_data_ptr = NULL ;
75
+ static mac_api_t * mac_api = NULL ;
75
76
76
77
/* private function prototypes */
77
78
void nd_tasklet_main (arm_event_s * event );
@@ -427,7 +428,9 @@ int8_t nd_tasklet_network_init(int8_t device_id)
427
428
storage_sizes .key_description_table_size = 3 ;
428
429
storage_sizes .key_lookup_size = 1 ;
429
430
storage_sizes .key_usage_size = 3 ;
430
- mac_api_t * api = ns_sw_mac_create (device_id , & storage_sizes );
431
- return arm_nwk_interface_lowpan_init (api , INTERFACE_NAME );
431
+ if (!mac_api ) {
432
+ mac_api = ns_sw_mac_create (device_id , & storage_sizes );
433
+ }
434
+ return arm_nwk_interface_lowpan_init (mac_api , INTERFACE_NAME );
432
435
}
433
436
You can’t perform that action at this time.
0 commit comments