usb: support both rndis and ncm, but not rndis + ncm

A cherry pick from 49a13bf for gs101

Bug: 199252036
Test: Boot to home and usb hal bring up normally
Change-Id: Ia4e344aa9cf7762b71cbfe35ff9cbcccb4474b11
This commit is contained in:
Albert Wang 2021-09-23 14:42:20 +08:00
parent 210475ce59
commit 3773ce8687
2 changed files with 5 additions and 5 deletions

View file

@ -223,14 +223,12 @@ static V1_0::Status validateAndSetVidPid(uint64_t functions) {
case static_cast<uint64_t>(GadgetFunction::NCM):
if (!(vendorFunctions == "user" || vendorFunctions == ""))
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
// TODO(b/170953147): need to request a new PID. Sharing PID of rndis now.
ret = setVidPid("0x18d1", "0x4ee3");
ret = setVidPid("0x18d1", "0x4eeb");
break;
case GadgetFunction::ADB | GadgetFunction::NCM:
if (!(vendorFunctions == "user" || vendorFunctions == ""))
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
// TODO(b/170953147): need to request a new PID. Sharing PID of rndis+adb now.
ret = setVidPid("0x18d1", "0x4ee4");
ret = setVidPid("0x18d1", "0x4eec");
break;
default:
ALOGE("Combination not supported");