]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - drivers/staging/ozwpan/ozmain.c
Merge tag 'pinctrl-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[mirror_ubuntu-zesty-kernel.git] / drivers / staging / ozwpan / ozmain.c
CommitLineData
62450bca
CK
1/* -----------------------------------------------------------------------------
2 * Copyright (c) 2011 Ozmo Inc
3 * Released under the GNU General Public License Version 2 (GPLv2).
4 * -----------------------------------------------------------------------------
5 */
05f608f2 6
62450bca
CK
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>
05f608f2 14#include "ozdbg.h"
62450bca
CK
15#include "ozpd.h"
16#include "ozproto.h"
17#include "ozcdev.h"
05f608f2
JP
18
19unsigned int oz_dbg_mask = OZ_DEFAULT_DBG_MASK;
20
4e7fb829 21/*
62450bca
CK
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 */
a7f74c30 27static char *g_net_dev = "";
9fca4f70
CJ
28module_param(g_net_dev, charp, S_IRUGO);
29MODULE_PARM_DESC(g_net_dev, "The device(s) to bind to; "
30 "'*' means all, '' (empty string; default) means none.");
6e244a83 31
4e7fb829 32/*
62450bca
CK
33 * Context: process
34 */
35static int __init ozwpan_init(void)
36{
330b5e80
AK
37 int err;
38
39 err = oz_cdev_register();
40 if (err)
41 return err;
42 err = oz_protocol_init(g_net_dev);
43 if (err)
44 goto err_protocol;
62450bca
CK
45 oz_app_enable(OZ_APPID_USB, 1);
46 oz_apps_init();
47 return 0;
330b5e80
AK
48
49err_protocol:
50 oz_cdev_deregister();
51 return err;
62450bca 52}
6e244a83 53
4e7fb829 54/*
62450bca
CK
55 * Context: process
56 */
57static void __exit ozwpan_exit(void)
58{
59 oz_protocol_term();
60 oz_apps_term();
61 oz_cdev_deregister();
62450bca 62}
6e244a83 63
62450bca
CK
64module_init(ozwpan_init);
65module_exit(ozwpan_exit);
66
67MODULE_AUTHOR("Chris Kelly");
68MODULE_DESCRIPTION("Ozmo Devices USB over WiFi hcd driver");
3c1669d8 69MODULE_VERSION("1.0.13");
62450bca
CK
70MODULE_LICENSE("GPL");
71