File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed
subsys/bluetooth/controller/ll_sw Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -1019,7 +1019,7 @@ static int rl_access_check(bool check_ar)
1019
1019
*/
1020
1020
return ((IS_ENABLED (CONFIG_BT_BROADCASTER ) && ull_adv_is_enabled (0 )) ||
1021
1021
(IS_ENABLED (CONFIG_BT_OBSERVER ) &&
1022
- (ull_scan_is_enabled (0 ) & ~BIT ( 0 ) )))
1022
+ (ull_scan_is_enabled (0 ) & ~ULL_SCAN_IS_PASSIVE )))
1023
1023
? 0 : 1 ;
1024
1024
}
1025
1025
Original file line number Diff line number Diff line change @@ -618,31 +618,25 @@ uint32_t ull_scan_is_enabled(uint8_t handle)
618
618
{
619
619
struct ll_scan_set * scan ;
620
620
621
- /* NOTE: BIT(0) - passive scanning enabled
622
- * BIT(1) - active scanning enabled
623
- * BIT(2) - initiator enabled
624
- * BIT(3) - periodic sync create active
625
- */
626
-
627
621
scan = ull_scan_is_enabled_get (handle );
628
622
if (!scan ) {
629
623
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC )
630
624
scan = ull_scan_set_get (handle );
631
625
632
- return scan -> per_scan .sync ? BIT ( 3 ) : 0 ;
626
+ return scan -> per_scan .sync ? ULL_SCAN_IS_SYNC : 0U ;
633
627
#else
634
- return 0 ;
628
+ return 0U ;
635
629
#endif
636
630
}
637
631
638
632
return (((uint32_t )scan -> is_enabled << scan -> lll .type ) |
639
633
#if defined(CONFIG_BT_CENTRAL )
640
- (scan -> lll .conn ? BIT ( 2 ) : 0 ) |
634
+ (scan -> lll .conn ? ULL_SCAN_IS_INITIATOR : 0U ) |
641
635
#endif
642
636
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC )
643
- (scan -> per_scan .sync ? BIT ( 3 ) : 0 ) |
637
+ (scan -> per_scan .sync ? ULL_SCAN_IS_SYNC : 0U ) |
644
638
#endif
645
- 0 );
639
+ 0U );
646
640
}
647
641
648
642
uint32_t ull_scan_filter_pol_get (uint8_t handle )
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ struct ll_scan_set *ull_scan_is_enabled_get(uint8_t handle);
62
62
struct ll_scan_set * ull_scan_is_disabled_get (uint8_t handle );
63
63
64
64
/* Return flags if enabled */
65
+ #define ULL_SCAN_IS_PASSIVE BIT(0)
66
+ #define ULL_SCAN_IS_ACTIVE BIT(1)
67
+ #define ULL_SCAN_IS_INITIATOR BIT(2)
68
+ #define ULL_SCAN_IS_SYNC BIT(3)
65
69
uint32_t ull_scan_is_enabled (uint8_t handle );
66
70
67
71
/* Return filter policy used */
You can’t perform that action at this time.
0 commit comments