Commit 098ff9b2 authored by Pat Tjin's avatar Pat Tjin
Browse files

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: default avatarPat Tjin <pattjin@google.com>
Change-Id: I3dd4990dc16168e5e8999ea09925b4b47c842a4b
parent b45871a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment