Staging: wlan-ng: Eliminate all backwards-compatibility for <2.6.13 kernels.
[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 "version.h"
72 #include "wlan_compat.h"
73
74 /*================================================================*/
75 /* Project Includes */
76
77 #include "p80211types.h"
78 #include "p80211hdr.h"
79 #include "p80211mgmt.h"
80 #include "p80211conv.h"
81 #include "p80211msg.h"
82 #include "p80211netdev.h"
83 #include "p80211req.h"
84
85 /*================================================================*/
86 /* Local Constants */
87
88
89 /*================================================================*/
90 /* Local Macros */
91
92
93 /*================================================================*/
94 /* Local Types */
95
96
97 /*================================================================*/
98 /* Local Static Definitions */
99
100 /*----------------------------------------------------------------*/
101 /* --Module Parameters */
102
103 int wlan_watchdog = 5000;
104 module_param(wlan_watchdog, int, 0644);
105 MODULE_PARM_DESC(wlan_watchdog, "transmit timeout in milliseconds");
106
107 int wlan_wext_write = 1;
108 module_param(wlan_wext_write, int, 0644);
109 MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions");
110
111 #ifdef WLAN_INCLUDE_DEBUG
112 int wlan_debug=0;
113 module_param(wlan_debug, int, 0644);
114 MODULE_PARM_DESC(wlan_debug, "p80211 debug level");
115 #endif
116
117 MODULE_LICENSE("Dual MPL/GPL");
118
119 /*================================================================*/
120 /* Local Function Declarations */
121
122 int     init_module(void);
123 void    cleanup_module(void);
124
125 /*================================================================*/
126 /* Function Definitions */
127
128 /*----------------------------------------------------------------
129 * init_module
130 *
131 * Module initialization routine, called once at module load time.
132 *
133 * Arguments:
134 *       none
135 *
136 * Returns:
137 *       0       - success
138 *       ~0      - failure, module is unloaded.
139 *
140 * Side effects:
141 *       TODO: define
142 *
143 * Call context:
144 *       process thread (insmod or modprobe)
145 ----------------------------------------------------------------*/
146 int init_module(void)
147 {
148         DBFENTER;
149
150         p80211netdev_startup();
151
152         DBFEXIT;
153         return 0;
154 }
155
156
157 /*----------------------------------------------------------------
158 * cleanup_module
159 *
160 * Called at module unload time.  This is our last chance to
161 * clean up after ourselves.
162 *
163 * Arguments:
164 *       none
165 *
166 * Returns:
167 *       nothing
168 *
169 * Side effects:
170 *       TODO: define
171 *
172 * Call context:
173 *       process thread
174 *
175 ----------------------------------------------------------------*/
176 void cleanup_module(void)
177 {
178         DBFENTER;
179
180         p80211netdev_shutdown();
181
182         DBFEXIT;
183         return;
184 }
185
186 EXPORT_SYMBOL(p80211netdev_hwremoved);
187 EXPORT_SYMBOL(register_wlandev);
188 EXPORT_SYMBOL(p80211netdev_rx);
189 EXPORT_SYMBOL(unregister_wlandev);
190 EXPORT_SYMBOL(wlan_setup);
191 EXPORT_SYMBOL(wlan_unsetup);
192 EXPORT_SYMBOL(p80211_suspend);
193 EXPORT_SYMBOL(p80211_resume);
194
195 EXPORT_SYMBOL(p80211skb_free);
196 EXPORT_SYMBOL(p80211skb_rxmeta_attach);
197
198 EXPORT_SYMBOL(p80211wext_event_associated);