-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usb: device_next: USB CDC NCM class implementation #79508
base: main
Are you sure you want to change the base?
Conversation
f299a12
to
d1efbbf
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Net part looks ok.
|
LOG_WRN("New configuration, interface %u alternate %u", | ||
iface, alternate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be LOG_INF, otherwise we will get bug reports for this.
LOG_INF("New configuration, interface %u alternate %u",
iface, alternate);
case SET_NTB_FORMAT: | ||
LOG_DBG("SET_NTB_FORMAT"); | ||
break; | ||
|
||
case SET_ETHERNET_PACKET_FILTER: | ||
LOG_DBG("SET_ETHERNET_PACKET_FILTER"); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed that. Looks like typo, GET_NTB_FORMAT? (Needs to be implemented or removed if not required).
But there is no GET_ETHERNET_PACKET_FILTER.
(Set request, SET_.*, are handled above in the control-to-device requests. You will never get this kind of requests in control-to-host.)
net_buf_add_mem(buf, &input_size, sizeof(input_size)); | ||
break; | ||
} | ||
case SET_NTB_INPUT_SIZE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
out: | ||
if (ret < 0) { | ||
errno = -ret; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you do not need ret
at all.
USB NCM Ethernet driver implementation. Signed-off-by: Jukka Rissanen <[email protected]>
Add NCM class to sample usbd initialization and the code triple is set properly. Signed-off-by: Jukka Rissanen <[email protected]>
Add support for USB cdc_ncm to zperf application. Signed-off-by: Jukka Rissanen <[email protected]>
Add support for USB cdc_ncm to echo-server application. Signed-off-by: Jukka Rissanen <[email protected]>
|
This implements USB Network Control Model (NCM) driver for the USB next stack.
Following things are not implemented (yet):
How to try this: