Commit 6e3c3f67 authored by Burak Gorduk's avatar Burak Gorduk Committed by Carles Cufi
Browse files

bluetooth: host: Use consistent API naming for CS



This change adds bt_le_cs prefix to public CS API as well as
adding le_cs prefix to CS related bt_conn callbacks. This is
to ensure consistency within CS API while maintaining the
separation between the Bluetooth LE and Classic features.

Signed-off-by: default avatarBurak Gorduk <burak.gorduk@nordicsemi.no>
parent 7b82214d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1644,7 +1644,7 @@ struct bt_conn_cb {
	 *  @param conn Connection object.
	 *  @param remote_cs_capabilities Remote Channel Sounding Capabilities.
	 */
	void (*remote_cs_capabilities_available)(struct bt_conn *conn,
	void (*le_cs_remote_capabilities_available)(struct bt_conn *conn,
						    struct bt_conn_le_cs_capabilities *params);

	/** @brief LE CS Read Remote FAE Table Complete event.
@@ -1655,7 +1655,7 @@ struct bt_conn_cb {
	 *  @param conn Connection object.
	 *  @param params FAE Table.
	 */
	void (*remote_cs_fae_table_available)(struct bt_conn *conn,
	void (*le_cs_remote_fae_table_available)(struct bt_conn *conn,
						 struct bt_conn_le_cs_fae_table *params);

	/** @brief LE CS Config created.
+106 −104

File changed.

Preview size limit exceeded, changes collapsed.

+8 −8
Original line number Diff line number Diff line
@@ -3326,14 +3326,14 @@ void notify_remote_cs_capabilities(struct bt_conn *conn, struct bt_conn_le_cs_ca
	struct bt_conn_cb *callback;

	SYS_SLIST_FOR_EACH_CONTAINER(&conn_cbs, callback, _node) {
		if (callback->remote_cs_capabilities_available) {
			callback->remote_cs_capabilities_available(conn, &params);
		if (callback->le_cs_remote_capabilities_available) {
			callback->le_cs_remote_capabilities_available(conn, &params);
		}
	}

	STRUCT_SECTION_FOREACH(bt_conn_cb, cb) {
		if (cb->remote_cs_capabilities_available) {
			cb->remote_cs_capabilities_available(conn, &params);
		if (cb->le_cs_remote_capabilities_available) {
			cb->le_cs_remote_capabilities_available(conn, &params);
		}
	}
}
@@ -3343,14 +3343,14 @@ void notify_remote_cs_fae_table(struct bt_conn *conn, struct bt_conn_le_cs_fae_t
	struct bt_conn_cb *callback;

	SYS_SLIST_FOR_EACH_CONTAINER(&conn_cbs, callback, _node) {
		if (callback->remote_cs_fae_table_available) {
			callback->remote_cs_fae_table_available(conn, &params);
		if (callback->le_cs_remote_fae_table_available) {
			callback->le_cs_remote_fae_table_available(conn, &params);
		}
	}

	STRUCT_SECTION_FOREACH(bt_conn_cb, cb) {
		if (cb->remote_cs_fae_table_available) {
			cb->remote_cs_fae_table_available(conn, &params);
		if (cb->le_cs_remote_fae_table_available) {
			cb->le_cs_remote_fae_table_available(conn, &params);
		}
	}
}
+5 −5
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ void bt_le_cs_set_valid_chmap_bits(uint8_t channel_map[10])
	BT_LE_CS_CHANNEL_BIT_SET_VAL(channel_map, 79, 0);
}

int bt_cs_read_remote_supported_capabilities(struct bt_conn *conn)
int bt_le_cs_read_remote_supported_capabilities(struct bt_conn *conn)
{
	struct bt_hci_cp_le_read_remote_supported_capabilities *cp;
	struct net_buf *buf;
@@ -168,8 +168,8 @@ void bt_hci_le_cs_read_remote_supported_capabilities_complete(struct net_buf *bu
	bt_conn_unref(conn);
}

int bt_cs_set_default_settings(struct bt_conn *conn,
			       const struct bt_cs_set_default_settings_param *params)
int bt_le_cs_set_default_settings(struct bt_conn *conn,
				  const struct bt_le_cs_set_default_settings_param *params)
{
	struct bt_hci_cp_le_cs_set_default_settings *cp;
	struct net_buf *buf;
@@ -196,7 +196,7 @@ int bt_cs_set_default_settings(struct bt_conn *conn,
	return bt_hci_cmd_send_sync(BT_HCI_OP_LE_CS_SET_DEFAULT_SETTINGS, buf, NULL);
}

int bt_cs_read_remote_fae_table(struct bt_conn *conn)
int bt_le_cs_read_remote_fae_table(struct bt_conn *conn)
{
	struct bt_hci_cp_le_read_remote_fae_table *cp;
	struct net_buf *buf;
@@ -241,7 +241,7 @@ void bt_hci_le_cs_read_remote_fae_table_complete(struct net_buf *buf)
	bt_conn_unref(conn);
}

int bt_cs_start_test(const struct bt_cs_test_param *params)
int bt_le_cs_start_test(const struct bt_le_cs_test_param *params)
{
	struct bt_hci_op_le_cs_test *cp;
	struct net_buf *buf;
+2 −2
Original line number Diff line number Diff line
@@ -1158,8 +1158,8 @@ static struct bt_conn_cb conn_callbacks = {
	.subrate_changed = subrate_changed,
#endif
#if defined(CONFIG_BT_CHANNEL_SOUNDING)
	.remote_cs_capabilities_available = print_remote_cs_capabilities,
	.remote_cs_fae_table_available = print_remote_cs_fae_table,
	.le_cs_remote_capabilities_available = print_remote_cs_capabilities,
	.le_cs_remote_fae_table_available = print_remote_cs_fae_table,
	.le_cs_config_created = le_cs_config_created,
	.le_cs_config_removed = le_cs_config_removed,
#endif
Loading