微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > ARM-Linux驱动--DM9000网卡驱动分析(一)

ARM-Linux驱动--DM9000网卡驱动分析(一)

时间:11-20 来源:互联网 点击:

unsigned int num_rx_queues;

#endif

struct netdev_queue rx_queue;

struct netdev_queue *_tx ____cacheline_aligned_in_smp;

unsigned int num_tx_queues;

unsigned int real_num_tx_queues;

struct Qdisc *qdisc;

unsigned long tx_queue_len;

spinlock_t tx_global_lock;

unsigned long trans_start;

int watchdog_timeo;

struct timer_list watchdog_timer;

atomic_t refcnt ____cacheline_aligned_in_smp;

struct list_head todo_list;

struct hlist_node index_hlist;

struct list_head link_watch_list;

enum { NETREG_UNINITIALIZED=0,

NETREG_REGISTERED,

NETREG_UNREGISTERING,

NETREG_UNREGISTERED,

NETREG_RELEASED,

NETREG_DUMMY,

} reg_state:16;

enum {

RTNL_LINK_INITIALIZED,

RTNL_LINK_INITIALIZING,

} rtnl_link_state:16;

void (*destructor)(struct net_device *dev);

#ifdef CONFIG_NETPOLL

struct netpoll_info *npinfo;

#endif

#ifdef CONFIG_NET_NS

struct net *nd_net;

#endif

void *ml_priv;

struct net_bridge_port *br_port;

struct macvlan_port *macvlan_port;

struct garp_port *garp_port;

struct device dev;

const struct attribute_group *sysfs_groups[4];

const struct rtnl_link_ops *rtnl_link_ops;

unsigned long vlan_features;

#define GSO_MAX_SIZE 65536

unsigned int gso_max_size;

#ifdef CONFIG_DCB

const struct dcbnl_rtnl_ops *dcbnl_ops;

#endif

#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)

unsigned int fcoe_ddp_xid;

#endif

struct ethtool_rx_ntuple_list ethtool_ntuple_list;

};

我还没有细细的分析这个结构体,驱动程序在probe函数中使用register_netdev()注册该结构体指明的设备,将内核操作硬件的函数个内核联系起来。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top