mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
qcacmn: Add api to get dfs offload service bit in target_if
Add api to get dfs offload service bit in target_if. Change-Id: I771ae8a2194250769d6e6d609b0a1863012110ea CRs-Fixed: 2264477
This commit is contained in:
parent
a173a184ae
commit
ecef5a4024
9 changed files with 24 additions and 133 deletions
|
|
@ -195,9 +195,14 @@ static QDF_STATUS target_if_reg_phyerr_events_dfs2(
|
|||
}
|
||||
#endif
|
||||
|
||||
static bool target_if_dfs_offload(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return wmi_service_enabled(get_wmi_unified_hdl_from_psoc(psoc),
|
||||
wmi_service_dfs_phyerr_offload);
|
||||
}
|
||||
|
||||
static QDF_STATUS target_if_dfs_register_event_handler(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
bool dfs_offload)
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct target_psoc_info *tgt_psoc_info;
|
||||
|
||||
|
|
@ -206,7 +211,7 @@ static QDF_STATUS target_if_dfs_register_event_handler(
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!dfs_offload) {
|
||||
if (!target_if_dfs_offload(psoc)) {
|
||||
tgt_psoc_info = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_psoc_info) {
|
||||
target_if_err("null tgt_psoc_info");
|
||||
|
|
@ -359,6 +364,7 @@ QDF_STATUS target_if_register_dfs_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
|||
dfs_tx_ops->dfs_get_caps = &target_if_dfs_get_caps;
|
||||
dfs_tx_ops->dfs_send_avg_radar_params_to_fw =
|
||||
&target_if_dfs_send_avg_params_to_fw;
|
||||
dfs_tx_ops->dfs_is_tgt_offload = &target_if_dfs_offload;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,41 +25,6 @@
|
|||
#ifndef _INIT_DEINIT_LMAC_H_
|
||||
#define _INIT_DEINIT_LMAC_H_
|
||||
|
||||
/**
|
||||
* lmac_get_service_param() - get service param
|
||||
* @psoc: pointer to psoc
|
||||
*
|
||||
* API to get service parameters
|
||||
*
|
||||
* Return: service parameter array pointer
|
||||
*/
|
||||
uint32_t *lmac_get_service_param(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* lmac_is_service_param_bit_enabled() - check service param bit enabled
|
||||
* @service_param: Service bitmap array
|
||||
* @bit_idx: Service bit index to be checked
|
||||
*
|
||||
* API to check service param bitmap
|
||||
*
|
||||
* Return: true, if service is enabled
|
||||
* false, if service is not enabled
|
||||
*/
|
||||
bool lmac_is_service_param_bit_enabled(uint32_t *service_param,
|
||||
uint16_t bit_idx);
|
||||
|
||||
/**
|
||||
* lmac_get_dfs_offload() - get dfs offload
|
||||
* @psoc: pointer to psoc
|
||||
* @is_tgt_offload: boolean flag for offload enabled/disabled
|
||||
*
|
||||
* API to get dfs offload
|
||||
*
|
||||
* Return: SUCCESS, if API is invoked without any failures
|
||||
*/
|
||||
QDF_STATUS lmac_get_dfs_offload(struct wlan_objmgr_psoc *psoc,
|
||||
bool *is_tgt_offload);
|
||||
|
||||
/**
|
||||
* lmac_get_tgt_res_cfg() - get target resource config
|
||||
* @psoc: pointer to psoc
|
||||
|
|
|
|||
|
|
@ -29,24 +29,6 @@
|
|||
#include <init_deinit_lmac.h>
|
||||
#include <qdf_module.h>
|
||||
|
||||
uint32_t *lmac_get_service_param(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct target_psoc_info *tgt_hdl;
|
||||
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_hdl) {
|
||||
target_if_err("target_psoc_info is null");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return target_psoc_get_service_bitmap(tgt_hdl);
|
||||
}
|
||||
|
||||
struct wlan_psoc_target_capability_info *lmac_get_target_cap(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
|
|
@ -66,45 +48,6 @@ struct wlan_psoc_target_capability_info *lmac_get_target_cap(
|
|||
return target_psoc_get_target_caps(tgt_hdl);
|
||||
}
|
||||
|
||||
bool lmac_is_service_param_bit_enabled(uint32_t *service_param,
|
||||
uint16_t bit_idx)
|
||||
{
|
||||
bool retval = false;
|
||||
|
||||
if (((service_param)[(bit_idx) / (sizeof(uint32_t))] &
|
||||
(1 << ((bit_idx) % (sizeof(uint32_t))))) != 0)
|
||||
retval = true;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* dfs offload service bit */
|
||||
#define DFS_SERVICE_PHYERR_OFFLOAD 113
|
||||
|
||||
QDF_STATUS lmac_get_dfs_offload(struct wlan_objmgr_psoc *psoc,
|
||||
bool *is_tgt_offload)
|
||||
{
|
||||
uint32_t *service_bitmap;
|
||||
|
||||
*is_tgt_offload = false;
|
||||
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
service_bitmap = lmac_get_service_param(psoc);
|
||||
if (!service_bitmap) {
|
||||
target_if_err("pdev is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*is_tgt_offload = lmac_is_service_param_bit_enabled(service_bitmap,
|
||||
DFS_SERVICE_PHYERR_OFFLOAD);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
target_resource_config *lmac_get_tgt_res_cfg(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct target_psoc_info *tgt_hdl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue