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

Commit b5899737 authored by Jack Pham's avatar Jack Pham
Browse files

usb: gadget: android: Enable RNDIS_QC depending on transport



On some targets the RNDIS gadget function may support BAM-to-BAM
transport, and is handled by the alternate f_qc_rndis driver. In
order to select the correct gadget driver while simplifying
existing userspace composition scripts that already supply "rndis"
as the function name, check the rndis_transports field if
'BAM2BAM_IPA' is supplied, and if so, enable the "rndis_qc"
function instead.

Change-Id: Ia965e1dffd2d74abe07aa6ca3cd9ced4dcba1e0f
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 898e7ffc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2999,6 +2999,11 @@ functions_store(struct device *pdev, struct device_attribute *attr,
					ffs_enabled = 1;
				continue;
			}

			if (!strcmp(name, "rndis") &&
				!strcmp(strim(rndis_transports), "BAM2BAM_IPA"))
				name = "rndis_qc";

			err = android_enable_function(dev, conf, name);
			if (err)
				pr_err("android_usb: Cannot enable '%s' (%d)",