]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: hci_event: Set QoS encryption from BIGInfo report
authorIulia Tanasescu <iulia.tanasescu@nxp.com>
Mon, 17 Jun 2024 08:52:06 +0000 (11:52 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 Jul 2024 01:34:40 +0000 (21:34 -0400)
On a Broadcast Sink, after synchronizing to the PA transimitted by a
Broadcast Source, the BIGInfo advertising reports emitted by the
Controller hold the encryption field, which indicates whether the
Broadcast Source is transmitting encrypted streams.

This updates the PA sync hcon QoS with the encryption value reported
in the BIGInfo report, so that this information is accurate if the
userspace tries to access the QoS struct via getsockopt.

Fixes: 1d11d70d1f6b ("Bluetooth: ISO: Pass BIG encryption info through QoS")
Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_event.c

index 93f7ac905cecea7ce7c90ea0e7c36366b995034a..4611a67d7dcc34a2e05f913e00d577593e9877a0 100644 (file)
@@ -6988,6 +6988,8 @@ static void hci_le_big_info_adv_report_evt(struct hci_dev *hdev, void *data,
        if (!pa_sync)
                goto unlock;
 
+       pa_sync->iso_qos.bcast.encryption = ev->encryption;
+
        /* Notify iso layer */
        hci_connect_cfm(pa_sync, 0);