qcacmn: Remove void ptr usage in DP cal client
Make change to remove void pointer usage in DP cal client instead use cdp opaque pointers. Change-Id: Ie966ebb7b6bb937d4ee1d6dce3b040804e61ac37 Crs-Fixed: 2484412
This commit is contained in:
@@ -27,9 +27,10 @@
|
|||||||
*
|
*
|
||||||
* return: void
|
* return: void
|
||||||
*/
|
*/
|
||||||
void dp_cal_client_attach(void **cal_client_ctx, void *pdev,
|
void dp_cal_client_attach(struct cdp_cal_client **cal_client_ctx,
|
||||||
|
struct cdp_pdev *pdev,
|
||||||
qdf_device_t osdev,
|
qdf_device_t osdev,
|
||||||
void (*dp_iterate_peer_list)(void *))
|
void (*dp_iterate_peer_list)(struct cdp_pdev *))
|
||||||
{
|
{
|
||||||
struct cal_client *cal_cl;
|
struct cal_client *cal_cl;
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ qdf_export_symbol(dp_cal_client_attach);
|
|||||||
*
|
*
|
||||||
* return: void
|
* return: void
|
||||||
*/
|
*/
|
||||||
void dp_cal_client_detach(void **cal_client_ctx)
|
void dp_cal_client_detach(struct cdp_cal_client **cal_client_ctx)
|
||||||
{
|
{
|
||||||
struct cal_client *cal_cl;
|
struct cal_client *cal_cl;
|
||||||
|
|
||||||
|
@@ -53,4 +53,8 @@ struct cdp_ctrl_objmgr_vdev;
|
|||||||
*/
|
*/
|
||||||
struct cdp_ctrl_objmgr_peer;
|
struct cdp_ctrl_objmgr_peer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cdp_cal_client - opaque handle for cal client object
|
||||||
|
*/
|
||||||
|
struct cdp_cal_client;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 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
|
||||||
@@ -26,31 +26,34 @@
|
|||||||
#include<cdp_txrx_stats_struct.h>
|
#include<cdp_txrx_stats_struct.h>
|
||||||
#include <qdf_timer.h>
|
#include <qdf_timer.h>
|
||||||
#include <qdf_mem.h>
|
#include <qdf_mem.h>
|
||||||
|
#include <cdp_txrx_handle.h>
|
||||||
|
|
||||||
/*timer will run every 1 sec*/
|
/*timer will run every 1 sec*/
|
||||||
#define DP_CAL_CLIENT_TIME 1000
|
#define DP_CAL_CLIENT_TIME 1000
|
||||||
|
|
||||||
struct cal_client {
|
struct cal_client {
|
||||||
qdf_timer_t cal_client_timer;
|
qdf_timer_t cal_client_timer;
|
||||||
void (*iterate_update_peer_list)(void *ctx);
|
void (*iterate_update_peer_list)(struct cdp_pdev *ctx);
|
||||||
void *pdev_hdl;
|
struct cdp_pdev *pdev_hdl;
|
||||||
};
|
};
|
||||||
|
|
||||||
void dp_cal_client_attach(void **cal_client_ctx, void *pdev, qdf_device_t osdev,
|
void dp_cal_client_attach(struct cdp_cal_client **cal_client_ctx,
|
||||||
void (*iterate_peer_list)(void *));
|
struct cdp_pdev *pdev, qdf_device_t osdev,
|
||||||
void dp_cal_client_detach(void **cal_client_ctx);
|
void (*iterate_peer_list)(struct cdp_pdev *));
|
||||||
|
void dp_cal_client_detach(struct cdp_cal_client **cal_client_ctx);
|
||||||
void dp_cal_client_timer_start(void *ctx);
|
void dp_cal_client_timer_start(void *ctx);
|
||||||
void dp_cal_client_timer_stop(void *ctx);
|
void dp_cal_client_timer_stop(void *ctx);
|
||||||
void dp_cal_client_stats_timer_fn(void *pdev_hdl);
|
void dp_cal_client_stats_timer_fn(void *pdev_hdl);
|
||||||
void dp_cal_client_update_peer_stats(struct cdp_peer_stats *peer_stats);
|
void dp_cal_client_update_peer_stats(struct cdp_peer_stats *peer_stats);
|
||||||
|
|
||||||
#ifndef ATH_SUPPORT_EXT_STAT
|
#ifndef ATH_SUPPORT_EXT_STAT
|
||||||
void dp_cal_client_attach(void **cal_client_ctx, void *pdev, qdf_device_t osdev,
|
void dp_cal_client_attach(struct cdp_cal_client **cal_client_ctx,
|
||||||
void (*iterate_peer_list)(void *))
|
struct cdp_pdev *pdev, qdf_device_t osdev,
|
||||||
|
void (*iterate_peer_list)(struct cdp_pdev *))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void dp_cal_client_detach(void **cal_client_ctx)
|
void dp_cal_client_detach(struct cdp_cal_client **cal_client_ctx)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1328,4 +1328,10 @@ struct cdp_vdev *dp_vdev_to_cdp_vdev(struct dp_vdev *vdev)
|
|||||||
{
|
{
|
||||||
return (struct cdp_vdev *)vdev;
|
return (struct cdp_vdev *)vdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
struct cdp_pdev *dp_pdev_to_cdp_pdev(struct dp_pdev *pdev)
|
||||||
|
{
|
||||||
|
return (struct cdp_pdev *)pdev;
|
||||||
|
}
|
||||||
#endif /* #ifndef _DP_INTERNAL_H_ */
|
#endif /* #ifndef _DP_INTERNAL_H_ */
|
||||||
|
@@ -3321,7 +3321,7 @@ QDF_STATUS dp_mon_rings_setup(struct dp_soc *soc, struct dp_pdev *pdev)
|
|||||||
* @pdev_hdl: pdev handle
|
* @pdev_hdl: pdev handle
|
||||||
*/
|
*/
|
||||||
#ifdef ATH_SUPPORT_EXT_STAT
|
#ifdef ATH_SUPPORT_EXT_STAT
|
||||||
void dp_iterate_update_peer_list(void *pdev_hdl)
|
void dp_iterate_update_peer_list(struct cdp_pdev *pdev_hdl)
|
||||||
{
|
{
|
||||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_hdl;
|
struct dp_pdev *pdev = (struct dp_pdev *)pdev_hdl;
|
||||||
struct dp_soc *soc = pdev->soc;
|
struct dp_soc *soc = pdev->soc;
|
||||||
@@ -3339,7 +3339,7 @@ void dp_iterate_update_peer_list(void *pdev_hdl)
|
|||||||
qdf_spin_unlock_bh(&soc->peer_ref_mutex);
|
qdf_spin_unlock_bh(&soc->peer_ref_mutex);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void dp_iterate_update_peer_list(void *pdev_hdl)
|
void dp_iterate_update_peer_list(struct cdp_pdev *pdev_hdl)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -3602,7 +3602,9 @@ static struct cdp_pdev *dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
|
|||||||
qdf_mem_zero(sojourn_buf, sizeof(struct cdp_tx_sojourn_stats));
|
qdf_mem_zero(sojourn_buf, sizeof(struct cdp_tx_sojourn_stats));
|
||||||
}
|
}
|
||||||
/* initlialize cal client timer */
|
/* initlialize cal client timer */
|
||||||
dp_cal_client_attach(&pdev->cal_client_ctx, pdev, pdev->soc->osdev,
|
dp_cal_client_attach(&pdev->cal_client_ctx,
|
||||||
|
dp_pdev_to_cdp_pdev(pdev),
|
||||||
|
pdev->soc->osdev,
|
||||||
&dp_iterate_update_peer_list);
|
&dp_iterate_update_peer_list);
|
||||||
qdf_event_create(&pdev->fw_peer_stats_event);
|
qdf_event_create(&pdev->fw_peer_stats_event);
|
||||||
|
|
||||||
|
@@ -294,7 +294,7 @@ void dp_send_completion_to_stack(struct dp_soc *soc, struct dp_pdev *pdev,
|
|||||||
qdf_nbuf_t netbuf);
|
qdf_nbuf_t netbuf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void dp_iterate_update_peer_list(void *pdev_hdl);
|
void dp_iterate_update_peer_list(struct cdp_pdev *pdev_hdl);
|
||||||
|
|
||||||
#ifdef ATH_TX_PRI_OVERRIDE
|
#ifdef ATH_TX_PRI_OVERRIDE
|
||||||
#define DP_TX_TID_OVERRIDE(_msdu_info, _nbuf) \
|
#define DP_TX_TID_OVERRIDE(_msdu_info, _nbuf) \
|
||||||
|
@@ -1575,7 +1575,7 @@ struct dp_pdev {
|
|||||||
*/
|
*/
|
||||||
uint8_t is_primary;
|
uint8_t is_primary;
|
||||||
/* Context of cal client timer */
|
/* Context of cal client timer */
|
||||||
void *cal_client_ctx;
|
struct cdp_cal_client *cal_client_ctx;
|
||||||
struct cdp_tx_sojourn_stats sojourn_stats;
|
struct cdp_tx_sojourn_stats sojourn_stats;
|
||||||
qdf_nbuf_t sojourn_buf;
|
qdf_nbuf_t sojourn_buf;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user