usb: pd: Add stricter checking for handling VDM responses
The PD 2.0 compliance tests TD.PD.VDMD.E2 (tVDMSenderResponse
Timeout) and TD.PD.VDMD.E3 (Incorrect Identity Fields) check
that a DFP should drop untimely or invalid responses to SVDM
Discovery messages.
Add a timing marker from the time an SVDM is initiated in
order to track if a response is later than SENDER_RESPONSE_TIME,
and if so, drop it. Also add additional fields checking in
handle_vdm_rx() to determine if the response is well-formed,
otherwise drop it.
Change-Id: I341fcd79abae1b35c0f3105dbb7d30d350ea56be
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment