mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacmn: Enable CFR for QCA6490 in target interface
This change adds interface to interface to subscibe wdi ppdu desc event, adds pdev init/deinit in target interface. Change-Id: Id6b3dbd500f2f99ab62beeb99b58eb2c22d68857 CRs-Fixed: 2637137
This commit is contained in:
parent
f8596da937
commit
e3ac7503d1
6 changed files with 107 additions and 3 deletions
|
|
@ -26,8 +26,12 @@
|
|||
#include <init_deinit_lmac.h>
|
||||
#include <wlan_cfr_utils_api.h>
|
||||
#include <wlan_objmgr_pdev_obj.h>
|
||||
#include <target_if_cfr_8074v2.h>
|
||||
#include <target_if_cfr_6018.h>
|
||||
#ifdef CFR_USE_FIXED_FOLDER
|
||||
#include "target_if_cfr_6490.h"
|
||||
#else
|
||||
#include <target_if_cfr_8074v2.h>
|
||||
#endif
|
||||
|
||||
int target_if_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_peer *peer)
|
||||
|
|
@ -166,6 +170,43 @@ int target_if_cfr_get_target_type(struct wlan_objmgr_psoc *psoc)
|
|||
return target_type;
|
||||
}
|
||||
|
||||
#ifdef CFR_USE_FIXED_FOLDER
|
||||
int target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
uint32_t target_type;
|
||||
QDF_STATUS status;
|
||||
|
||||
target_type = target_if_cfr_get_target_type(psoc);
|
||||
|
||||
if (target_type == TARGET_TYPE_QCA6490) {
|
||||
status = cfr_6490_init_pdev(psoc, pdev);
|
||||
} else {
|
||||
cfr_info("unsupport chip");
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
int target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
uint32_t target_type;
|
||||
QDF_STATUS status;
|
||||
|
||||
target_type = target_if_cfr_get_target_type(psoc);
|
||||
|
||||
if (target_type == TARGET_TYPE_QCA6490) {
|
||||
status = cfr_6490_deinit_pdev(psoc, pdev);
|
||||
} else {
|
||||
cfr_info("unsupport chip");
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
#else
|
||||
int target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
|
|
@ -225,6 +266,7 @@ int target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
|
|||
} else
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_ENH_CFR_ENABLE
|
||||
QDF_STATUS target_if_cfr_config_rcc(struct wlan_objmgr_pdev *pdev,
|
||||
|
|
@ -301,6 +343,17 @@ void target_if_cfr_default_ta_ra_config(struct cfr_rcc_param *rcc_info,
|
|||
#endif
|
||||
|
||||
#ifdef WLAN_ENH_CFR_ENABLE
|
||||
#ifdef CFR_USE_FIXED_FOLDER
|
||||
static void target_if_enh_cfr_add_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
tx_ops->cfr_tx_ops.cfr_subscribe_ppdu_desc =
|
||||
target_if_cfr_subscribe_ppdu_desc;
|
||||
}
|
||||
#else
|
||||
static void target_if_enh_cfr_add_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
}
|
||||
#endif /* CFR_USE_FIXED_FOLDER */
|
||||
static void target_if_enh_cfr_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
tx_ops->cfr_tx_ops.cfr_config_rcc =
|
||||
|
|
@ -317,6 +370,7 @@ static void target_if_enh_cfr_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
|||
target_if_cfr_rx_tlv_process;
|
||||
tx_ops->cfr_tx_ops.cfr_update_global_cfg =
|
||||
target_if_cfr_update_global_cfg;
|
||||
target_if_enh_cfr_add_ops(tx_ops);
|
||||
}
|
||||
#else
|
||||
static void target_if_enh_cfr_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-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
|
||||
|
|
@ -165,5 +165,16 @@ void tgt_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf);
|
|||
* @pdev: pointer to pdev_object
|
||||
*/
|
||||
void tgt_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* tgt_cfr_subscribe_ppdu_desc() - Target interface to
|
||||
* subscribe/unsubscribe WDI PPDU desc event
|
||||
* @pdev: pointer to pdev_object
|
||||
* @is_subscribe: subscribe or unsubscribei
|
||||
*
|
||||
* return QDF status
|
||||
*/
|
||||
QDF_STATUS tgt_cfr_subscribe_ppdu_desc(struct wlan_objmgr_pdev *pdev,
|
||||
bool is_subscribe);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -263,5 +263,16 @@ QDF_STATUS ucfg_cfr_rcc_clr_dbg_counters(struct wlan_objmgr_vdev *vdev);
|
|||
* Return: status
|
||||
*/
|
||||
QDF_STATUS ucfg_cfr_rcc_dump_lut(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* ucfg_cfr_subscribe_ppdu_desc() - User space interface to
|
||||
* subscribe/unsubscribe WDI PPDU desc event
|
||||
* @pdev: pointer to pdev_object
|
||||
* @is_subscribe: subscribe or unsubscribei
|
||||
*
|
||||
* return QDF status
|
||||
*/
|
||||
QDF_STATUS ucfg_cfr_subscribe_ppdu_desc(struct wlan_objmgr_pdev *pdev,
|
||||
bool is_subscribe);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-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
|
||||
|
|
@ -284,4 +284,24 @@ void tgt_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev)
|
|||
if (cfr_tx_ops->cfr_update_global_cfg)
|
||||
cfr_tx_ops->cfr_update_global_cfg(pdev);
|
||||
}
|
||||
|
||||
QDF_STATUS tgt_cfr_subscribe_ppdu_desc(struct wlan_objmgr_pdev *pdev,
|
||||
bool is_subscribe)
|
||||
{
|
||||
struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
|
||||
if (!psoc) {
|
||||
cfr_err("Invalid psoc\n");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
|
||||
|
||||
if (cfr_tx_ops->cfr_subscribe_ppdu_desc)
|
||||
return cfr_tx_ops->cfr_subscribe_ppdu_desc(pdev,
|
||||
is_subscribe);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1141,4 +1141,10 @@ bool ucfg_cfr_get_rcc_enabled(struct wlan_objmgr_vdev *vdev)
|
|||
|
||||
return rcc_enabled;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_cfr_subscribe_ppdu_desc(struct wlan_objmgr_pdev *pdev,
|
||||
bool is_subscribe)
|
||||
{
|
||||
return tgt_cfr_subscribe_ppdu_desc(pdev, is_subscribe);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -553,6 +553,8 @@ struct wlan_lmac_if_cfr_tx_ops {
|
|||
void (*cfr_dump_lut_enh)(struct wlan_objmgr_pdev *pdev);
|
||||
void (*cfr_rx_tlv_process)(struct wlan_objmgr_pdev *pdev, void *nbuf);
|
||||
void (*cfr_update_global_cfg)(struct wlan_objmgr_pdev *pdev);
|
||||
QDF_STATUS (*cfr_subscribe_ppdu_desc)(struct wlan_objmgr_pdev *pdev,
|
||||
bool is_subscribe);
|
||||
#endif
|
||||
};
|
||||
#endif /* WLAN_CFR_ENABLE */
|
||||
|
|
|
|||
Loading…
Reference in a new issue