Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d63656e authored by David Collins's avatar David Collins
Browse files

bif: bif-core: parse secondary slave data



Ensure that BIF data of secondary slaves is parsed when selecting
the secondary slaves based on a BIF secondary slave object read
out of the primary slave.

Change-Id: Id0daceb37c5c052fd149cd7f8015bb54e5b425fb
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 795c7f2e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2336,6 +2336,12 @@ static int bif_add_secondary_slaves(struct bif_slave_dev *primary_slave)
			} else if (rc == 1) {
				sdev->present = true;
				sdev->bdev->selected_sdev = sdev;
				rc = bif_parse_slave_data(sdev);
				if (rc) {
					pr_err("Failed to parse secondary slave data, rc=%d\n",
						rc);
					goto free_slave;
				}
			} else {
				sdev->present = false;
				sdev->bdev->selected_sdev = NULL;
@@ -2459,6 +2465,11 @@ static int bif_perform_uid_search(struct bif_ctrl_dev *bdev)
			sdev->present = true;
			sdev->bdev->selected_sdev = sdev;
			rc = bif_parse_slave_data(sdev);
			if (rc) {
				pr_err("Failed to parse secondary slave data, rc=%d\n",
					rc);
				return rc;
			}
		} else {
			pr_err("Slave failed to respond to DILC bus command; its UID is thus unverified.\n");
			sdev->unique_id_bits_known = 0;