mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
WIP: firmware: sniffer: inbound USB handling
Change-Id: Ic953148600d82285281abcb573a07e2e9b8082a7
This commit is contained in:
@@ -977,8 +977,22 @@ static void usb_send_change(uint32_t flags)
|
|||||||
/* handle incoming message from USB OUT EP */
|
/* handle incoming message from USB OUT EP */
|
||||||
static void dispatch_usb_out(struct msgb *msg, const struct usb_if *usb_if)
|
static void dispatch_usb_out(struct msgb *msg, const struct usb_if *usb_if)
|
||||||
{
|
{
|
||||||
/* currently we don't need any incoming data */
|
struct simtrace_msg_hdr *sh = (Struct simtrace_msg_hdr *) msg->l1h;
|
||||||
msgb_free(msg);
|
|
||||||
|
if (msg_length(msg) < sizeof(*sh)) {
|
||||||
|
usb_buf_free(msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
msg->l2h = msg->l1h + sizeof(*sh);
|
||||||
|
|
||||||
|
switch (sh->msg_class) {
|
||||||
|
case SIMTRACE_MSGC_GENERIC:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
usb_buf_free(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct usb_if sniffer_usb_if = {
|
static const struct usb_if sniffer_usb_if = {
|
||||||
|
|||||||
Reference in New Issue
Block a user