summaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2016-09-28 18:40:32 -0700
committerJack Pham <jackp@codeaurora.org>2016-10-14 17:51:45 -0700
commit7ce154ad5da4291d9b668ad14d21fe6b08d1f039 (patch)
tree9e53915d28e18a4446b7c577c453f1f6ae73d94b /lib/test-string_helpers.c
parentbeeb22f5e8ce2101b302377e887a82a9c7f8807b (diff)
usb: pd: Correctly handle invalid Structured VDMs
As UFP since the policy engine only responds to the Discover Identity command, all other commands are unrecognized and therefore should be NAKed. Fix the handling as follows: - Ensure the standard Discover Identity was sent using SID of 0xFF00, otherwise it is invalid - Don't NAK incoming Attention messages - When sending a NAK, respond with the same SVID of the initiating command, whether it was correct or not - Enter Mode is not supported in general, but the NAK should also be sent back with the same mode index - Re-issue Discover SVIDs when more than 12 SVIDs are returned - Clean up macro name prefixes from 'VDM' to 'SVDM' to emphasize they are accessing structured VDM specific bits Change-Id: Id2590065a01e46f8da70733d55f3bfabff5b532d Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions