qcacmn: Remove void pointer usage for ctrl psoc
Make change to remove usage of void pointers for ctrl psoc in DP and instead use a opaque pointer struct cdp_ctrl_objmgr_psoc. Change-Id: I9fac21db1156378fc10b95cf10517afa4364da00 CRs-Fixed: 2484411
This commit is contained in:
@@ -70,7 +70,8 @@ struct cfg_values {
|
|||||||
|
|
||||||
struct cfg_values *cfg_psoc_get_values(struct wlan_objmgr_psoc *psoc);
|
struct cfg_values *cfg_psoc_get_values(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
#define __cfg_get(psoc, id) (cfg_psoc_get_values(psoc)->id##_internal)
|
#define __cfg_get(psoc, id) (cfg_psoc_get_values( \
|
||||||
|
(struct wlan_objmgr_psoc *)psoc)->id##_internal)
|
||||||
|
|
||||||
#endif /* __I_CFG_H */
|
#endif /* __I_CFG_H */
|
||||||
|
|
||||||
|
@@ -57,14 +57,17 @@ ol_txrx_soc_handle ol_txrx_soc_attach(void *scn_handle, struct ol_if_ops *dp_ol_
|
|||||||
* Return: DP SOC handle on success, NULL on failure
|
* Return: DP SOC handle on success, NULL on failure
|
||||||
*/
|
*/
|
||||||
#if defined(QCA_WIFI_QCA8074) || defined(QCA_WIFI_QCA6018)
|
#if defined(QCA_WIFI_QCA8074) || defined(QCA_WIFI_QCA6018)
|
||||||
void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
|
void *dp_soc_attach_wifi3(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id);
|
struct ol_if_ops *ol_ops, uint16_t device_id);
|
||||||
void *dp_soc_init_wifi3(void *soc, void *ctrl_psoc, void *hif_handle,
|
void *dp_soc_init_wifi3(void *soc, struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id);
|
struct ol_if_ops *ol_ops, uint16_t device_id);
|
||||||
#else
|
#else
|
||||||
static inline void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
|
static inline void *dp_soc_attach_wifi3(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle,
|
HTC_HANDLE htc_handle,
|
||||||
qdf_device_t qdf_osdev,
|
qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops,
|
struct ol_if_ops *ol_ops,
|
||||||
@@ -74,7 +77,8 @@ static inline void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void *dp_soc_init_wifi3(void *soc, void *ctrl_psoc, void *hif_handle,
|
void *dp_soc_init_wifi3(void *soc, struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id)
|
struct ol_if_ops *ol_ops, uint16_t device_id)
|
||||||
{
|
{
|
||||||
|
@@ -358,7 +358,7 @@ enum cdp_ast_free_status {
|
|||||||
* @cookie: cookie
|
* @cookie: cookie
|
||||||
* @cdp_ast_free_status: ast free status
|
* @cdp_ast_free_status: ast free status
|
||||||
*/
|
*/
|
||||||
typedef void (*txrx_ast_free_cb)(void *ctrl_soc,
|
typedef void (*txrx_ast_free_cb)(struct cdp_ctrl_objmgr_psoc *ctrl_soc,
|
||||||
void *cdp_soc,
|
void *cdp_soc,
|
||||||
void *cookie,
|
void *cookie,
|
||||||
enum cdp_ast_free_status);
|
enum cdp_ast_free_status);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2019 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
|
||||||
@@ -33,6 +33,11 @@ struct cdp_peer;
|
|||||||
struct cdp_raw_ast;
|
struct cdp_raw_ast;
|
||||||
struct cdp_soc;
|
struct cdp_soc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cdp_ctrl_objmgr_psoc - opaque handle for UMAC psoc object
|
||||||
|
*/
|
||||||
|
struct cdp_ctrl_objmgr_psoc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cdp_ctrl_objmgr_pdev - opaque handle for UMAC pdev object
|
* cdp_ctrl_objmgr_pdev - opaque handle for UMAC pdev object
|
||||||
*/
|
*/
|
||||||
|
@@ -318,7 +318,9 @@ struct cdp_cmn_ops {
|
|||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void *(*txrx_soc_init)(void *soc, void *ctrl_psoc, void *hif_handle,
|
void *(*txrx_soc_init)(void *soc,
|
||||||
|
struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id);
|
struct ol_if_ops *ol_ops, uint16_t device_id);
|
||||||
|
|
||||||
@@ -925,14 +927,17 @@ struct ol_if_ops {
|
|||||||
#else
|
#else
|
||||||
uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh);
|
uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh);
|
||||||
#endif
|
#endif
|
||||||
int (*peer_map_event)(void *ol_soc_handle, uint16_t peer_id, uint16_t hw_peer_id,
|
int (*peer_map_event)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle,
|
||||||
uint8_t vdev_id, uint8_t *peer_mac_addr,
|
uint16_t peer_id, uint16_t hw_peer_id,
|
||||||
enum cdp_txrx_ast_entry_type peer_type,
|
uint8_t vdev_id, uint8_t *peer_mac_addr,
|
||||||
uint32_t tx_ast_hashidx);
|
enum cdp_txrx_ast_entry_type peer_type,
|
||||||
int (*peer_unmap_event)(void *ol_soc_handle, uint16_t peer_id,
|
uint32_t tx_ast_hashidx);
|
||||||
|
int (*peer_unmap_event)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle,
|
||||||
|
uint16_t peer_id,
|
||||||
uint8_t vdev_id);
|
uint8_t vdev_id);
|
||||||
|
|
||||||
int (*get_dp_cfg_param)(void *ol_soc_handle, enum cdp_cfg_param_type param_num);
|
int (*get_dp_cfg_param)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle,
|
||||||
|
enum cdp_cfg_param_type param_num);
|
||||||
|
|
||||||
void (*rx_mic_error)(void *ol_soc_handle,
|
void (*rx_mic_error)(void *ol_soc_handle,
|
||||||
struct cdp_rx_mic_err_info *info);
|
struct cdp_rx_mic_err_info *info);
|
||||||
|
@@ -3581,7 +3581,8 @@ htt_htc_soc_attach(struct htt_soc *soc)
|
|||||||
* Return: HTT handle on success; NULL on failure
|
* Return: HTT handle on success; NULL on failure
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
htt_soc_initialize(struct htt_soc *htt_soc, void *ctrl_psoc,
|
htt_soc_initialize(struct htt_soc *htt_soc,
|
||||||
|
struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
HTC_HANDLE htc_soc,
|
HTC_HANDLE htc_soc,
|
||||||
void *hal_soc, qdf_device_t osdev)
|
void *hal_soc, qdf_device_t osdev)
|
||||||
{
|
{
|
||||||
|
@@ -114,7 +114,7 @@ struct dp_htt_htc_pkt_union {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct htt_soc {
|
struct htt_soc {
|
||||||
void *ctrl_psoc;
|
struct cdp_ctrl_objmgr_psoc *ctrl_psoc;
|
||||||
void *dp_soc;
|
void *dp_soc;
|
||||||
void *hal_soc;
|
void *hal_soc;
|
||||||
/* htt_logger handle */
|
/* htt_logger handle */
|
||||||
@@ -218,7 +218,8 @@ struct htt_rx_ring_tlv_filter {
|
|||||||
* Return: HTT handle on success; NULL on failure
|
* Return: HTT handle on success; NULL on failure
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
htt_soc_initialize(struct htt_soc *htt_soc, void *ctrl_psoc,
|
htt_soc_initialize(struct htt_soc *htt_soc,
|
||||||
|
struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
HTC_HANDLE htc_soc,
|
HTC_HANDLE htc_soc,
|
||||||
void *hal_soc, qdf_device_t osdev);
|
void *hal_soc, qdf_device_t osdev);
|
||||||
|
|
||||||
|
@@ -134,7 +134,8 @@ dp_config_enh_tx_capture(struct cdp_pdev *pdev_handle, int val)
|
|||||||
void *dp_soc_init(void *dpsoc, HTC_HANDLE htc_handle, void *hif_handle);
|
void *dp_soc_init(void *dpsoc, HTC_HANDLE htc_handle, void *hif_handle);
|
||||||
static void dp_pdev_detach(struct cdp_pdev *txrx_pdev, int force);
|
static void dp_pdev_detach(struct cdp_pdev *txrx_pdev, int force);
|
||||||
static struct dp_soc *
|
static struct dp_soc *
|
||||||
dp_soc_attach(void *ctrl_psoc, HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
dp_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, HTC_HANDLE htc_handle,
|
||||||
|
qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id);
|
struct ol_if_ops *ol_ops, uint16_t device_id);
|
||||||
static void dp_pktlogmod_exit(struct dp_pdev *handle);
|
static void dp_pktlogmod_exit(struct dp_pdev *handle);
|
||||||
static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
|
static void *dp_peer_create_wifi3(struct cdp_vdev *vdev_handle,
|
||||||
@@ -4341,7 +4342,8 @@ static QDF_STATUS dp_rxdma_ring_config(struct dp_soc *soc)
|
|||||||
if (soc->cdp_soc.ol_ops->
|
if (soc->cdp_soc.ol_ops->
|
||||||
is_hw_dbs_2x2_capable) {
|
is_hw_dbs_2x2_capable) {
|
||||||
dbs_enable = soc->cdp_soc.ol_ops->
|
dbs_enable = soc->cdp_soc.ol_ops->
|
||||||
is_hw_dbs_2x2_capable(soc->ctrl_psoc);
|
is_hw_dbs_2x2_capable(
|
||||||
|
(void *)soc->ctrl_psoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbs_enable) {
|
if (dbs_enable) {
|
||||||
@@ -9424,7 +9426,8 @@ void dp_soc_set_txrx_ring_map(struct dp_soc *soc)
|
|||||||
*
|
*
|
||||||
* Return: DP SOC handle on success, NULL on failure
|
* Return: DP SOC handle on success, NULL on failure
|
||||||
*/
|
*/
|
||||||
void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
|
void *dp_soc_attach_wifi3(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id)
|
struct ol_if_ops *ol_ops, uint16_t device_id)
|
||||||
{
|
{
|
||||||
@@ -9453,7 +9456,8 @@ void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
|
|||||||
*
|
*
|
||||||
* Return: DP SOC handle on success, NULL on failure
|
* Return: DP SOC handle on success, NULL on failure
|
||||||
*/
|
*/
|
||||||
void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
|
void *dp_soc_attach_wifi3(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id)
|
struct ol_if_ops *ol_ops, uint16_t device_id)
|
||||||
{
|
{
|
||||||
@@ -9477,7 +9481,8 @@ void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
|
|||||||
* Return: DP SOC handle on success, NULL on failure
|
* Return: DP SOC handle on success, NULL on failure
|
||||||
*/
|
*/
|
||||||
static struct dp_soc *
|
static struct dp_soc *
|
||||||
dp_soc_attach(void *ctrl_psoc, HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
dp_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, HTC_HANDLE htc_handle,
|
||||||
|
qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id)
|
struct ol_if_ops *ol_ops, uint16_t device_id)
|
||||||
{
|
{
|
||||||
int int_ctx;
|
int int_ctx;
|
||||||
@@ -9644,7 +9649,8 @@ void *dp_soc_init(void *dpsoc, HTC_HANDLE htc_handle, void *hif_handle)
|
|||||||
*
|
*
|
||||||
* Return: DP SOC handle on success, NULL on failure
|
* Return: DP SOC handle on success, NULL on failure
|
||||||
*/
|
*/
|
||||||
void *dp_soc_init_wifi3(void *dpsoc, void *ctrl_psoc, void *hif_handle,
|
void *dp_soc_init_wifi3(void *dpsoc, struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
|
void *hif_handle,
|
||||||
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
|
||||||
struct ol_if_ops *ol_ops, uint16_t device_id)
|
struct ol_if_ops *ol_ops, uint16_t device_id)
|
||||||
{
|
{
|
||||||
@@ -9684,7 +9690,7 @@ void dp_is_hw_dbs_enable(struct dp_soc *soc,
|
|||||||
bool dbs_enable = false;
|
bool dbs_enable = false;
|
||||||
if (soc->cdp_soc.ol_ops->is_hw_dbs_2x2_capable)
|
if (soc->cdp_soc.ol_ops->is_hw_dbs_2x2_capable)
|
||||||
dbs_enable = soc->cdp_soc.ol_ops->
|
dbs_enable = soc->cdp_soc.ol_ops->
|
||||||
is_hw_dbs_2x2_capable(soc->ctrl_psoc);
|
is_hw_dbs_2x2_capable((void *)soc->ctrl_psoc);
|
||||||
|
|
||||||
*max_mac_rings = (dbs_enable)?(*max_mac_rings):1;
|
*max_mac_rings = (dbs_enable)?(*max_mac_rings):1;
|
||||||
}
|
}
|
||||||
|
@@ -526,7 +526,7 @@ static inline void dp_peer_map_ast(struct dp_soc *soc,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dp_peer_free_hmwds_cb(void *ctrl_psoc,
|
void dp_peer_free_hmwds_cb(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
void *dp_soc,
|
void *dp_soc,
|
||||||
void *cookie,
|
void *cookie,
|
||||||
enum cdp_ast_free_status status)
|
enum cdp_ast_free_status status)
|
||||||
|
@@ -140,7 +140,7 @@ void dp_peer_ast_set_type(struct dp_soc *soc,
|
|||||||
void dp_peer_ast_send_wds_del(struct dp_soc *soc,
|
void dp_peer_ast_send_wds_del(struct dp_soc *soc,
|
||||||
struct dp_ast_entry *ast_entry);
|
struct dp_ast_entry *ast_entry);
|
||||||
|
|
||||||
void dp_peer_free_hmwds_cb(void *ctrl_psoc,
|
void dp_peer_free_hmwds_cb(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
|
||||||
void *dp_soc,
|
void *dp_soc,
|
||||||
void *cookie,
|
void *cookie,
|
||||||
enum cdp_ast_free_status status);
|
enum cdp_ast_free_status status);
|
||||||
|
@@ -829,7 +829,7 @@ struct dp_soc {
|
|||||||
struct cdp_soc_t cdp_soc;
|
struct cdp_soc_t cdp_soc;
|
||||||
|
|
||||||
/* SoC Obj */
|
/* SoC Obj */
|
||||||
void *ctrl_psoc;
|
struct cdp_ctrl_objmgr_psoc *ctrl_psoc;
|
||||||
|
|
||||||
/* OS device abstraction */
|
/* OS device abstraction */
|
||||||
qdf_device_t osdev;
|
qdf_device_t osdev;
|
||||||
|
@@ -284,7 +284,8 @@ void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
|
|||||||
* @psoc - Object manager psoc
|
* @psoc - Object manager psoc
|
||||||
* Return: wlan_cfg_ctx - Handle to Configuration context
|
* Return: wlan_cfg_ctx - Handle to Configuration context
|
||||||
*/
|
*/
|
||||||
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach(void *psoc)
|
struct wlan_cfg_dp_soc_ctxt *
|
||||||
|
wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
@@ -418,7 +419,8 @@ void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
|
|||||||
qdf_mem_free(wlan_cfg_ctx);
|
qdf_mem_free(wlan_cfg_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_attach(void *psoc)
|
struct wlan_cfg_dp_pdev_ctxt *
|
||||||
|
wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
|
struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
|
||||||
qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
|
qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
|
||||||
|
@@ -265,7 +265,8 @@ struct wlan_cfg_dp_pdev_ctxt {
|
|||||||
*
|
*
|
||||||
* Return: Handle to configuration context
|
* Return: Handle to configuration context
|
||||||
*/
|
*/
|
||||||
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach(void *ctrl_obj);
|
struct wlan_cfg_dp_soc_ctxt *
|
||||||
|
wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cfg_soc_detach() - Detach soc configuration handle
|
* wlan_cfg_soc_detach() - Detach soc configuration handle
|
||||||
@@ -287,7 +288,8 @@ void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
|
|||||||
*
|
*
|
||||||
* Return: Handle to configuration context
|
* Return: Handle to configuration context
|
||||||
*/
|
*/
|
||||||
struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_attach(void *ctrl_obj);
|
struct wlan_cfg_dp_pdev_ctxt *
|
||||||
|
wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cfg_pdev_detach() Detach and free pdev configuration handle
|
* wlan_cfg_pdev_detach() Detach and free pdev configuration handle
|
||||||
|
Reference in New Issue
Block a user