qcacmn: Add wrapper functions to get the correct pdev_id
Add wrapper functions to get the host pdev id from target pdev id and vice versa. Change-Id: Ib10f6f5625b4a9e1f44a13e9185de75f6df88b3c CRs-Fixed: 2711423
This commit is contained in:

committed by
snandini

parent
065e48fb63
commit
bdecef61b5
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017, 2019-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -119,4 +119,50 @@ static inline QDF_STATUS target_if_wifi_pos_deinit_dma_rings(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CNSS_GENL
|
||||||
|
/**
|
||||||
|
* target_if_wifi_pos_convert_pdev_id_host_to_target: function to get target
|
||||||
|
* pdev_id from host pdev_id
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @host_pdev_id: host pdev id
|
||||||
|
* @target_pdev_id: target pdev id
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS in case of success, error codes in
|
||||||
|
* case of failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS target_if_wifi_pos_convert_pdev_id_host_to_target(
|
||||||
|
struct wlan_objmgr_psoc *psoc, uint32_t host_pdev_id,
|
||||||
|
uint32_t *target_pdev_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_if_wifi_pos_convert_pdev_id_target_to_host: function to get host
|
||||||
|
* pdev_id from target pdev_id
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @target_pdev_id: target pdev id
|
||||||
|
* @host_pdev_id: host pdev id
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS in case of success, error codes in
|
||||||
|
* case of failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS target_if_wifi_pos_convert_pdev_id_target_to_host(
|
||||||
|
struct wlan_objmgr_psoc *psoc, uint32_t target_pdev_id,
|
||||||
|
uint32_t *host_pdev_id);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline QDF_STATUS target_if_wifi_pos_convert_pdev_id_host_to_target(
|
||||||
|
struct wlan_objmgr_psoc *psoc, uint32_t host_pdev_id,
|
||||||
|
uint32_t *target_pdev_id)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS target_if_wifi_pos_convert_pdev_id_target_to_host(
|
||||||
|
struct wlan_objmgr_psoc *psoc, uint32_t target_pdev_id,
|
||||||
|
uint32_t *host_pdev_id)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif /* CNSS_GENL */
|
||||||
|
|
||||||
#endif /* _WIFI_POS_TGT_IF_H_ */
|
#endif /* _WIFI_POS_TGT_IF_H_ */
|
||||||
|
@@ -176,7 +176,7 @@ static int target_if_wifi_pos_oem_rsp_ev_handler(ol_scn_t scn,
|
|||||||
return QDF_STATUS_NOT_INITIALIZED;
|
return QDF_STATUS_NOT_INITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv_obj = wifi_pos_get_psoc_priv_obj(psoc);
|
priv_obj = wifi_pos_get_psoc_priv_obj(wifi_pos_get_psoc());
|
||||||
if (!priv_obj) {
|
if (!priv_obj) {
|
||||||
target_if_err("priv_obj is null");
|
target_if_err("priv_obj is null");
|
||||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_TGT_IF_ID);
|
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_TGT_IF_ID);
|
||||||
@@ -316,6 +316,11 @@ void target_if_wifi_pos_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
|||||||
target_if_wifi_pos_register_events;
|
target_if_wifi_pos_register_events;
|
||||||
wifi_pos_tx_ops->wifi_pos_deregister_events =
|
wifi_pos_tx_ops->wifi_pos_deregister_events =
|
||||||
target_if_wifi_pos_deregister_events;
|
target_if_wifi_pos_deregister_events;
|
||||||
|
wifi_pos_tx_ops->wifi_pos_convert_pdev_id_host_to_target =
|
||||||
|
target_if_wifi_pos_convert_pdev_id_host_to_target;
|
||||||
|
wifi_pos_tx_ops->wifi_pos_convert_pdev_id_target_to_host =
|
||||||
|
target_if_wifi_pos_convert_pdev_id_target_to_host;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline struct wlan_lmac_if_wifi_pos_rx_ops *target_if_wifi_pos_get_rxops(
|
inline struct wlan_lmac_if_wifi_pos_rx_ops *target_if_wifi_pos_get_rxops(
|
||||||
@@ -411,6 +416,38 @@ QDF_STATUS target_if_wifi_pos_deregister_events(struct wlan_objmgr_psoc *psoc)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CNSS_GENL
|
||||||
|
QDF_STATUS target_if_wifi_pos_convert_pdev_id_host_to_target(
|
||||||
|
struct wlan_objmgr_psoc *psoc, uint32_t host_pdev_id,
|
||||||
|
uint32_t *target_pdev_id)
|
||||||
|
{
|
||||||
|
wmi_unified_t wmi_hdl = GET_WMI_HDL_FROM_PSOC(psoc);
|
||||||
|
|
||||||
|
if (!wmi_hdl) {
|
||||||
|
target_if_err("null wmi_hdl");
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wmi_convert_pdev_id_host_to_target(wmi_hdl, host_pdev_id,
|
||||||
|
target_pdev_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS target_if_wifi_pos_convert_pdev_id_target_to_host(
|
||||||
|
struct wlan_objmgr_psoc *psoc, uint32_t target_pdev_id,
|
||||||
|
uint32_t *host_pdev_id)
|
||||||
|
{
|
||||||
|
wmi_unified_t wmi_hdl = GET_WMI_HDL_FROM_PSOC(psoc);
|
||||||
|
|
||||||
|
if (!wmi_hdl) {
|
||||||
|
target_if_err("null wmi_hdl");
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wmi_convert_pdev_id_target_to_host(wmi_hdl, target_pdev_id,
|
||||||
|
host_pdev_id);
|
||||||
|
}
|
||||||
|
#endif /* CNSS_GENL */
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_CIF_CFR
|
#ifdef WLAN_FEATURE_CIF_CFR
|
||||||
static QDF_STATUS target_if_wifi_pos_fill_ring(uint8_t ring_idx,
|
static QDF_STATUS target_if_wifi_pos_fill_ring(uint8_t ring_idx,
|
||||||
struct hal_srng *srng,
|
struct hal_srng *srng,
|
||||||
|
Reference in New Issue
Block a user