Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[cascardo/linux.git] / drivers / staging / ozwpan / ozmain.c
1 /* -----------------------------------------------------------------------------
2  * Copyright (c) 2011 Ozmo Inc
3  * Released under the GNU General Public License Version 2 (GPLv2).
4  * -----------------------------------------------------------------------------
5  */
6
7 #include <linux/init.h>
8 #include <linux/module.h>
9 #include <linux/timer.h>
10 #include <linux/sched.h>
11 #include <linux/netdevice.h>
12 #include <linux/errno.h>
13 #include <linux/ieee80211.h>
14 #include "ozdbg.h"
15 #include "ozpd.h"
16 #include "ozproto.h"
17 #include "ozcdev.h"
18
19 unsigned int oz_dbg_mask = OZ_DEFAULT_DBG_MASK;
20
21 /*
22  * The name of the 802.11 mac device. Empty string is the default value but a
23  * value can be supplied as a parameter to the module. An empty string means
24  * bind to nothing. '*' means bind to all netcards - this includes non-802.11
25  * netcards. Bindings can be added later using an IOCTL.
26  */
27 static char *g_net_dev = "";
28 module_param(g_net_dev, charp, S_IRUGO);
29 MODULE_PARM_DESC(g_net_dev, "The device(s) to bind to; "
30         "'*' means all, '' (empty string; default) means none.");
31
32 /*
33  * Context: process
34  */
35 static int __init ozwpan_init(void)
36 {
37         oz_cdev_register();
38         oz_protocol_init(g_net_dev);
39         oz_app_enable(OZ_APPID_USB, 1);
40         oz_apps_init();
41         return 0;
42 }
43
44 /*
45  * Context: process
46  */
47 static void __exit ozwpan_exit(void)
48 {
49         oz_protocol_term();
50         oz_apps_term();
51         oz_cdev_deregister();
52 }
53
54 module_init(ozwpan_init);
55 module_exit(ozwpan_exit);
56
57 MODULE_AUTHOR("Chris Kelly");
58 MODULE_DESCRIPTION("Ozmo Devices USB over WiFi hcd driver");
59 MODULE_VERSION("1.0.13");
60 MODULE_LICENSE("GPL");
61