You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/04/22 08:26:15 UTC
[mynewt-nimble] branch master updated (76c8573f -> 352d4792)
This is an automated email from the ASF dual-hosted git repository.
andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
from 76c8573f nimble/transport: Remove unused syscfg
new a763af2d nimble/ll: Add proper verification for per adv enable hci
new 8463e0e8 nimble/ll: Calculate min auth payload tmo with subrating
new e7fb525b nimble/ll: Remove CIS from host supported features
new 352d4792 nimble/ll: Disallow periodic adv on incompatible ext adv instance
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
nimble/controller/include/controller/ble_ll.h | 3 +--
nimble/controller/src/ble_ll_adv.c | 19 +++++++++++++++++++
nimble/controller/src/ble_ll_conn_hci.c | 5 ++++-
3 files changed, 24 insertions(+), 3 deletions(-)
[mynewt-nimble] 03/04: nimble/ll: Remove CIS from host supported features
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit e7fb525b6a651795eb70a24f0536a6517183ae4f
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Apr 22 00:38:24 2022 +0200
nimble/ll: Remove CIS from host supported features
We do not support it so we should not allow to set it.
This fixes HCI/CCO/BI-44-C.
---
nimble/controller/include/controller/ble_ll.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/nimble/controller/include/controller/ble_ll.h b/nimble/controller/include/controller/ble_ll.h
index 58992e88..7136852d 100644
--- a/nimble/controller/include/controller/ble_ll.h
+++ b/nimble/controller/include/controller/ble_ll.h
@@ -289,8 +289,7 @@ extern STATS_SECT_DECL(ble_ll_stats) ble_ll_stats;
#define BLE_LL_CONN_CLEAR_FEATURE(connsm, feature) (connsm->conn_features &= ~(feature))
/* All the features which can be controlled by the Host */
-#define BLE_LL_HOST_CONTROLLED_FEATURES (BLE_LL_FEAT_CIS_HOST | \
- BLE_LL_FEAT_CONN_SUBRATING_HOST)
+#define BLE_LL_HOST_CONTROLLED_FEATURES (BLE_LL_FEAT_CONN_SUBRATING_HOST)
/* LL timing */
#define BLE_LL_IFS (150) /* usecs */
[mynewt-nimble] 04/04: nimble/ll: Disallow periodic adv on incompatible ext adv instance
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 352d4792cfee96ed15397fa2cb06259156540c5a
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Apr 22 00:43:29 2022 +0200
nimble/ll: Disallow periodic adv on incompatible ext adv instance
We shall not allow enabling periodic advertising on an incompatible
extended advertising instance, i.e. scannable, connectable, legacy or
anonymous.
This fixes HCI/DDI/BI-37-C, HCI/DDI/BI-38-C, HCI/DDI/BI-39-C,
HCI/DDI/BI-40-C, HCI/DDI/BI-41-C, HCI/DDI/BI-42-C, HCI/DDI/BI-43-C,
HCI/DDI/BI-44-C, HCI/DDI/BI-45-C, HCI/DDI/BI-46-C, HCI/DDI/BI-47-C,
HCI/DDI/BI-53-C, HCI/DDI/BI-54-C, HCI/DDI/BI-55-C, HCI/DDI/BI-56-C,
HCI/DDI/BI-57-C, HCI/DDI/BI-58-C, HCI/DDI/BI-59-C, HCI/DDI/BI-60-C,
HCI/DDI/BI-61-C.
(yup, there are so many test cases for testing the same scenario)
---
nimble/controller/src/ble_ll_adv.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index 74e8bf56..7c13743b 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -3975,6 +3975,13 @@ ble_ll_adv_periodic_enable(const uint8_t *cmdbuf, uint8_t len)
#endif
if (cmd->enable) {
+ if (advsm->props & (BLE_HCI_LE_SET_EXT_ADV_PROP_ANON_ADV |
+ BLE_HCI_LE_SET_EXT_ADV_PROP_SCANNABLE |
+ BLE_HCI_LE_SET_EXT_ADV_PROP_CONNECTABLE |
+ BLE_HCI_LE_SET_EXT_ADV_PROP_LEGACY)) {
+ return BLE_ERR_CMD_DISALLOWED;
+ }
+
if (advsm->flags & BLE_LL_ADV_SM_FLAG_PERIODIC_DATA_INCOMPLETE) {
return BLE_ERR_CMD_DISALLOWED;
}
[mynewt-nimble] 02/04: nimble/ll: Calculate min auth payload tmo with subrating
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 8463e0e832108fad6570ad30a33e8c0041223e8d
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Apr 22 00:36:39 2022 +0200
nimble/ll: Calculate min auth payload tmo with subrating
This fixes HCI/CCO/BI-39-C.
---
nimble/controller/src/ble_ll_conn_hci.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nimble/controller/src/ble_ll_conn_hci.c b/nimble/controller/src/ble_ll_conn_hci.c
index 8f5771a6..2ffda58a 100644
--- a/nimble/controller/src/ble_ll_conn_hci.c
+++ b/nimble/controller/src/ble_ll_conn_hci.c
@@ -1867,11 +1867,14 @@ ble_ll_conn_hci_wr_auth_pyld_tmo(const uint8_t *cmdbuf, uint8_t len,
*/
tmo = le16toh(cmd->tmo);
min_tmo = (uint32_t)connsm->conn_itvl * BLE_LL_CONN_ITVL_USECS;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ENHANCED_CONN_UPDATE)
+ min_tmo *= connsm->subrate_factor;
+#endif
min_tmo *= (connsm->periph_latency + 1);
min_tmo /= 10000;
if (tmo < min_tmo) {
- rc = BLE_ERR_INV_HCI_CMD_PARMS;
+ rc = BLE_ERR_CMD_DISALLOWED;
} else {
connsm->auth_pyld_tmo = tmo;
if (ble_npl_callout_is_active(&connsm->auth_pyld_timer)) {
[mynewt-nimble] 01/04: nimble/ll: Add proper verification for per adv enable hci
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit a763af2d2874fa4032aad58599f4429d423c7ecb
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Apr 22 00:26:46 2022 +0200
nimble/ll: Add proper verification for per adv enable hci
We do not support ADI in periodic advertising so need to return proper
error code if requested. Otherwise return an error if RFU bit is set.
This fixes HCI/CCO/BI-34-C.
---
nimble/controller/src/ble_ll_adv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index 129eeba5..74e8bf56 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -3962,6 +3962,18 @@ ble_ll_adv_periodic_enable(const uint8_t *cmdbuf, uint8_t len)
return BLE_ERR_UNK_ADV_INDENT;
}
+#if MYNEWT_VAL(BLE_VERSION) >= 53
+ if (cmd->enable & 0x02) {
+ return BLE_ERR_UNSUPPORTED;
+ } else if (cmd->enable & 0xfc) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+#else
+ if (cmd->enable & 0xfe) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+#endif
+
if (cmd->enable) {
if (advsm->flags & BLE_LL_ADV_SM_FLAG_PERIODIC_DATA_INCOMPLETE) {
return BLE_ERR_CMD_DISALLOWED;