diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 2b3fccef9b94..7d757071630f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -104,6 +104,7 @@ extern int hdd_hostapd_stop(struct net_device *dev); #include "wma.h" #include "cds_concurrency.h" #include "wlan_hdd_green_ap.h" +#include "platform_icnss.h" #ifdef MODULE #define WLAN_MODULE_NAME module_name(THIS_MODULE) @@ -4788,6 +4789,8 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc) goto err_config; } + icnss_set_fw_debug_mode(hdd_ctx->config->enablefwlog); + hdd_ctx->current_intf_count = 0; hdd_ctx->max_intf_count = CSR_ROAM_SESSION_MAX; diff --git a/core/hif/inc/platform_icnss.h b/core/hif/inc/platform_icnss.h new file mode 100644 index 000000000000..40c22b6c265a --- /dev/null +++ b/core/hif/inc/platform_icnss.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2015 The Linux Foundation. All rights reserved. + * + * Previously licensed under the ISC license by Qualcomm Atheros, Inc. + * + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * This file was originally distributed by Qualcomm Atheros, Inc. + * under proprietary terms before Copyright ownership was assigned + * to the Linux Foundation. + */ + +#ifndef _PLATFORM_ICNSS_H_ +#define _PLATFORM_ICNSS_H_ + +#ifdef HIF_PCI +#include "icnss_stub.h" +#else +#include +#endif + +#endif diff --git a/core/hif/src/icnss_stub/icnss_stub.c b/core/hif/src/icnss_stub/icnss_stub.c index 484d1e2cb738..aa958ec335d6 100644 --- a/core/hif/src/icnss_stub/icnss_stub.c +++ b/core/hif/src/icnss_stub/icnss_stub.c @@ -93,6 +93,17 @@ int icnss_wlan_disable(enum icnss_driver_mode mode) return 0; } +/** + * icnss_set_fw_debug_mode() - icnss_set_fw_debug_mode + * @mode: fw debug mode, 0 for QXDM, 1 for WMI + * + * Return: int + */ +int icnss_set_fw_debug_mode(bool mode) +{ + return 0; +} + #else /** @@ -167,6 +178,22 @@ int icnss_wlan_disable(enum icnss_driver_mode con_mode) cnss_wlan_disable(mode); return 0; } + +/** + * icnss_set_fw_debug_mode() - call the platform driver to set fw + * debug mode + * @mode: fw debug mode, 0 for QXDM, 1 for WMI + * + * This function passes the fw debug mode to platform driver. + * cnss_set_fw_debug_mode has been hacked to do a qmi handshake with fw. + * This is not needed for rome. + * + * Return: int + */ +int icnss_set_fw_debug_mode(bool mode) +{ + return cnss_set_fw_debug_mode(mode); +} #endif /** diff --git a/core/hif/src/icnss_stub/icnss_stub.h b/core/hif/src/icnss_stub/icnss_stub.h index bce229a2dbdf..33a83acaab00 100644 --- a/core/hif/src/icnss_stub/icnss_stub.h +++ b/core/hif/src/icnss_stub/icnss_stub.h @@ -121,6 +121,7 @@ struct icnss_soc_info { int icnss_wlan_enable(struct icnss_wlan_enable_cfg *config, enum icnss_driver_mode mode, const char *host_version); int icnss_wlan_disable(enum icnss_driver_mode mode); +int icnss_set_fw_debug_mode(bool mode); int icnss_ce_request_irq(int ce_id, irqreturn_t (*handler)(int ce_id, void *arg), unsigned long flags, const char *name, void *context);