原文地址:
http://blog.csdn.net/myarrow/article/details/9300823
1. cfg80211_init
? cfg80211_wq工作队列主要处理以下工作:
1) 清除:wireless_dev.cleanup_work
2) 扫描:cfg80211_registered_device.scan_done_wk
3) 事件:cfg80211_registered_device.event_work
? 注册netlink,其名为:"nl80211",其操作为:nl80211_ops
net/wireless/core.c
-
static int __init cfg80211_init(void)
-
{
-
int err;
-
-
err = register_pernet_device(&cfg80211_pernet_ops);
-
if (err)
-
goto out_fail_pernet;
-
-
err = wiphy_sysfs_init();
-
if (err)
-
goto out_fail_sysfs;
-
-
err = register_netdevice_notifier(&cfg80211_netdev_notifier);
-
if (err)
-
goto out_fail_notifier;
-
-
err = nl80211_init();
-
if (err)
-
goto out_fail_nl80211;
-
-
ieee80211_debugfs_dir = debugfs_create_dir("ieee80211", NULL);
-
-
err = regulatory_init();
-
if (err)
-
goto out_fail_reg;
-
-
cfg80211_wq = create_singlethread_workqueue("cfg80211");
-
if (!cfg80211_wq)
-
goto out_fail_wq;
-
-
return 0;
-
-
out_fail_wq:
-
regulatory_exit();
-
out_fail_reg:
-
debugfs_remove(ieee80211_debugfs_dir);
-
out_fail_nl80211:
-
unregister_netdevice_notifier(&cfg80211_netdev_notifier);
-
out_fail_notifier:
-
wiphy_sysfs_exit();
-
out_fail_sysfs:
-
unregister_pernet_device(&cfg80211_pernet_ops);
-
out_fail_pernet:
-
return err;
-
}
-
subsys_initcall(cfg80211_init);
阅读(1965) | 评论(0) | 转发(1) |