Subash Abhinov Kasiviswanathan | 2139ce8a | 2016-10-14 11:01:48 -0600 | [diff] [blame^] | 1 | /* 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 */ |
| 28 | unsigned int rmnet_data_log_level = RMNET_LOG_LVL_ERR | RMNET_LOG_LVL_HI; |
| 29 | module_param(rmnet_data_log_level, uint, 0644); |
| 30 | MODULE_PARM_DESC(log_level, "Logging level"); |
| 31 | |
| 32 | unsigned int rmnet_data_log_module_mask; |
| 33 | module_param(rmnet_data_log_module_mask, uint, 0644); |
| 34 | MODULE_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 | */ |
| 42 | static 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 | |
| 51 | static void __exit rmnet_exit(void) |
| 52 | { |
| 53 | rmnet_config_exit(); |
| 54 | rmnet_vnd_exit(); |
| 55 | } |
| 56 | |
| 57 | module_init(rmnet_init) |
| 58 | module_exit(rmnet_exit) |
| 59 | MODULE_LICENSE("GPL v2"); |