static __init intcan_init(void){
printk(banner);// 创建接收者高速缓存
rcv_cache =kmem_cache_create("can_receiver",sizeof(structreceiver),0,0,NULL);if(!rcv_cache)return-ENOMEM;/*
* Insert can_rx_alldev_list for reception on all devices.
* This struct is zero initialized which is correct for the
* embedded hlist heads, the dev pointer, and the entries counter.
*/spin_lock(&can_rcvlists_lock);hlist_add_head_rcu(&can_rx_alldev_list.list,&can_rx_dev_list);spin_unlock(&can_rcvlists_lock);// 统计定时器if(stats_timer){
/* the statistics are updated every second (timer triggered) */setup_timer(&can_stattimer, can_stat_update,0);mod_timer(&can_stattimer,round_jiffies(jiffies + HZ));}else
can_stattimer.function =NULL;// 初始化proc文件节点can_init_proc();// 向系统注册PF_CAN协议族sock_register(&can_family_ops);// 监听CAN类型网络设备的注册&去注册register_netdevice_notifier(&can_netdev_notifier);// 向网络设备接口层注册接收ETH_P_CAN类型的数据包dev_add_pack