summaryrefslogtreecommitdiff
path: root/drivers/net/rmnet/rmnet_main.c
blob: 677791893ad4e7d5023d5019167eef3e894fb99b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* Copyright (c) 2013-2014, 2016-2017 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 *
 * RMNET Data generic framework
 *
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include "rmnet_private.h"
#include "rmnet_config.h"
#include "rmnet_vnd.h"

/* Trace Points */
#define CREATE_TRACE_POINTS
#include "rmnet_trace.h"

/* Module Parameters */
unsigned int rmnet_log_level = RMNET_LOG_LVL_ERR | RMNET_LOG_LVL_HI;
module_param(rmnet_log_level, uint, 0644);
MODULE_PARM_DESC(log_level, "Logging level");

unsigned int rmnet_log_module_mask;
module_param(rmnet_log_module_mask, uint, 0644);
MODULE_PARM_DESC(rmnet_log_module_mask, "Logging module mask");

/* Startup/Shutdown */

/* rmnet_init() - Module initialization
 *
 * todo: check for (and init) startup errors
 */
static int __init rmnet_init(void)
{
	rmnet_config_init();
	rmnet_vnd_init();

	LOGL("%s", "RMNET Data driver loaded successfully");
	return 0;
}

static void __exit rmnet_exit(void)
{
	rmnet_config_exit();
	rmnet_vnd_exit();
}

module_init(rmnet_init)
module_exit(rmnet_exit)
MODULE_LICENSE("GPL v2");