Skip to content

Commit 6c44930

Browse files
sean-madiganrlubos
authored andcommitted
[nrf fromtree] bluetooth: host: Fix BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE define
Fix BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE define, as this was not working correctly without brackets around CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE. Also fix CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE help, as this was talking about remote featues, where this only applies for local features. Also update for new CONFIG_BT_CONN_DYNAMIC_CALLBACKS kconfig Signed-off-by: Sean Madigan <[email protected]> (cherry picked from commit 9bbc906) Signed-off-by: Sean Madigan <[email protected]>
1 parent 208b1b9 commit 6c44930

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

include/zephyr/bluetooth/bluetooth.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ extern "C" {
7777
* The value of 8 correspond to page 0 in the LE Controller supported features.
7878
* 24 bytes are required for all subsequent supported feature pages.
7979
*/
80-
#define BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE \
81-
(BT_HCI_LE_BYTES_PAGE_0_FEATURE_PAGE + \
82-
COND_CODE_1(CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE, \
83-
CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE * BT_HCI_LE_BYTES_PER_FEATURE_PAGE, \
80+
#define BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE \
81+
(BT_HCI_LE_BYTES_PAGE_0_FEATURE_PAGE + \
82+
COND_CODE_1(CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE, \
83+
(CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE \
84+
* BT_HCI_LE_BYTES_PER_FEATURE_PAGE), \
8485
(0U)))
8586

8687
/** Opaque type representing an advertiser. */

subsys/bluetooth/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ config BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE
121121
range 0 10
122122
depends on BT_LE_EXTENDED_FEAT_SET
123123
help
124-
Maximum supported feature page that can be stored locally and fetched
125-
from the remote connection with the LL Extended Feature Set feature.
124+
Maximum feature page that can be stored for local supported features.
126125

127126
config BT_LE_EXTENDED_FEAT_SET
128127
bool "LL Extended Feature Set"

subsys/bluetooth/host/conn.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3357,11 +3357,13 @@ int bt_conn_le_subrate_request(struct bt_conn *conn,
33573357
void notify_read_all_remote_feat_complete(struct bt_conn *conn,
33583358
struct bt_conn_le_read_all_remote_feat_complete *params)
33593359
{
3360-
struct bt_conn_cb *callback;
3360+
if (IS_ENABLED(CONFIG_BT_CONN_DYNAMIC_CALLBACKS)) {
3361+
struct bt_conn_cb *callback;
33613362

3362-
SYS_SLIST_FOR_EACH_CONTAINER(&conn_cbs, callback, _node) {
3363-
if (callback->read_all_remote_feat_complete != NULL) {
3364-
callback->read_all_remote_feat_complete(conn, params);
3363+
SYS_SLIST_FOR_EACH_CONTAINER(&conn_cbs, callback, _node) {
3364+
if (callback->read_all_remote_feat_complete != NULL) {
3365+
callback->read_all_remote_feat_complete(conn, params);
3366+
}
33653367
}
33663368
}
33673369

0 commit comments

Comments
 (0)