diff options
author | Chris Kelly <ckelly@ozmodevices.com> | 2012-02-20 21:11:17 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-24 17:26:50 (GMT) |
commit | 62450bca861f206b09b44492b829b419222c4968 (patch) | |
tree | 8f3d8c442cbd39f1d04c0d60ad5c8c827bbdfd1b /drivers/staging/ozwpan/ozmain.c | |
parent | 3e809144efc37f950606c827f992b653286f5533 (diff) | |
download | linux-fsl-qoriq-62450bca861f206b09b44492b829b419222c4968.tar.xz |
staging: ozwpan: Added driver entry code
This series of patches adds the Ozmo USB over WiFi driver to the
driver staging directory. This is a driver for a virtual USB HCD
and uses an L2 network protocol to talk to the device.
This patch adds the driver entry code and a README file with more
details.
Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan/ozmain.c')
-rw-r--r-- | drivers/staging/ozwpan/ozmain.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/ozmain.c b/drivers/staging/ozwpan/ozmain.c new file mode 100644 index 0000000..d34242b --- /dev/null +++ b/drivers/staging/ozwpan/ozmain.c @@ -0,0 +1,60 @@ +/* ----------------------------------------------------------------------------- + * Copyright (c) 2011 Ozmo Inc + * Released under the GNU General Public License Version 2 (GPLv2). + * ----------------------------------------------------------------------------- + */ +#include <linux/init.h> +#include <linux/module.h> +#include <linux/timer.h> +#include <linux/sched.h> +#include <linux/netdevice.h> +#include <linux/errno.h> +#include <linux/ieee80211.h> +#include "ozconfig.h" +#include "ozpd.h" +#include "ozproto.h" +#include "ozcdev.h" +#include "ozalloc.h" +#include "oztrace.h" +#include "ozevent.h" +/*------------------------------------------------------------------------------ + * The name of the 802.11 mac device. Empty string is the default value but a + * value can be supplied as a parameter to the module. An empty string means + * bind to nothing. '*' means bind to all netcards - this includes non-802.11 + * netcards. Bindings can be added later using an IOCTL. + */ +char *g_net_dev = ""; +/*------------------------------------------------------------------------------ + * Context: process + */ +static int __init ozwpan_init(void) +{ + oz_event_init(); + oz_cdev_register(); + oz_protocol_init(g_net_dev); + oz_app_enable(OZ_APPID_USB, 1); + oz_apps_init(); + return 0; +} +/*------------------------------------------------------------------------------ + * Context: process + */ +static void __exit ozwpan_exit(void) +{ + oz_protocol_term(); + oz_apps_term(); + oz_cdev_deregister(); + oz_trace_leaks(); + oz_event_term(); +} +/*------------------------------------------------------------------------------ + */ +module_param(g_net_dev, charp, S_IRUGO); +module_init(ozwpan_init); +module_exit(ozwpan_exit); + +MODULE_AUTHOR("Chris Kelly"); +MODULE_DESCRIPTION("Ozmo Devices USB over WiFi hcd driver"); +MODULE_VERSION("1.0.8"); +MODULE_LICENSE("GPL"); + |