qcacmn: Add a callback to the FW assert function in Spectral module

As Spectral module is loaded before qca_ol module and the FW assert
function is compiled in qca_ol module, FW assert function will be an
unknown symbol when used inside Spectral module.
To fix this, register a callback to the FW assert function and
use that callback in Spectral module.

Change-Id: I6ca18b151e86b93de9988bc6026894617f2168a2
CRs-Fixed: 2507522
Bu işleme şunda yer alıyor:
Shiva Krishna Pittala
2019-08-12 15:07:57 +05:30
işlemeyi yapan: nshrivas
ebeveyn 511db296dd
işleme 71bc664165
3 değiştirilmiş dosya ile 36 ekleme ve 8 silme

Dosyayı Görüntüle

@@ -2886,13 +2886,14 @@ void
target_if_register_wmi_spectral_cmd_ops(struct wlan_objmgr_pdev *pdev,
struct wmi_spectral_cmd_ops *cmd_ops)
{
struct target_if_spectral *spectral = NULL;
struct target_if_spectral *spectral =
get_target_if_spectral_handle_from_pdev(pdev);
spectral = get_target_if_spectral_handle_from_pdev(pdev);
spectral->param_wmi_cmd_ops.wmi_spectral_configure_cmd_send =
cmd_ops->wmi_spectral_configure_cmd_send;
spectral->param_wmi_cmd_ops.wmi_spectral_enable_cmd_send =
cmd_ops->wmi_spectral_enable_cmd_send;
if (!spectral) {
spectral_err("Spectral LMAC object is null");
return;
}
spectral->param_wmi_cmd_ops = *cmd_ops;
}
/**

Dosyayı Görüntüle

@@ -688,8 +688,9 @@ struct vdev_spectral_enable_params;
/**
* struct wmi_spectral_cmd_ops - structure used holding the operations
* related to wmi commands on spectral parameters.
* @wmi_spectral_configure_cmd_send:
* @wmi_spectral_enable_cmd_send:
* @wmi_spectral_configure_cmd_send: Configure Spectral parameters
* @wmi_spectral_enable_cmd_send: Enable/Disable Spectral
* @wmi_spectral_crash_inject: Inject FW crash
*/
struct wmi_spectral_cmd_ops {
QDF_STATUS (*wmi_spectral_configure_cmd_send)(
@@ -698,6 +699,8 @@ struct wmi_spectral_cmd_ops {
QDF_STATUS (*wmi_spectral_enable_cmd_send)(
wmi_unified_t wmi_hdl,
struct vdev_spectral_enable_params *param);
QDF_STATUS(*wmi_spectral_crash_inject)(
wmi_unified_t wmi_handle, struct crash_inject *param);
};
/**
@@ -1894,6 +1897,14 @@ target_if_consume_spectral_report_gen3(
struct spectral_report *report);
#endif
/**
* target_if_spectral_fw_hang() - Crash the FW from Spectral module
* @spectral: Pointer to Spectral LMAC object
*
* Return: QDF_STATUS of operation
*/
QDF_STATUS target_if_spectral_fw_hang(struct target_if_spectral *spectral);
#ifdef WIN32
#pragma pack(pop, target_if_spectral)
#endif

Dosyayı Görüntüle

@@ -28,6 +28,7 @@
#include <wlan_lmac_if_def.h>
#include <wlan_osif_priv.h>
#include <reg_services_public_struct.h>
#include <target_if.h>
#ifdef DIRECT_BUF_RX_ENABLE
#include <target_if_direct_buf_rx_api.h>
#endif
@@ -152,6 +153,21 @@ target_if_spectral_dump_fft(uint8_t *pfft, int fftlen)
return 0;
}
QDF_STATUS target_if_spectral_fw_hang(struct target_if_spectral *spectral)
{
struct crash_inject param;
if (!spectral) {
spectral_err("Spectral LMAC object is null");
return QDF_STATUS_E_INVAL;
}
qdf_mem_set(&param, sizeof(param), 0);
param.type = 1; //RECOVERY_SIM_ASSERT
return spectral->param_wmi_cmd_ops.wmi_spectral_crash_inject(
GET_WMI_HDL_FROM_PDEV(spectral->pdev_obj), &param);
}
void
target_if_dbg_print_samp_param(struct target_if_samp_msg_params *p)
{