Skip to content

Commit 5e12d3c

Browse files
pvgregkh
authored andcommitted
Bluetooth: hci_event: fix MTU for BN == 0 in CIS Established
[ Upstream commit 0b3725d ] BN == 0x00 in CIS Established means no isochronous data for the corresponding direction (Core v6.1 pp. 2394). In this case SDU MTU should be 0. However, the specification does not say the Max_PDU_C_To_P or P_To_C are then zero. Intel AX210 in Framed CIS mode sets nonzero Max_PDU for direction with zero BN. This causes failure later when we try to LE Setup ISO Data Path for disabled direction, which is disallowed (Core v6.1 pp. 2750). Fix by setting SDU MTU to 0 if BN == 0. Fixes: 2be22f1 ("Bluetooth: hci_event: Fix parsing of CIS Established Event") Signed-off-by: Pauli Virtanen <pav@iki.fi> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6839859 commit 5e12d3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/bluetooth/hci_event.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6744,8 +6744,8 @@ static void hci_le_cis_estabilished_evt(struct hci_dev *hdev, void *data,
67446744
qos->ucast.out.latency =
67456745
DIV_ROUND_CLOSEST(get_unaligned_le24(ev->p_latency),
67466746
1000);
6747-
qos->ucast.in.sdu = le16_to_cpu(ev->c_mtu);
6748-
qos->ucast.out.sdu = le16_to_cpu(ev->p_mtu);
6747+
qos->ucast.in.sdu = ev->c_bn ? le16_to_cpu(ev->c_mtu) : 0;
6748+
qos->ucast.out.sdu = ev->p_bn ? le16_to_cpu(ev->p_mtu) : 0;
67496749
qos->ucast.in.phy = ev->c_phy;
67506750
qos->ucast.out.phy = ev->p_phy;
67516751
break;
@@ -6759,8 +6759,8 @@ static void hci_le_cis_estabilished_evt(struct hci_dev *hdev, void *data,
67596759
qos->ucast.in.latency =
67606760
DIV_ROUND_CLOSEST(get_unaligned_le24(ev->p_latency),
67616761
1000);
6762-
qos->ucast.out.sdu = le16_to_cpu(ev->c_mtu);
6763-
qos->ucast.in.sdu = le16_to_cpu(ev->p_mtu);
6762+
qos->ucast.out.sdu = ev->c_bn ? le16_to_cpu(ev->c_mtu) : 0;
6763+
qos->ucast.in.sdu = ev->p_bn ? le16_to_cpu(ev->p_mtu) : 0;
67646764
qos->ucast.out.phy = ev->c_phy;
67656765
qos->ucast.in.phy = ev->p_phy;
67666766
break;

0 commit comments

Comments
 (0)