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 | */ |
Joe Perches | 05f608f | 2013-07-23 13:45:01 +0100 | [diff] [blame] | 6 | |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 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> |
Joe Perches | 05f608f | 2013-07-23 13:45:01 +0100 | [diff] [blame] | 14 | #include "ozdbg.h" |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 15 | #include "ozpd.h" |
| 16 | #include "ozproto.h" |
| 17 | #include "ozcdev.h" |
Joe Perches | 05f608f | 2013-07-23 13:45:01 +0100 | [diff] [blame] | 18 | |
| 19 | unsigned int oz_dbg_mask = OZ_DEFAULT_DBG_MASK; |
| 20 | |
Rupesh Gujare | 4e7fb82 | 2013-08-23 16:11:02 +0100 | [diff] [blame] | 21 | /* |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 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 | */ |
Peter Huewe | a7f74c3 | 2013-02-15 21:17:22 +0100 | [diff] [blame] | 27 | static char *g_net_dev = ""; |
Rupesh Gujare | 6e244a8 | 2013-08-13 18:24:22 +0100 | [diff] [blame] | 28 | |
Rupesh Gujare | 4e7fb82 | 2013-08-23 16:11:02 +0100 | [diff] [blame] | 29 | /* |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 30 | * Context: process |
| 31 | */ |
| 32 | static int __init ozwpan_init(void) |
| 33 | { |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 34 | oz_cdev_register(); |
| 35 | oz_protocol_init(g_net_dev); |
| 36 | oz_app_enable(OZ_APPID_USB, 1); |
| 37 | oz_apps_init(); |
| 38 | return 0; |
| 39 | } |
Rupesh Gujare | 6e244a8 | 2013-08-13 18:24:22 +0100 | [diff] [blame] | 40 | |
Rupesh Gujare | 4e7fb82 | 2013-08-23 16:11:02 +0100 | [diff] [blame] | 41 | /* |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 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 | } |
Rupesh Gujare | 6e244a8 | 2013-08-13 18:24:22 +0100 | [diff] [blame] | 50 | |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 51 | module_param(g_net_dev, charp, S_IRUGO); |
| 52 | module_init(ozwpan_init); |
| 53 | module_exit(ozwpan_exit); |
| 54 | |
| 55 | MODULE_AUTHOR("Chris Kelly"); |
| 56 | MODULE_DESCRIPTION("Ozmo Devices USB over WiFi hcd driver"); |
Rupesh Gujare | 3c1669d | 2012-07-23 18:49:47 +0100 | [diff] [blame] | 57 | MODULE_VERSION("1.0.13"); |
Chris Kelly | 62450bc | 2012-02-20 21:11:17 +0000 | [diff] [blame] | 58 | MODULE_LICENSE("GPL"); |
| 59 | |