Skip to content

Commit 32e534c

Browse files
MarekPietastephanosio
authored andcommitted
Bluetooth: host: Remove GATT Client dependency for storing CCC and CF
Change removes GATT Client dependency for storing CCC and CF on pairing complete and identity resolved. These features are needed also if GATT Client role is disabled. Signed-off-by: Marek Pieta <[email protected]>
1 parent a0614b6 commit 32e534c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subsys/bluetooth/host/gatt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ static int bt_gatt_store_cf(uint8_t id, const bt_addr_le_t *peer)
10751075

10761076
}
10771077

1078-
#if defined(CONFIG_BT_SETTINGS) && defined(CONFIG_BT_SMP) && defined(CONFIG_BT_GATT_CLIENT)
1078+
#if defined(CONFIG_BT_SETTINGS) && defined(CONFIG_BT_SMP)
10791079
/** Struct used to store both the id and the random address of a device when replacing
10801080
* random addresses in the ccc attribute's cfg array with the device's id address after
10811081
* pairing complete.
@@ -1146,7 +1146,7 @@ static void bt_gatt_pairing_complete(struct bt_conn *conn, bool bonded)
11461146
bt_gatt_store_cf(conn->id, &conn->le.dst);
11471147
}
11481148
}
1149-
#endif /* CONFIG_BT_SETTINGS && CONFIG_BT_SMP && CONFIG_BT_GATT_CLIENT */
1149+
#endif /* CONFIG_BT_SETTINGS && CONFIG_BT_SMP */
11501150

11511151
BT_GATT_SERVICE_DEFINE(_1_gatt_svc,
11521152
BT_GATT_PRIMARY_SERVICE(BT_UUID_GATT),
@@ -1518,7 +1518,7 @@ void bt_gatt_init(void)
15181518
k_work_init_delayable(&gatt_delayed_store.work, delayed_store);
15191519
#endif
15201520

1521-
#if defined(CONFIG_BT_GATT_CLIENT) && defined(CONFIG_BT_SETTINGS) && defined(CONFIG_BT_SMP)
1521+
#if defined(CONFIG_BT_SETTINGS) && defined(CONFIG_BT_SMP)
15221522
static struct bt_conn_auth_info_cb gatt_conn_auth_info_cb = {
15231523
.pairing_complete = bt_gatt_pairing_complete,
15241524
};
@@ -1539,7 +1539,7 @@ void bt_gatt_init(void)
15391539
* brand-new peer.
15401540
*/
15411541
bt_conn_cb_register(&gatt_conn_cb);
1542-
#endif /* CONFIG_BT_GATT_CLIENT && CONFIG_BT_SETTINGS && CONFIG_BT_SMP */
1542+
#endif /* CONFIG_BT_SETTINGS && CONFIG_BT_SMP */
15431543
}
15441544

15451545
#if defined(CONFIG_BT_GATT_DYNAMIC_DB) || \

0 commit comments

Comments
 (0)