1 /*
2 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #include<linux/module.h>
18 #include <wlan_iot_sim_utils_api.h>
19 #include <qdf_types.h>
20 #include<wlan_global_lmac_if_api.h>
21 #include "iot_sim_defs_i.h"
22 #include <dispatcher_init_deinit.h>
23
24 MODULE_LICENSE("Dual BSD/GPL");
25
26 /**
27 * iot_sim_init_module() - Initialize IOT Simulation module
28 *
29 * Return: None
30 */
31
iot_sim_init_module(void)32 static int __init iot_sim_init_module(void)
33 {
34 wlan_iot_sim_init();
35 iot_sim_info("qca_iot_sim module loaded");
36 wlan_lmac_if_iot_sim_set_rx_ops_register_cb(
37 wlan_lmac_if_iot_sim_register_rx_ops);
38 return 0;
39 }
40
41 /**
42 * iot_sim_exit_module() - De-initialize and exit IOT Simulation module
43 *
44 * Return: None
45 */
iot_sim_exit_module(void)46 static void __exit iot_sim_exit_module(void)
47 {
48 wlan_iot_sim_deinit();
49 iot_sim_info("qca_iot_sim module unloaded");
50 }
51
52 module_init(iot_sim_init_module);
53 module_exit(iot_sim_exit_module);
54