qcacmn: Refactor Ramdump API and PKTLOG API
Ramdump collection can be supported by buses other than PCIe, and it's done in offload layer when recovery is required. Hence allocate memory dynamically and free it once ramdump collection is complete. PKTLOG is a DataPath Feature, HIF doesn't need to have any info of it. Move pktlog implementation to HTT folder. Change-Id: Ib8c2526ba8900843db2dae8388fe46c9d9e05f22 CRs-Fixed: 967765
This commit is contained in:
@@ -60,10 +60,6 @@
|
||||
#include <soc/qcom/icnss.h>
|
||||
#endif
|
||||
|
||||
#ifndef REMOVE_PKT_LOG
|
||||
#include "pktlog_ac.h"
|
||||
#endif
|
||||
|
||||
#include "cds_concurrency.h"
|
||||
|
||||
#define AGC_DUMP 1
|
||||
@@ -520,7 +516,6 @@ CDF_STATUS hif_open(enum ath_hal_bus_type bus_type)
|
||||
cdf_mem_zero(scn, sizeof(*scn));
|
||||
cfg = hif_get_ini_handle(scn);
|
||||
cfg->max_no_of_peers = 1;
|
||||
scn->pkt_log_init = false;
|
||||
cdf_atomic_init(&scn->wow_done);
|
||||
cdf_atomic_init(&scn->active_tasklet_cnt);
|
||||
cdf_atomic_init(&scn->link_suspended);
|
||||
@@ -631,29 +626,6 @@ CDF_STATUS hif_enable(void *hif_ctx, struct device *dev,
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_pktlogmod_exit(): hif_pktlogmod_exit
|
||||
* @scn: scn
|
||||
*
|
||||
* Return: n/a
|
||||
*/
|
||||
#ifndef REMOVE_PKT_LOG
|
||||
void hif_pktlogmod_exit(void *hif_ctx)
|
||||
{
|
||||
struct ol_softc *scn = hif_ctx;
|
||||
|
||||
if (scn && cds_get_conparam() != CDF_GLOBAL_FTM_MODE &&
|
||||
!WLAN_IS_EPPING_ENABLED(cds_get_conparam()) && scn->pkt_log_init) {
|
||||
pktlogmod_exit(scn);
|
||||
scn->pkt_log_init = false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void hif_pktlogmod_exit(void *hif_ctx)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hif_wlan_disable(): call the platform driver to disable wlan
|
||||
*
|
||||
|
@@ -1321,8 +1321,6 @@ int hif_enable_pci(struct hif_pci_softc *sc,
|
||||
ol_sc->aps_osdev.bc.bc_bustype = HAL_BUS_TYPE_PCI;
|
||||
sc->devid = id->device;
|
||||
sc->cacheline_sz = dma_get_cache_alignment();
|
||||
/* Get RAM dump memory address and size */
|
||||
GET_VIRT_RAMDUMP_MEM(ol_sc);
|
||||
ol_sc->mem = mem;
|
||||
sc->pci_enabled = true;
|
||||
return ret;
|
||||
@@ -2260,10 +2258,6 @@ void hif_enable_power_gating(void *hif_ctx)
|
||||
|
||||
/* Re-enable ASPM after firmware/OTP download is complete */
|
||||
pci_write_config_dword(sc->pdev, 0x80, sc->lcr_val);
|
||||
if (scn->pkt_log_init == false) {
|
||||
PKT_LOG_MOD_INIT(scn);
|
||||
scn->pkt_log_init = true;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI_MSM
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
@@ -50,18 +50,6 @@
|
||||
#define PCI_CFG_TO_DISABLE_L1SS_STATES(pdev, addr)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CNSS) && !defined(QCA_WIFI_3_0)
|
||||
#define GET_VIRT_RAMDUMP_MEM(ol_sc) \
|
||||
{ \
|
||||
ol_sc->ramdump_base = cnss_get_virt_ramdump_mem(&ol_sc->ramdump_size); \
|
||||
if (ol_sc->ramdump_base == NULL || !ol_sc->ramdump_size) \
|
||||
HIF_ERROR("%s: Failed to get RAM dump memory addr or size!", \
|
||||
__func__); \
|
||||
}
|
||||
#else
|
||||
#define GET_VIRT_RAMDUMP_MEM(ol_sc)
|
||||
#endif
|
||||
|
||||
#ifdef QCA_WIFI_3_0
|
||||
#define PCI_CLR_CAUSE0_REGISTER(sc) \
|
||||
{ \
|
||||
@@ -91,20 +79,4 @@
|
||||
return RTC_STATE_V_GET(val) == RTC_STATE_V_ON; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(REMOVE_PKT_LOG) && !defined(QVIT)
|
||||
#define PKT_LOG_MOD_INIT(ol_sc) \
|
||||
{ \
|
||||
ol_txrx_pdev_handle pdev_txrx_handle; \
|
||||
pdev_txrx_handle = cds_get_context(CDF_MODULE_ID_TXRX); \
|
||||
if (cds_get_conparam() != CDF_GLOBAL_FTM_MODE && \
|
||||
!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) { \
|
||||
ol_pl_sethandle(&pdev_txrx_handle->pl_dev, ol_sc); \
|
||||
if (pktlogmod_init(ol_sc)) \
|
||||
HIF_ERROR("%s: pktlogmod_init failed", __func__); \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define PKT_LOG_MOD_INIT(ol_sc)
|
||||
#endif
|
||||
#endif /* __IF_PCI_INTERNAL_H__ */
|
||||
|
@@ -104,7 +104,7 @@ void hif_disable_isr(void *hif_ctx)
|
||||
* hif_dump_snoc_registers(): dump CE debug registers
|
||||
* @scn: struct ol_softc
|
||||
*
|
||||
* This function dumps CE debug registers
|
||||
* This function dumps SNOC debug registers
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
|
Reference in New Issue
Block a user