Skip to content

Commit 471543e

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Use DUP_FILTER_DISABLED define
Use DUP_FILTER_DISABLED define instead of magic value to represent duplicate filtering being disabled. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 48f4eb9 commit 471543e

File tree

1 file changed

+4
-4
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+4
-4
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ static void le_set_scan_enable(struct net_buf *buf, struct net_buf **evt)
16791679
if (0) {
16801680

16811681
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC_ADI_SUPPORT)
1682-
} else if (dup_count <= DUP_FILTER_DISABLED) {
1682+
} else if (dup_count == DUP_FILTER_DISABLED) {
16831683
dup_scan = true;
16841684

16851685
/* All entries reset */
@@ -3396,7 +3396,7 @@ static void le_set_ext_scan_enable(struct net_buf *buf, struct net_buf **evt)
33963396
if (0) {
33973397

33983398
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC_ADI_SUPPORT)
3399-
} else if (dup_count < 0) {
3399+
} else if (dup_count == DUP_FILTER_DISABLED) {
34003400
dup_scan = true;
34013401

34023402
/* All entries reset */
@@ -3473,7 +3473,7 @@ static void le_per_adv_create_sync(struct net_buf *buf, struct net_buf **evt)
34733473
#if CONFIG_BT_CTLR_DUP_FILTER_LEN > 0
34743474
/* Initialize duplicate filtering */
34753475
if (cmd->options & BT_HCI_LE_PER_ADV_CREATE_SYNC_FP_FILTER_DUPLICATE) {
3476-
if (!dup_scan || (dup_count < 0)) {
3476+
if (!dup_scan || (dup_count == DUP_FILTER_DISABLED)) {
34773477
dup_count = 0;
34783478
dup_curr = 0U;
34793479
} else {
@@ -3555,7 +3555,7 @@ static void le_per_adv_recv_enable(struct net_buf *buf, struct net_buf **evt)
35553555
if (!status) {
35563556
if (cmd->enable &
35573557
BT_HCI_LE_SET_PER_ADV_RECV_ENABLE_FILTER_DUPLICATE) {
3558-
if (!dup_scan || (dup_count < 0)) {
3558+
if (!dup_scan || (dup_count == DUP_FILTER_DISABLED)) {
35593559
dup_count = 0;
35603560
dup_curr = 0U;
35613561
} else {

0 commit comments

Comments
 (0)