From 4efe5d32104ee12a3d5630767fa0ebb1b22bcbaa Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Fri, 20 Sep 2024 17:07:45 +0200 Subject: [PATCH] samples: Bluetooth: ext_adv_scanner: Fix bad use of adv_type The adv_type is not a bitfield but was used as such. Changed to do a proper comparison. Signed-off-by: Emil Gydesen --- samples/bluetooth/extended_adv/scanner/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bluetooth/extended_adv/scanner/src/main.c b/samples/bluetooth/extended_adv/scanner/src/main.c index 137a083c63c..30a8e686e70 100644 --- a/samples/bluetooth/extended_adv/scanner/src/main.c +++ b/samples/bluetooth/extended_adv/scanner/src/main.c @@ -79,7 +79,7 @@ BT_CONN_CB_DEFINE(conn_cb) = { static void scan_recv(const struct bt_le_scan_recv_info *info, struct net_buf_simple *buf) { - if (info->adv_type & BT_GAP_ADV_TYPE_EXT_ADV && + if (info->adv_type == BT_GAP_ADV_TYPE_EXT_ADV && info->adv_props & BT_GAP_ADV_PROP_EXT_ADV && info->adv_props & BT_GAP_ADV_PROP_CONNECTABLE) { /* Attempt connection request for device with extended advertisements */