qcacmn: Have separate macros for DA/PO/FO to reduce the code size
Since, an AP may have any combinations of DA,PO, and FO chips on it, having support for all chips always is redundant. Therefore, enable the chip specific code as and when required. DA:- Direct attach PO:- Partial offload FO:- Full offload WLAN_DFS_DIRECT_ATTACH :- enable/disable DA specific DFS code. WLAN_DFS_PARTIAL_OFFLOAD :- enable/disable PO specific DFS code. WLAN_DFS_FULL_OFFLOAD :- enable/disable FO specific DFS code. Change-Id: I498ac1f8cd1d6423032d7b3b8c233656c5f0bf22 CRs-Fixed: 2199819
This commit is contained in:

committad av
nshrivas

förälder
d75cdc199e
incheckning
ed8c9d3bc8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
@@ -31,3 +31,16 @@
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS target_if_register_dfs_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
|
||||
|
||||
/**
|
||||
* target_if_dfs_get_rx_ops() - Get dfs_rx_ops
|
||||
* @psoc: psoc handle.
|
||||
*
|
||||
* Return: dfs_rx_ops.
|
||||
*/
|
||||
static inline struct wlan_lmac_if_dfs_rx_ops *
|
||||
target_if_dfs_get_rx_ops(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return &psoc->soc_cb.rx_ops.dfs_rx_ops;
|
||||
}
|
||||
|
||||
|
64
target_if/dfs/inc/target_if_dfs_full_offload.h
Normal file
64
target_if/dfs/inc/target_if_dfs_full_offload.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2018 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
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: target_if_dfs_full_offload.h
|
||||
* This file contains dfs target interface for full-offload.
|
||||
*/
|
||||
|
||||
#ifndef _TARGET_IF_DFS_FULL_OFFLOAD_H_
|
||||
#define _TARGET_IF_DFS_FULL_OFFLOAD_H_
|
||||
|
||||
/**
|
||||
* target_if_dfs_reg_offload_events() - registers dfs events for full offload.
|
||||
* @psoc: Pointer to psoc object.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
#if defined(WLAN_DFS_FULL_OFFLOAD)
|
||||
QDF_STATUS target_if_dfs_reg_offload_events(struct wlan_objmgr_psoc *psoc);
|
||||
#else
|
||||
static QDF_STATUS
|
||||
target_if_dfs_reg_offload_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* target_process_bang_radar_cmd() - fill unit test args and send bangradar
|
||||
* command to firmware.
|
||||
* @pdev: Pointer to DFS pdev object.
|
||||
* @dfs_unit_test: Pointer to dfs_unit_test structure.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
#if defined(WLAN_DFS_FULL_OFFLOAD)
|
||||
QDF_STATUS target_process_bang_radar_cmd(struct wlan_objmgr_pdev *pdev,
|
||||
struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test);
|
||||
#else
|
||||
static QDF_STATUS target_process_bang_radar_cmd(struct wlan_objmgr_pdev *pdev,
|
||||
struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TARGET_IF_DFS_FULL_OFFLOAD_H_ */
|
||||
|
61
target_if/dfs/inc/target_if_dfs_partial_offload.h
Normal file
61
target_if/dfs/inc/target_if_dfs_partial_offload.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2018 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
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: target_if_dfs_partial_offload.h
|
||||
* This file contains dfs target interface for partial offload.
|
||||
*/
|
||||
|
||||
#ifndef _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_
|
||||
#define _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_
|
||||
|
||||
/**
|
||||
* target_if_dfs_reg_phyerr_events() - register phyerror events.
|
||||
* @psoc: Pointer to psoc object.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
#if defined(WLAN_DFS_PARTIAL_OFFLOAD)
|
||||
QDF_STATUS target_if_dfs_reg_phyerr_events(struct wlan_objmgr_psoc *psoc);
|
||||
#else
|
||||
static QDF_STATUS
|
||||
target_if_dfs_reg_phyerr_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* target_if_dfs_get_caps() - get dfs caps.
|
||||
* @pdev: Pointer to DFS pdev object.
|
||||
* @dfs_caps: Pointer to dfs_caps structure.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
#if defined(WLAN_DFS_PARTIAL_OFFLOAD)
|
||||
QDF_STATUS target_if_dfs_get_caps(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_dfs_caps *dfs_caps);
|
||||
#else
|
||||
static QDF_STATUS target_if_dfs_get_caps(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_dfs_caps *dfs_caps)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#endif /* _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_ */
|
Referens i nytt ärende
Block a user