xref: /wlan-dirver/qca-wifi-host-cmn/qdf/linux/src/qdf_module.c (revision 6ecd284e5a94a1c96e26d571dd47419ac305990d)
1 /*
2  * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
3  *
4  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5  *
6  *
7  * Permission to use, copy, modify, and/or distribute this software for
8  * any purpose with or without fee is hereby granted, provided that the
9  * above copyright notice and this permission notice appear in all
10  * copies.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19  * PERFORMANCE OF THIS SOFTWARE.
20  */
21 
22 /*
23  * This file was originally distributed by Qualcomm Atheros, Inc.
24  * under proprietary terms before Copyright ownership was assigned
25  * to the Linux Foundation.
26  */
27 
28 /**
29  * DOC: i_qdf_module.h
30  * Linux-specific definitions for QDF module API's
31  */
32 
33 #include <linux/module.h>
34 #include <qdf_perf.h>
35 #include <qdf_trace.h>
36 #include <qdf_nbuf.h>
37 #include <qdf_mem.h>
38 
39 MODULE_AUTHOR("Qualcomm Atheros Inc.");
40 MODULE_DESCRIPTION("Qualcomm Atheros Device Framework Module");
41 MODULE_LICENSE("Dual BSD/GPL");
42 
43 #ifndef EXPORT_SYMTAB
44 #define EXPORT_SYMTAB
45 #endif
46 
47 /**
48  * qdf_mod_init() - module initialization
49  *
50  * Return: int
51  */
52 static int __init
53 qdf_mod_init(void)
54 {
55 	qdf_shared_print_ctrl_init();
56 	qdf_mem_init();
57 	qdf_logging_init();
58 	qdf_perfmod_init();
59 	qdf_nbuf_mod_init();
60 	return 0;
61 }
62 module_init(qdf_mod_init);
63 
64 /**
65  * qdf_mod_exit() - module remove
66  *
67  * Return: int
68  */
69 static void __exit
70 qdf_mod_exit(void)
71 {
72 	qdf_nbuf_mod_exit();
73 	qdf_perfmod_exit();
74 	qdf_logging_exit();
75 	qdf_mem_exit();
76 	qdf_shared_print_ctrl_cleanup();
77 }
78 module_exit(qdf_mod_exit);
79 
80