@@ -58,9 +58,9 @@ static struct {
5858} event ;
5959
6060/* Entropy device */
61- #if defined(CONFIG_ENTROPY_NRF5_RNG )
61+ #if defined(CONFIG_ENTROPY_HAS_DRIVER )
6262static const struct device * const dev_entropy = DEVICE_DT_GET (DT_NODELABEL (rng ));
63- #endif /* CONFIG_ENTROPY_NRF5_RNG */
63+ #endif /* CONFIG_ENTROPY_HAS_DRIVER */
6464
6565static int init_reset (void );
6666#if defined(CONFIG_BT_CTLR_LOW_LAT_ULL_DONE )
@@ -179,12 +179,12 @@ int lll_init(void)
179179{
180180 int err ;
181181
182- #if defined(CONFIG_ENTROPY_NRF5_RNG )
182+ #if defined(CONFIG_ENTROPY_HAS_DRIVER )
183183 /* Get reference to entropy device */
184184 if (!device_is_ready (dev_entropy )) {
185185 return - ENODEV ;
186186 }
187- #endif /* CONFIG_ENTROPY_NRF5_RNG */
187+ #endif /* CONFIG_ENTROPY_HAS_DRIVER */
188188
189189 /* Initialise LLL internals */
190190 event .curr .abort_cb = NULL ;
@@ -327,54 +327,54 @@ int lll_deinit(void)
327327
328328int lll_csrand_get (void * buf , size_t len )
329329{
330- #if defined(CONFIG_ENTROPY_NRF5_RNG )
330+ #if defined(CONFIG_ENTROPY_HAS_DRIVER )
331331 return entropy_get_entropy (dev_entropy , buf , len );
332- #else
332+ #else /* !CONFIG_ENTROPY_HAS_DRIVER */
333333 /* FIXME: No suitable entropy device available yet.
334334 * It is required by Controller to use random numbers.
335335 * Hence, return uninitialized buf contents, for now.
336336 */
337337 return 0 ;
338- #endif
338+ #endif /* !CONFIG_ENTROPY_HAS_DRIVER */
339339}
340340
341341int lll_csrand_isr_get (void * buf , size_t len )
342342{
343- #if defined(CONFIG_ENTROPY_NRF5_RNG )
343+ #if defined(CONFIG_ENTROPY_HAS_DRIVER )
344344 return entropy_get_entropy_isr (dev_entropy , buf , len , 0 );
345- #else
345+ #else /* !CONFIG_ENTROPY_HAS_DRIVER */
346346 /* FIXME: No suitable entropy device available yet.
347347 * It is required by Controller to use random numbers.
348348 * Hence, return uninitialized buf contents, for now.
349349 */
350350 return 0 ;
351- #endif
351+ #endif /* !CONFIG_ENTROPY_HAS_DRIVER */
352352}
353353
354354int lll_rand_get (void * buf , size_t len )
355355{
356- #if defined(CONFIG_ENTROPY_NRF5_RNG )
356+ #if defined(CONFIG_ENTROPY_HAS_DRIVER )
357357 return entropy_get_entropy (dev_entropy , buf , len );
358- #else
358+ #else /* !CONFIG_ENTROPY_HAS_DRIVER */
359359 /* FIXME: No suitable entropy device available yet.
360360 * It is required by Controller to use random numbers.
361361 * Hence, return uninitialized buf contents, for now.
362362 */
363363 return 0 ;
364- #endif
364+ #endif /* !CONFIG_ENTROPY_HAS_DRIVER */
365365}
366366
367367int lll_rand_isr_get (void * buf , size_t len )
368368{
369- #if defined(CONFIG_ENTROPY_NRF5_RNG )
369+ #if defined(CONFIG_ENTROPY_HAS_DRIVER )
370370 return entropy_get_entropy_isr (dev_entropy , buf , len , 0 );
371- #else
371+ #else /* !CONFIG_ENTROPY_HAS_DRIVER */
372372 /* FIXME: No suitable entropy device available yet.
373373 * It is required by Controller to use random numbers.
374374 * Hence, return uninitialized buf contents, for now.
375375 */
376376 return 0 ;
377- #endif
377+ #endif /* !CONFIG_ENTROPY_HAS_DRIVER */
378378}
379379
380380int lll_reset (void )
0 commit comments