From acb460015b28e1294d1efa83865fbcc9e8db2de7 Mon Sep 17 00:00:00 2001 From: Uraj Sasan Date: Mon, 20 Jan 2020 12:51:19 +0530 Subject: [PATCH] qcacmn: Compile qdf as part of single module Adds support to include qdf as part of single module. This is needed for WHUNT testing where we need to have single module, one inserted as AP and one as STA. Change-Id: I8c2aef4cc18391e92f537e2ce791bd5b58b6e764 --- qdf/linux/src/qdf_module.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/qdf/linux/src/qdf_module.c b/qdf/linux/src/qdf_module.c index 92dff158c3..9c1529206c 100644 --- a/qdf/linux/src/qdf_module.c +++ b/qdf/linux/src/qdf_module.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -42,8 +42,11 @@ MODULE_LICENSE("Dual BSD/GPL"); * * Return: int */ -static int __init -qdf_mod_init(void) +#ifndef QCA_SINGLE_WIFI_3_0 +static int __init qdf_mod_init(void) +#else +int qdf_mod_init(void) +#endif { qdf_shared_print_ctrl_init(); qdf_debugfs_init(); @@ -56,15 +59,20 @@ qdf_mod_init(void) return 0; } -module_init(qdf_mod_init); +#ifndef QCA_SINGLE_WIFI_3_0 +module_init(qdf_mod_init); +#endif /** * qdf_mod_exit() - module remove * * Return: int */ -static void __exit -qdf_mod_exit(void) +#ifndef QCA_SINGLE_WIFI_3_0 +static void __exit qdf_mod_exit(void) +#else +void qdf_mod_exit(void) +#endif { qdf_event_list_destroy(); qdf_nbuf_mod_exit(); @@ -75,5 +83,7 @@ qdf_mod_exit(void) qdf_debugfs_exit(); qdf_shared_print_ctrl_cleanup(); } -module_exit(qdf_mod_exit); +#ifndef QCA_SINGLE_WIFI_3_0 +module_exit(qdf_mod_exit); +#endif