p9221_charger: check proprietary packet validity
Check proprietary packet validity before using it for RTX detection.
Do not copy the received proprietary packet into the pp_buf unless
it is of type 0x4F, that will keep us from overwriting the buffer
on other types of proprietary packets.
Add code detect length of received packet according to WPC spec.
Refactor the code to a separate function for readability
Bug: 195201998
Signed-off-by: Pat Tjin <[email protected]>
Change-Id: I3dd4990dc16168e5e8999ea09925b4b47c842a4b
1 file changed