[Treble-Enabled Device Questions and Answers] irony_delerium:
Wifi P2P ("WiFi Direct") support - does anyone know of patches for this on Pie?

Pretty much exactly as the subject line states.

When doing anything which brings up a P2P interface (right now, that's "cast" or "wifi direct" under settings / wifi / advanced):

02-05 22:44:33.565 10656 10744 I WifiP2pNative: P2P interface teardown completed
02-05 22:44:33.565 10656 10744 E WifiP2pService: Failed to setup interface for P2P
02-05 22:44:33.565 10656 10744 D WifiP2pNative: P2P InterfaceAvailableListener false
02-05 22:44:33.565 10656 10744 D WifiP2pService: Wifi enabled=true, P2P Interface availability=false
02-05 22:44:33.565 10656 10744 D WifiP2pNative: P2P InterfaceDestroyedListener p2p0
02-05 22:44:33.565 10656 10744 D WifiP2pNative: Ignoring stale interface destroyed listener
02-05 22:44:33.565 10656 10744 D WifiP2pNative: P2P InterfaceAvailableListener true
02-05 22:44:33.565 10656 10744 D WifiP2pService: Wifi enabled=true, P2P Interface availability=true, Number of clients=1
02-05 22:44:33.565 10656 10744 D WifiP2pService: Wifi enabled=true, P2P Interface availability=true
02-05 22:44:33.566 10656 10744 D WifiP2pNative: Setup P2P interface
02-05 22:44:33.566 10656 10744 D HalDevMgr: createIface: ifaceType=2, lowPriority=false
02-05 22:44:33.566 10656 10744 D HalDevMgr: getAllChipInfo
02-05 22:44:33.566 10656 10744 D HalDevMgr: getChipIds=[0]
02-05 22:44:33.567 23753 23753 D WifiSettings: onAccessPointsChanged (WifiTracker) callback initiated
02-05 22:44:33.567 10656 10744 D HalDevMgr: validateInterfaceCache
02-05 22:44:33.567 10656 10744 D HalDevMgr: createIfaceIfPossible: chipInfos=[{chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=0, ifaces[3].length=0)], ifaceType=2, lowPriority=false
02-05 22:44:33.567 10656 10744 D HalDevMgr: {.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]} expands to [[1, 0, 1, 0]]
02-05 22:44:33.568 10656 10744 D HalDevMgr: canIfaceComboSupportRequest: chipInfo={chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=0, ifaces[3].length=0), chipMode={.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, chipIfaceCombo=[I@c3022bc, ifaceType=2, lowPriority=false
02-05 22:44:33.568 10656 10744 D HalDevMgr: compareIfaceCreationData: val1={chipInfo={chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=0, ifaces[3].length=0), chipModeId=0, interfacesToBeRemovedFirst=[]), val2=null
02-05 22:44:33.568 10656 10744 D HalDevMgr: new proposal accepted
02-05 22:44:33.568 10656 10744 D HalDevMgr: {.limits = [{.types = [1], .maxIfaces = 1}]} expands to [[0, 1, 0, 0]]
02-05 22:44:33.568 10656 10744 D HalDevMgr: canIfaceComboSupportRequest: chipInfo={chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=0, ifaces[3].length=0), chipMode={.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}, chipIfaceCombo=[I@b776d9a, ifaceType=2, lowPriority=false
02-05 22:44:33.568 10656 10744 D HalDevMgr: Requested type not supported by combo
02-05 22:44:33.568 10656 10744 D HalDevMgr: compareIfaceCreationData: val1=null, val2={chipInfo={chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=0, ifaces[3].length=0), chipModeId=0, interfacesToBeRemovedFirst=[])
02-05 22:44:33.568 10656 10744 D HalDevMgr: executeChipReconfiguration: ifaceCreationData={chipInfo={chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=0, ifaces[3].length=0), chipModeId=0, interfacesToBeRemovedFirst=[]), ifaceType=2
02-05 22:44:33.568 10656 10744 D HalDevMgr: isModeConfigNeeded=false
02-05 22:44:33.568 10656 10793 D HalDevMgr: onIfaceAdded: type=2, name=p2p0
02-05 22:44:33.568 10656 10744 D HalDevMgr: createIfaceIfPossible: added cacheEntry={name=p2p0, type=2, destroyedListeners.size()=1, creationTime=89382364, isLowPriority=false}
02-05 22:44:33.569 10656 10744 D HalDevMgr: dispatchAvailableForRequestListeners
02-05 22:44:33.569 10656 10744 D HalDevMgr: getAllChipInfo
02-05 22:44:33.569 10656 10744 D HalDevMgr: getChipIds=[0]
02-05 22:44:33.569 23753 23761 W System : A resource failed to call close.
02-05 22:44:33.571 10656 10744 D HalDevMgr: dispatchAvailableForRequestListeners: chipInfos=[{chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=1, ifaces[3].length=0)]
02-05 22:44:33.571 10656 10744 D HalDevMgr: dispatchAvailableForRequestListenersForType: ifaceType=1
02-05 22:44:33.571 10656 10744 D HalDevMgr: dispatchAvailableForRequestListenersForType: ifaceType=0
02-05 22:44:33.571 10656 10744 D HalDevMgr: dispatchAvailableForRequestListenersForType: ifaceType=2
02-05 22:44:33.571 23753 23753 D WifiSettings: onAccessPointsChanged (WifiTracker) callback initiated
02-05 22:44:33.571 10656 10744 D HalDevMgr: isItPossibleToCreateIface: chipInfos=[{chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=1, ifaces[3].length=0)], ifaceType=2
02-05 22:44:33.571 10656 10744 D HalDevMgr: {.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]} expands to [[1, 0, 1, 0]]
02-05 22:44:33.571 10656 10744 D HalDevMgr: canIfaceComboSupportRequest: chipInfo={chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=1, ifaces[3].length=0), chipMode={.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, chipIfaceCombo=[I@64ec966, ifaceType=2, lowPriority=false
02-05 22:44:33.571 10656 10744 D HalDevMgr: Would need to delete some higher priority interfaces
02-05 22:44:33.571 10656 10744 D HalDevMgr: {.limits = [{.types = [1], .maxIfaces = 1}]} expands to [[0, 1, 0, 0]]
02-05 22:44:33.571 10656 10744 D HalDevMgr: canIfaceComboSupportRequest: chipInfo={chipId=0, availableModes=[{.id = 0, .availableCombinations = [{.limits = [{.types = [0], .maxIfaces = 1}, {.types = [2], .maxIfaces = 1}]}]}, {.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}], currentModeIdValid=true, currentModeId=0, ifaces[1].length=0, ifaces[0].length=1, ifaces[2].length=1, ifaces[3].length=0), chipMode={.id = 1, .availableCombinations = [{.limits = [{.types = [1], .maxIfaces = 1}]}]}, chipIfaceCombo=[I@de00d54, ifaceType=2, lowPriority=false
02-05 22:44:33.571 10656 10744 D HalDevMgr: Requested type not supported by combo
02-05 22:44:33.571 10656 10744 D HalDevMgr: Interface available for: ifaceType=2 = false
02-05 22:44:33.572 10656 10744 D HalDevMgr: Interface available listener dispatched: ifaceType=2, listener=com.android.server.wifi.HalDeviceManager$InterfaceAvailableForRequestListenerProxy@2c40602
02-05 22:44:33.572 10656 10744 D HalDevMgr: dispatchAvailableForRequestListenersForType: ifaceType=3
02-05 22:44:33.573 10656 10744 I android_os_HwBinder: HwBinder: Starting thread pool for default::android.hardware.wifi.supplicant@1.0::ISupplicant
02-05 22:44:33.574 23753 23753 D WifiSettings: onAccessPointsChanged (WifiTracker) callback initiated
02-05 22:44:33.574 10656 10744 D SupplicantP2pIfaceHal: entering getInterface()
02-05 22:44:33.574 10656 10744 E SupplicantP2pIfaceHal: initSupplicantP2pIface got null iface
02-05 22:44:33.574 10656 10744 E WifiP2pNative: Failed to setup P2p iface in supplicant
02-05 22:44:33.574 10656 10744 D WifiP2pNative: Teardown P2P interface
02-05 22:44:33.574 10656 10744 D HalDevMgr: removeIfaceInternal: iface(name)=p2p0, type=2
02-05 22:44:33.574 10656 10744 D HalDevMgr: getChip: iface(name)=p2p0
02-05 22:44:33.575 10656 10744 D HalDevMgr: dispatchDestroyedListeners: iface(name)=p2p0
02-05 22:44:33.575 10656 10744 D HalDevMgr: dispatchAvailableForRequestListeners
02-05 22:44:33.575 10656 10744 D HalDevMgr: getAllChipInfo

Basically, system_server goes into a tight loop trying and failing repeatedly to bring up p2p0.

This is on Huawei, for what it's worth (Mate 8 - NXT-DL00C17 8.0.0.820; Mate 9 - MHA-AL00C00 8.0.0.374), though given that there are other changes which seem pretty general regarding the wifi HAL between 8.0 and 9.0, it seems likely that there are other things happening that are causing problems and I haven't quite figured it out yet.

For what it's worth: the reason for wanting this is because I've ported Miracast support from Oreo into Pie, and it works on devices I have here with P vendor (Mate 9 AL00C00 9.0.1.150; also apparently working on HMA), but since bringing up the WiFi P2P interface is broken, I can't get any farther with it than that.