diff options
| author | hathach <[email protected]> | 2026-04-28 22:08:28 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-04-28 22:08:28 +0700 |
| commit | 7d556a3ae108fcc43515e1ef2c5ea613ec324551 (patch) | |
| tree | 5e02238c6b8cad4880b2ba2a9fa9983bc79e4a6e /src/class | |
| parent | d3107be360b45c4b8dbc223dcc5e5f57b582c5ff (diff) | |
| parent | 4a4420cd070f4460f6f5ed3c17011d78c325d7c0 (diff) | |
Merge branch 'master' into fork/kira-live/master
# Conflicts:
# src/device/usbd_control.c
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/mtp/mtp_device.c | 2 | ||||
| -rw-r--r-- | src/class/net/ecm_rndis_device.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/class/mtp/mtp_device.c b/src/class/mtp/mtp_device.c index 59096e476..0da984f4a 100644 --- a/src/class/mtp/mtp_device.c +++ b/src/class/mtp/mtp_device.c @@ -321,7 +321,7 @@ bool mtpd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t .session_id = p_mtp->session_id, .request = request, .buf = p_mtp->control_buf, - .bufsize = tu_le16toh(request->wLength), + .bufsize = request->wLength, }; switch (request->bRequest) { diff --git a/src/class/net/ecm_rndis_device.c b/src/class/net/ecm_rndis_device.c index eaa82c187..9282e0605 100644 --- a/src/class/net/ecm_rndis_device.c +++ b/src/class/net/ecm_rndis_device.c @@ -206,14 +206,15 @@ static void ecm_report(bool nc) { }, }; + const uint32_t link_bps = (tud_speed_get() == TUSB_SPEED_HIGH) ? 480000000U : 12000000U; const ecm_notify_t ecm_notify_csc = { .header = { .bmRequestType = 0xA1, .bRequest = 0x2A, /* CONNECTION_SPEED_CHANGE aka ConnectionSpeedChange */ .wLength = 8, }, - .downlink = 9728000, - .uplink = 9728000, + .downlink = link_bps, + .uplink = link_bps, }; ecm_notify_t notify = (nc) ? ecm_notify_nc : ecm_notify_csc; |
