blob: b5baa6f9410f98a8a63012fee074a4e095b407c1 [file] [log] [blame]
Subash Abhinov Kasiviswanathan2139ce8a2016-10-14 11:01:48 -06001/* Copyright (c) 2013-2014, 2016 The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 *
13 * RMNET Data generic framework
14 */
15
16#include <linux/module.h>
17#include <linux/kernel.h>
18#include <linux/export.h>
19#include "rmnet_data_private.h"
20#include "rmnet_data_config.h"
21#include "rmnet_data_vnd.h"
22
23/* Trace Points */
24#define CREATE_TRACE_POINTS
25#include "rmnet_data_trace.h"
26
27/* Module Parameters */
28unsigned int rmnet_data_log_level = RMNET_LOG_LVL_ERR | RMNET_LOG_LVL_HI;
29module_param(rmnet_data_log_level, uint, 0644);
30MODULE_PARM_DESC(log_level, "Logging level");
31
32unsigned int rmnet_data_log_module_mask;
33module_param(rmnet_data_log_module_mask, uint, 0644);
34MODULE_PARM_DESC(rmnet_data_log_module_mask, "Logging module mask");
35
36/* Startup/Shutdown */
37
38/* rmnet_init() - Module initialization
39 *
40 * todo: check for (and init) startup errors
41 */
42static int __init rmnet_init(void)
43{
44 rmnet_config_init();
45 rmnet_vnd_init();
46
47 LOGL("%s", "RMNET Data driver loaded successfully");
48 return 0;
49}
50
51static void __exit rmnet_exit(void)
52{
53 rmnet_config_exit();
54 rmnet_vnd_exit();
55}
56
57module_init(rmnet_init)
58module_exit(rmnet_exit)
59MODULE_LICENSE("GPL v2");