Commit 9bbc906b authored by Sean Madigan's avatar Sean Madigan Committed by Johan Hedberg
Browse files

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: default avatarSean Madigan <sean.madigan@nordicsemi.no>
parent 382c0dea
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -80,7 +80,8 @@ extern "C" {
#define BT_LE_LOCAL_SUPPORTED_FEATURES_SIZE                         \
	(BT_HCI_LE_BYTES_PAGE_0_FEATURE_PAGE +                      \
	 COND_CODE_1(CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE, \
		CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE * BT_HCI_LE_BYTES_PER_FEATURE_PAGE,  \
		(CONFIG_BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE      \
			* BT_HCI_LE_BYTES_PER_FEATURE_PAGE),        \
		(0U)))

/** Opaque type representing an advertiser. */
+1 −2
Original line number Diff line number Diff line
@@ -121,8 +121,7 @@ config BT_LE_MAX_LOCAL_SUPPORTED_FEATURE_PAGE
	range 0 10
	depends on BT_LE_EXTENDED_FEAT_SET
	help
	  Maximum supported feature page that can be stored locally and fetched
	  from the remote connection with the LL Extended Feature Set feature.
	  Maximum feature page that can be stored for local supported features.

config BT_LE_EXTENDED_FEAT_SET
	bool "LL Extended Feature Set"
+6 −4
Original line number Diff line number Diff line
@@ -3345,6 +3345,7 @@ int bt_conn_le_subrate_request(struct bt_conn *conn,
void notify_read_all_remote_feat_complete(struct bt_conn *conn,
					  struct bt_conn_le_read_all_remote_feat_complete *params)
{
	if (IS_ENABLED(CONFIG_BT_CONN_DYNAMIC_CALLBACKS)) {
		struct bt_conn_cb *callback;

		SYS_SLIST_FOR_EACH_CONTAINER(&conn_cbs, callback, _node) {
@@ -3352,6 +3353,7 @@ void notify_read_all_remote_feat_complete(struct bt_conn *conn,
				callback->read_all_remote_feat_complete(conn, params);
			}
		}
	}

	STRUCT_SECTION_FOREACH(bt_conn_cb, cb)
	{