From afbaf4b961567f926072b294f53d0826db9d501f Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Thu, 1 Feb 2018 13:45:10 +0100 Subject: [PATCH] nimble/gap: Allow adv data for connectable ext adv This is allowed by spec, only legacy directed advertising cannot have adv data included. X-Original-Commit: d40b1364ea1e75bdea6b061f0b00c69cade704d4 --- nimble/host/src/ble_gap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index 5d423271d..f721fe709 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -2741,8 +2741,8 @@ ble_gap_ext_adv_set_data_validate(uint8_t instance, struct os_mbuf *data) return BLE_HS_EINVAL; } - /* not allowed with directed advertising */ - if (ble_gap_slave[instance].directed) { + /* not allowed with directed advertising for legacy*/ + if (ble_gap_slave[instance].legacy_pdu && ble_gap_slave[instance].directed) { return BLE_HS_EINVAL; }