29cae879ff4454ea6b2ac2c330246e6e8a393a8a
[firefly-linux-kernel-4.4.55.git] / drivers / staging / wlan-ng / p80211mod.c
1 /* src/p80211/p80211mod.c
2 *
3 * Module entry and exit for p80211
4 *
5 * Copyright (C) 1999 AbsoluteValue Systems, Inc.  All Rights Reserved.
6 * --------------------------------------------------------------------
7 *
8 * linux-wlan
9 *
10 *   The contents of this file are subject to the Mozilla Public
11 *   License Version 1.1 (the "License"); you may not use this file
12 *   except in compliance with the License. You may obtain a copy of
13 *   the License at http://www.mozilla.org/MPL/
14 *
15 *   Software distributed under the License is distributed on an "AS
16 *   IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
17 *   implied. See the License for the specific language governing
18 *   rights and limitations under the License.
19 *
20 *   Alternatively, the contents of this file may be used under the
21 *   terms of the GNU Public License version 2 (the "GPL"), in which
22 *   case the provisions of the GPL are applicable instead of the
23 *   above.  If you wish to allow the use of your version of this file
24 *   only under the terms of the GPL and not to allow others to use
25 *   your version of this file under the MPL, indicate your decision
26 *   by deleting the provisions above and replace them with the notice
27 *   and other provisions required by the GPL.  If you do not delete
28 *   the provisions above, a recipient may use your version of this
29 *   file under either the MPL or the GPL.
30 *
31 * --------------------------------------------------------------------
32 *
33 * Inquiries regarding the linux-wlan Open Source project can be
34 * made directly to:
35 *
36 * AbsoluteValue Systems Inc.
37 * info@linux-wlan.com
38 * http://www.linux-wlan.com
39 *
40 * --------------------------------------------------------------------
41 *
42 * Portions of the development of this software were funded by
43 * Intersil Corporation as part of PRISM(R) chipset product development.
44 *
45 * --------------------------------------------------------------------
46 *
47 * This file contains the p80211.o entry and exit points defined for linux
48 * kernel modules.
49 *
50 * Notes:
51 * - all module parameters for  p80211.o should be defined here.
52 *
53 * --------------------------------------------------------------------
54 */
55
56 /*================================================================*/
57 /* System Includes */
58
59
60 #include <linux/version.h>
61
62 #include <linux/module.h>
63 #include <linux/moduleparam.h>
64
65 #include <linux/kernel.h>
66 #include <linux/sched.h>
67 #include <linux/types.h>
68 #include <linux/wireless.h>
69 #include <linux/netdevice.h>
70
71 #include "wlan_compat.h"
72
73 /*================================================================*/
74 /* Project Includes */
75
76 #include "p80211types.h"
77 #include "p80211hdr.h"
78 #include "p80211mgmt.h"
79 #include "p80211conv.h"
80 #include "p80211msg.h"
81 #include "p80211netdev.h"
82 #include "p80211req.h"
83
84 /*================================================================*/
85 /* Local Constants */
86
87
88 /*================================================================*/
89 /* Local Macros */
90
91
92 /*================================================================*/
93 /* Local Types */
94
95
96 /*================================================================*/
97 /* Local Static Definitions */
98
99 /*----------------------------------------------------------------*/
100 /* --Module Parameters */
101
102 int wlan_watchdog = 5000;
103 module_param(wlan_watchdog, int, 0644);
104 MODULE_PARM_DESC(wlan_watchdog, "transmit timeout in milliseconds");
105
106 int wlan_wext_write = 1;
107 module_param(wlan_wext_write, int, 0644);
108 MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions");
109
110 #ifdef WLAN_INCLUDE_DEBUG
111 int wlan_debug=0;
112 module_param(wlan_debug, int, 0644);
113 MODULE_PARM_DESC(wlan_debug, "p80211 debug level");
114 #endif
115
116 MODULE_LICENSE("Dual MPL/GPL");
117
118 /*================================================================*/
119 /* Local Function Declarations */
120
121 int     init_module(void);
122 void    cleanup_module(void);
123
124 /*================================================================*/
125 /* Function Definitions */
126
127 /*----------------------------------------------------------------
128 * init_module
129 *
130 * Module initialization routine, called once at module load time.
131 *
132 * Arguments:
133 *       none
134 *
135 * Returns:
136 *       0       - success
137 *       ~0      - failure, module is unloaded.
138 *
139 * Side effects:
140 *       TODO: define
141 *
142 * Call context:
143 *       process thread (insmod or modprobe)
144 ----------------------------------------------------------------*/
145 int init_module(void)
146 {
147         DBFENTER;
148
149         p80211netdev_startup();
150
151         DBFEXIT;
152         return 0;
153 }
154
155
156 /*----------------------------------------------------------------
157 * cleanup_module
158 *
159 * Called at module unload time.  This is our last chance to
160 * clean up after ourselves.
161 *
162 * Arguments:
163 *       none
164 *
165 * Returns:
166 *       nothing
167 *
168 * Side effects:
169 *       TODO: define
170 *
171 * Call context:
172 *       process thread
173 *
174 ----------------------------------------------------------------*/
175 void cleanup_module(void)
176 {
177         DBFENTER;
178
179         p80211netdev_shutdown();
180
181         DBFEXIT;
182         return;
183 }
184
185 EXPORT_SYMBOL(p80211netdev_hwremoved);
186 EXPORT_SYMBOL(register_wlandev);
187 EXPORT_SYMBOL(p80211netdev_rx);
188 EXPORT_SYMBOL(unregister_wlandev);
189 EXPORT_SYMBOL(wlan_setup);
190 EXPORT_SYMBOL(wlan_unsetup);
191 EXPORT_SYMBOL(p80211_suspend);
192 EXPORT_SYMBOL(p80211_resume);
193
194 EXPORT_SYMBOL(p80211skb_free);
195 EXPORT_SYMBOL(p80211skb_rxmeta_attach);
196
197 EXPORT_SYMBOL(p80211wext_event_associated);