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