xiaoxiang781216 commented on PR #16911: URL: https://github.com/apache/nuttx/pull/16911#issuecomment-3231099942
> @xiaoxiang781216 and @matiamic . I think that some flags or callback into [struct net_driver_s](https://github.com/apache/nuttx/blob/f4142626b9b4a161fc67791a9c09965da6fc6ab2/include/nuttx/net/netdev.h#L308) should be added which inform if Clause 22 or 45 or both are supported. Linux kernel checks that on base of the list registered PHY per network device, see `(mdio->mode_support & MDIO_SUPPORTS_C45)` in [mdio_mii_ioctl](https://elixir.bootlin.com/linux/v6.16.3/source/drivers/net/mdio.c#L355). But we can start with such information per each MAC if it supports C45 or not. > > Only thing to decide is if it should go into some struct net_driver_s field or query function. For flags, d_flags / IFF_xxx is more runtime control, state, not features. d_lltype is not flag based. So some new field or capability query function d_qeury. or it can be internal ioctl to query features which would call d_ioctl and if it is not implemented by driver it would report some default for now... I.e. C22 support. to support per netdev checksum offload, we add d_features to net_driver_s recently, we can add MDIO_SUPPORTS_C45 to this field. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org