Hi Zachary, Thanks for review. > > The protocol has changes since ADL from PlatSapmle to an advanced feature > and the Protocol has shifted into EDK2, so the protocol name needs to be > updated: > + Status = gBS->LocateProtocol (& gWiFiProfileSyncProtocolGuid , NULL, > (VOID **) &WiFiProfileSyncProtocol); > Status = gBS->LocateProtocol (& gEdkiiWiFiProfileSyncProtocolGuid , NULL, > (VOID **)&WiFiProfileSyncProtocol); > > The locate protocol status check is enough and we do not need to add the > NULL check too, we can remove that to keep it lighter. > +    if (!EFI_ERROR (Status) && WiFiProfileSyncProtocol != NULL ) { > > Agree with those changes, please check latest V2 patch or this PR: https://github.com/tianocore/edk2/pull/4561 > > Can we clean up the second locate protocol and bring the Identity allocate > above the protocol check, and bring the two conditions for EapIdentity > copied to Identity into the added protocol check condition. > Here is a view of what I am thinking for consolidation. > We need to get the Identity size before AllocateZeroPool() , not feasible here IMO.