drivers/usbdev/cdcecm.c: fix cdcecm netdev can not enter running state
Summary
When the setinterface interface is called, it indicates that the underlying USB link has been successfully established. At this point, the status of the network card needs to be updated to RUNNING by calling the netdev_carrier_on interface. It is similar to the logic after a Wi-Fi network card is connected to a hotspot. Otherwise, an incorrect network card status may cause packets to fail to be successfully sent.
Impact
Fixed the issue where the network card status did not enter "running" after the CDCECM usb connection was established.
Testing
sim:usbdev Establish a cdcecm network card connection with HOST Linux and send/receive packets.
@zhhyu7 please include more details in the commit log message what is the problem and calling the netdev_carrier_on() fixes the issue. This way someone reading your commit in the future will be a better understating about the issue
Done.
Can you provide any logs from your testing? And fill out the impact section (something like "bug fix for CDCECM in scenario where ....")
Can you provide any logs from your testing? And fill out the impact section (something like "bug fix for CDCECM in scenario where ....")
@linguini1 I added the ping test log based on the CDCECM in the sim environment.
@linguini1 I added the ping test log based on the CDCECM in the sim environment.
Looks good! I assume the first NuttX test case that failed was before your change? Can you indicate that?