Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 1 | /* ----------------------------------------------------------------------------- |
| 2 | * Copyright (c) 2011 Ozmo Inc |
| 3 | * Released under the GNU General Public License Version 2 (GPLv2). |
| 4 | * ----------------------------------------------------------------------------- |
| 5 | */ |
| 6 | #include <linux/init.h> |
| 7 | #include <linux/module.h> |
| 8 | #include <linux/timer.h> |
| 9 | #include <linux/sched.h> |
| 10 | #include <linux/netdevice.h> |
| 11 | #include <linux/errno.h> |
| 12 | #include <linux/ieee80211.h> |
| 13 | #include "ozconfig.h" |
| 14 | #include "ozpd.h" |
| 15 | #include "ozproto.h" |
| 16 | #include "ozcdev.h" |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 17 | #include "oztrace.h" |
| 18 | #include "ozevent.h" |
| 19 | /*------------------------------------------------------------------------------ |
| 20 | * The name of the 802.11 mac device. Empty string is the default value but a |
| 21 | * value can be supplied as a parameter to the module. An empty string means |
| 22 | * bind to nothing. '*' means bind to all netcards - this includes non-802.11 |
| 23 | * netcards. Bindings can be added later using an IOCTL. |
| 24 | */ |
| 25 | char *g_net_dev = ""; |
| 26 | /*------------------------------------------------------------------------------ |
| 27 | * Context: process |
| 28 | */ |
| 29 | static int __init ozwpan_init(void) |
| 30 | { |
| 31 | oz_event_init(); |
| 32 | oz_cdev_register(); |
| 33 | oz_protocol_init(g_net_dev); |
| 34 | oz_app_enable(OZ_APPID_USB, 1); |
| 35 | oz_apps_init(); |
Rupesh Gujare | 68a75f3 | 2012-03-29 13:11:50 +0100 | [diff] [blame] | 36 | #ifdef CONFIG_DEBUG_FS |
| 37 | oz_debugfs_init(); |
| 38 | #endif |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 39 | return 0; |
| 40 | } |
| 41 | /*------------------------------------------------------------------------------ |
| 42 | * Context: process |
| 43 | */ |
| 44 | static void __exit ozwpan_exit(void) |
| 45 | { |
| 46 | oz_protocol_term(); |
| 47 | oz_apps_term(); |
| 48 | oz_cdev_deregister(); |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 49 | oz_event_term(); |
Rupesh Gujare | 68a75f3 | 2012-03-29 13:11:50 +0100 | [diff] [blame] | 50 | #ifdef CONFIG_DEBUG_FS |
| 51 | oz_debugfs_remove(); |
| 52 | #endif |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 53 | } |
| 54 | /*------------------------------------------------------------------------------ |
| 55 | */ |
| 56 | module_param(g_net_dev, charp, S_IRUGO); |
| 57 | module_init(ozwpan_init); |
| 58 | module_exit(ozwpan_exit); |
| 59 | |
| 60 | MODULE_AUTHOR("Chris Kelly"); |
| 61 | MODULE_DESCRIPTION("Ozmo Devices USB over WiFi hcd driver"); |
Rupesh Gujare | 3c1669d | 2012-07-23 18:49:47 +0100 | [diff] [blame] | 62 | MODULE_VERSION("1.0.13"); |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 63 | MODULE_LICENSE("GPL"); |
| 64 | |