renesas ravb网卡驱动实现分析(linux uboot xvisor)
net_device结构体 相对于linux做了相当大简化,其结构及含义如下: struct net_device { char name[MAX_NETDEV_NAME_LEN]; //用于存放网络设备的设备名称 struct vmm_device *dev; //??? const struct net_device_ops *netdev_ops; //上层ops接口 const struct ethtool_ops *ethtool_ops; //可选ops接口 unsigned int state; //网络设备接口的状态 unsigned int link_state; //链接状态 void *priv; /* Driver specific private data */ void *nsw_priv; /* VMM virtual packet switching layer specific private data.*/ void *net_priv; /* VMM specific private data -Usecase is currently undefined */ unsigned char dev_addr[MAX_NDEV_HW_ADDRESS]; //硬件接口地址 unsigned int hw_addr_len; //硬件地址长度