From a68a0a4a5b7fda82971cb7d5005757103d3473bf Mon Sep 17 00:00:00 2001 From: Adam Cavender Date: Thu, 31 Oct 2024 10:48:02 +0000 Subject: [PATCH] bluetooth: host: Update FAE table type for HCI commands Update FAE table type from array of uint8_t to int8_t. From Vol 6.0, Part B, section 2.4.2.52: "The ChFAE field contains the per-channel mode-0 FAE table of the local Controller. Every per-channel mode-0 FAE value is represented by an 8-bit signed integer" Signed-off-by: Adam Cavender --- include/zephyr/bluetooth/conn.h | 2 +- include/zephyr/bluetooth/cs.h | 2 +- include/zephyr/bluetooth/hci_types.h | 4 ++-- subsys/bluetooth/host/cs.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/zephyr/bluetooth/conn.h b/include/zephyr/bluetooth/conn.h index 5ef36281726..83b87588c08 100644 --- a/include/zephyr/bluetooth/conn.h +++ b/include/zephyr/bluetooth/conn.h @@ -410,7 +410,7 @@ struct bt_conn_le_cs_capabilities { /** Remote FAE Table for LE connections supporting CS */ struct bt_conn_le_cs_fae_table { - uint8_t *remote_fae_table; + int8_t *remote_fae_table; }; /** Channel sounding main mode */ diff --git a/include/zephyr/bluetooth/cs.h b/include/zephyr/bluetooth/cs.h index aaa410da2d2..2c661c09c57 100644 --- a/include/zephyr/bluetooth/cs.h +++ b/include/zephyr/bluetooth/cs.h @@ -886,7 +886,7 @@ int bt_le_cs_write_cached_remote_supported_capabilities( * * @return Zero on success or (negative) error code on failure. */ -int bt_le_cs_write_cached_remote_fae_table(struct bt_conn *conn, uint8_t remote_fae_table[72]); +int bt_le_cs_write_cached_remote_fae_table(struct bt_conn *conn, int8_t remote_fae_table[72]); #ifdef __cplusplus } diff --git a/include/zephyr/bluetooth/hci_types.h b/include/zephyr/bluetooth/hci_types.h index 08be96bd2ff..15bc303bf9e 100644 --- a/include/zephyr/bluetooth/hci_types.h +++ b/include/zephyr/bluetooth/hci_types.h @@ -2500,7 +2500,7 @@ struct bt_hci_cp_le_read_remote_fae_table { struct bt_hci_cp_le_write_cached_remote_fae_table { uint16_t handle; - uint8_t remote_fae_table[72]; + int8_t remote_fae_table[72]; } __packed; #define BT_HCI_OP_LE_CS_SET_CHANNEL_CLASSIFICATION BT_OP(BT_OGF_LE, 0x0092) /* 0x2092 */ @@ -3547,7 +3547,7 @@ struct bt_hci_evt_le_cs_read_remote_supported_capabilities_complete { struct bt_hci_evt_le_cs_read_remote_fae_table_complete { uint8_t status; uint16_t conn_handle; - uint8_t remote_fae_table[72]; + int8_t remote_fae_table[72]; } __packed; #define BT_HCI_LE_CS_CONFIG_ACTION_REMOVED 0x00 diff --git a/subsys/bluetooth/host/cs.c b/subsys/bluetooth/host/cs.c index c11f262b5d2..03cc3a8e95f 100644 --- a/subsys/bluetooth/host/cs.c +++ b/subsys/bluetooth/host/cs.c @@ -1171,7 +1171,7 @@ int bt_le_cs_write_cached_remote_supported_capabilities( NULL); } -int bt_le_cs_write_cached_remote_fae_table(struct bt_conn *conn, uint8_t remote_fae_table[72]) +int bt_le_cs_write_cached_remote_fae_table(struct bt_conn *conn, int8_t remote_fae_table[72]) { struct bt_hci_cp_le_write_cached_remote_fae_table *cp; struct net_buf *buf;