Context |
Check |
Description |
tedd_an/pre-ci_am |
success
|
Success
|
tedd_an/CheckPatch |
success
|
CheckPatch PASS
|
tedd_an/GitLint |
success
|
Gitlint PASS
|
tedd_an/SubjectPrefix |
success
|
Gitlint PASS
|
tedd_an/BuildKernel |
success
|
BuildKernel PASS
|
tedd_an/CheckAllWarning |
success
|
CheckAllWarning PASS
|
tedd_an/CheckSparse |
warning
|
CheckSparse WARNING net/bluetooth/iso.c:1466:18: warning: dereference of noderef expression
|
tedd_an/CheckSmatch |
success
|
CheckSparse PASS
|
tedd_an/BuildKernel32 |
success
|
BuildKernel32 PASS
|
tedd_an/TestRunnerSetup |
success
|
TestRunnerSetup PASS
|
tedd_an/TestRunner_l2cap-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_iso-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_bnep-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_mgmt-tester |
fail
|
TestRunner_mgmt-tester: Total: 497, Passed: 496 (99.8%), Failed: 1, Not Run: 0
|
tedd_an/TestRunner_rfcomm-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_sco-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_ioctl-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_mesh-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_smp-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_userchan-tester |
success
|
TestRunner PASS
|
tedd_an/IncrementalBuild |
success
|
Incremental Build PASS
|
@@ -14,6 +14,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/iso.h>
+#include "eir.h"
static const struct proto_ops iso_sock_ops;
@@ -47,6 +48,7 @@ static void iso_sock_kill(struct sock *sk);
#define EIR_SERVICE_DATA_LENGTH 4
#define BASE_MAX_LENGTH (HCI_MAX_PER_AD_LENGTH - EIR_SERVICE_DATA_LENGTH)
+#define EIR_BAA_SERVICE_UUID 0x1851
/* iso_pinfo flags values */
enum {
@@ -1458,7 +1460,7 @@ static int iso_sock_getsockopt(struct socket *sock, int level, int optname,
len = min_t(unsigned int, len, base_len);
if (copy_to_user(optval, base, len))
err = -EFAULT;
-
+ *optlen = len;
break;
default:
@@ -1648,7 +1650,6 @@ static void iso_conn_ready(struct iso_conn *conn)
}
if (ev2 && !ev2->status) {
- iso_pi(sk)->sync_handle = iso_pi(parent)->sync_handle;
iso_pi(sk)->qos = iso_pi(parent)->qos;
iso_pi(sk)->bc_num_bis = iso_pi(parent)->bc_num_bis;
memcpy(iso_pi(sk)->bc_bis, iso_pi(parent)->bc_bis, ISO_MAX_NUM_BIS);
@@ -1771,13 +1772,20 @@ int iso_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
ev3 = hci_recv_event_data(hdev, HCI_EV_LE_PER_ADV_REPORT);
if (ev3) {
+ size_t base_len = ev3->length;
+ u8 *base;
+
sk = iso_get_sock_listen(&hdev->bdaddr, bdaddr,
iso_match_sync_handle_pa_report, ev3);
-
- if (sk) {
- memcpy(iso_pi(sk)->base, ev3->data, ev3->length);
- iso_pi(sk)->base_len = ev3->length;
+ base = eir_get_service_data(ev3->data, ev3->length,
+ EIR_BAA_SERVICE_UUID, &base_len);
+ if (base) {
+ if (sk) {
+ memcpy(iso_pi(sk)->base, base, base_len);
+ iso_pi(sk)->base_len = base_len;
+ }
}
+
} else {
sk = iso_get_sock_listen(&hdev->bdaddr, BDADDR_ANY, NULL, NULL);
}
Copy the content of a Periodic Advertisement Report to BASE only if the service UUID is Basic Audio Announcement Service UUID. Signed-off-by: Claudia Draghicescu <claudia.rosu@nxp.com> --- net/bluetooth/iso.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)