]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/staging/wlan-ng/p80211mod.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
[linux-2.6-omap-h63xx.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 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,25))
64 #include <linux/moduleparam.h>
65 #endif
66
67 #include <linux/kernel.h>
68 #include <linux/sched.h>
69 #include <linux/types.h>
70 #include <linux/wireless.h>
71 #include <linux/netdevice.h>
72
73 #include "version.h"
74 #include "wlan_compat.h"
75
76 /*================================================================*/
77 /* Project Includes */
78
79 #include "p80211types.h"
80 #include "p80211hdr.h"
81 #include "p80211mgmt.h"
82 #include "p80211conv.h"
83 #include "p80211msg.h"
84 #include "p80211netdev.h"
85 #include "p80211req.h"
86
87 /*================================================================*/
88 /* Local Constants */
89
90
91 /*================================================================*/
92 /* Local Macros */
93
94
95 /*================================================================*/
96 /* Local Types */
97
98
99 /*================================================================*/
100 /* Local Static Definitions */
101
102 static char *version = "p80211.o: " WLAN_RELEASE;
103
104
105 /*----------------------------------------------------------------*/
106 /* --Module Parameters */
107
108 int wlan_watchdog = 5000;
109 module_param(wlan_watchdog, int, 0644);
110 MODULE_PARM_DESC(wlan_watchdog, "transmit timeout in milliseconds");
111
112 int wlan_wext_write = 0;
113 #if WIRELESS_EXT > 12
114 module_param(wlan_wext_write, int, 0644);
115 MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions");
116 #endif
117
118 #ifdef WLAN_INCLUDE_DEBUG
119 int wlan_debug=0;
120 module_param(wlan_debug, int, 0644);
121 MODULE_PARM_DESC(wlan_debug, "p80211 debug level");
122 #endif
123
124 MODULE_LICENSE("Dual MPL/GPL");
125
126 /*================================================================*/
127 /* Local Function Declarations */
128
129 int     init_module(void);
130 void    cleanup_module(void);
131
132 /*================================================================*/
133 /* Function Definitions */
134
135 /*----------------------------------------------------------------
136 * init_module
137 *
138 * Module initialization routine, called once at module load time.
139 *
140 * Arguments:
141 *       none
142 *
143 * Returns:
144 *       0       - success
145 *       ~0      - failure, module is unloaded.
146 *
147 * Side effects:
148 *       TODO: define
149 *
150 * Call context:
151 *       process thread (insmod or modprobe)
152 ----------------------------------------------------------------*/
153 int init_module(void)
154 {
155         DBFENTER;
156
157 #if 0
158         printk(KERN_NOTICE "%s (%s) Loaded\n", version, WLAN_BUILD_DATE);
159 #endif
160
161         p80211netdev_startup();
162 #ifdef CONFIG_HOTPLUG
163         p80211_run_sbin_hotplug(NULL, WLAN_HOTPLUG_STARTUP);
164 #endif
165
166         DBFEXIT;
167         return 0;
168 }
169
170
171 /*----------------------------------------------------------------
172 * cleanup_module
173 *
174 * Called at module unload time.  This is our last chance to
175 * clean up after ourselves.
176 *
177 * Arguments:
178 *       none
179 *
180 * Returns:
181 *       nothing
182 *
183 * Side effects:
184 *       TODO: define
185 *
186 * Call context:
187 *       process thread
188 *
189 ----------------------------------------------------------------*/
190 void cleanup_module(void)
191 {
192         DBFENTER;
193
194 #ifdef CONFIG_HOTPLUG
195         p80211_run_sbin_hotplug(NULL, WLAN_HOTPLUG_SHUTDOWN);
196 #endif
197         p80211netdev_shutdown();
198         printk(KERN_NOTICE "%s Unloaded\n", version);
199
200         DBFEXIT;
201         return;
202 }
203
204 EXPORT_SYMBOL(p80211netdev_hwremoved);
205 EXPORT_SYMBOL(register_wlandev);
206 EXPORT_SYMBOL(p80211netdev_rx);
207 EXPORT_SYMBOL(unregister_wlandev);
208 EXPORT_SYMBOL(wlan_setup);
209 EXPORT_SYMBOL(wlan_unsetup);
210 EXPORT_SYMBOL(p80211_suspend);
211 EXPORT_SYMBOL(p80211_resume);
212
213 EXPORT_SYMBOL(p80211skb_free);
214 EXPORT_SYMBOL(p80211skb_rxmeta_attach);
215
216 EXPORT_SYMBOL(p80211wext_event_associated);