usb: f_sdp: Update SDP driver to support PQC container
PATCH 1/1 usb: f_sdp: Update SDP driver to support PQC container
From: Ye Li <[email protected]>
Since PQC container has changed version to 0x2 in container header, update the header's check.
Signed-off-by Ye Li <[email protected]>
Signed-off-by Alice Guo <[email protected]>
Acked-by Peng Fan <[email protected]>
Reviewed-by Jacky Bai <[email protected]>
--- drivers/usb/gadget/f_sdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/f_sdp.c +1 -1
@@ -765,7 +765,7 @@ static ulong search_container_header(ulong p, int size)for (i =0 ; i < size; i +=4 ) { hdr = (u8 *)(p + i); -if (*(hdr +3 ) ==0x87 && *hdr ==0 ) +if (*(hdr +3 ) ==0x87 && (*hdr ==0 || *hdr ==2 ))if (*(hdr +1 ) !=0 || *(hdr +2 ) !=0 )return p + i; }
Signature · 1 line
2.43.0