summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2026-03-12 10:52:51 +0100
committerZixun LI <[email protected]>2026-03-12 10:52:51 +0100
commitc06dc871d651ddaf756afdc59ed148c4b1af314d (patch)
tree7d6dde7cfa59a1f6f1e457b726e44e66b21ade9c /src/class
parent320b92b106713d07731196fc06a5cc2fe6745def (diff)
reset notification state to speed change
Signed-off-by: Zixun LI <[email protected]>
Diffstat (limited to 'src/class')
-rw-r--r--src/class/net/ncm_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/class/net/ncm_device.c b/src/class/net/ncm_device.c
index 3e6891ed7..405e4467b 100644
--- a/src/class/net/ncm_device.c
+++ b/src/class/net/ncm_device.c
@@ -808,8 +808,8 @@ void tud_network_link_state(uint8_t rhport, bool is_up) {
return;
}
- // Reset notification state to send link state update
- ncm_interface.notification_xmit_state = NOTIFICATION_CONNECTED;
+ // Reset notification state to send speed change notification first, then link state notification
+ ncm_interface.notification_xmit_state = NOTIFICATION_SPEED;
// Trigger notification transmission
notification_xmit(rhport, false);
@@ -978,7 +978,7 @@ bool netd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t
notification_xmit(rhport, false);
} else {
// Reset notification state to send link state update when interface is re-activated
- ncm_interface.notification_xmit_state = NOTIFICATION_CONNECTED;
+ ncm_interface.notification_xmit_state = NOTIFICATION_SPEED;
}
tud_control_status(rhport, request);
} break;