Matteo Concas commented on a discussion on rtemslwip/greth/greth_netif.c: 
https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/40#note_152470

 > + * @param netif Pointer to the lwIP network interface structure associated 
 > with
 > + *              this GRETH device.
 > + *
 > + * @retval ERR_OK   Initialization completed successfully.
 > + * @retval ERR_IF   Driver attach failed, @ref greth_netif_state allocation
 > + *                  failed, or GRETH device already initialized.
 > + * @retval other    Error code returned by low-level GRETH initialization
 > + *                  functions (e.g., @ref greth_init_hw(),
 > + *                  @ref greth_init_control_structures(),
 > + *                  @ref greth_install_interrupt_handlers()).
 > + */
 > +err_t greth_init_dev_and_lwip_netif( struct netif *netif )
 > +{
 > +  err_t                     ret;
 > +  struct greth_netif_state *nf_state;
 > +  struct lwip_greth_hw_cfg *hw_cfg = netif->state;

True, I forgot to update the `start_networking()` after adding this struct. The 
correct way is to pass NULL for the state parameter in `netif_add()` for the 
most simple implementation (device ID 0 and PHY address read from MDIO register 
reset value). 

The only structure that should be provided in `netif_add()` is a `struct 
lwip_greth_hw_cfg()` to control the device ID and PHY address to use.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/40#note_152470
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to