Skip to content

Commit 717b4fe

Browse files
Thalleyfabiobaltieri
authored andcommitted
Bluetooth: ISO: Remove TS size from SDU len check
The timestamp is not part of the SDU, and should thus not be used to get the maximum SDU size. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 97173b6 commit 717b4fe

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

include/zephyr/bluetooth/audio/audio.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,11 +2047,6 @@ int bt_audio_stream_release(struct bt_audio_stream *stream, bool cache);
20472047
*
20482048
* @param stream Stream object.
20492049
* @param buf Buffer containing data to be sent.
2050-
* The maximum size is the SDU that was
2051-
* configured, minus the header size. The header size is either
2052-
* @ref BT_HCI_ISO_DATA_HDR_SIZE or
2053-
* @ref BT_HCI_ISO_TS_DATA_HDR_SIZE depending on @p ts
2054-
* (the latter is used if @p ts is not BT_ISO_TIMESTAMP_NONE).
20552050
* @param seq_num Packet Sequence number. This value shall be incremented for
20562051
* each call to this function and at least once per SDU
20572052
* interval for a specific channel.

include/zephyr/bluetooth/iso.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,6 @@ int bt_iso_chan_disconnect(struct bt_iso_chan *chan);
665665
*
666666
* @param chan Channel object.
667667
* @param buf Buffer containing data to be sent.
668-
* The maximum size is the @ref bt_iso_chan_io_qos.sdu that was
669-
* configured, minus the header size. The header size is either
670-
* @ref BT_HCI_ISO_DATA_HDR_SIZE or
671-
* @ref BT_HCI_ISO_TS_DATA_HDR_SIZE depending on @p ts
672-
* (the latter is used if @p ts is not BT_ISO_TIMESTAMP_NONE).
673668
* @param seq_num Packet Sequence number. This value shall be incremented for
674669
* each call to this function and at least once per SDU
675670
* interval for a specific channel.

subsys/bluetooth/host/iso.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -735,24 +735,6 @@ static uint16_t iso_chan_max_data_len(const struct bt_iso_chan *chan,
735735
/* Update the max_data_len to take the max_controller_data_len into account */
736736
max_data_len = MIN(max_data_len, max_controller_data_len);
737737

738-
/* Since this returns the maximum ISO data length size, we have to take
739-
* the header size into account, as that also needs to be inserted into
740-
* the SDU
741-
*/
742-
if (ts == BT_ISO_TIMESTAMP_NONE) {
743-
if (max_data_len > BT_HCI_ISO_DATA_HDR_SIZE) {
744-
max_data_len -= BT_HCI_ISO_DATA_HDR_SIZE;
745-
} else {
746-
max_data_len = 0U;
747-
}
748-
} else {
749-
if (max_data_len > BT_HCI_ISO_TS_DATA_HDR_SIZE) {
750-
max_data_len -= BT_HCI_ISO_TS_DATA_HDR_SIZE;
751-
} else {
752-
max_data_len = 0U;
753-
}
754-
}
755-
756738
return max_data_len;
757739
}
758740

0 commit comments

Comments
 (0)