qcacmn: Qdf changes to support optional wifi dp feature
Qdf changes to support optional wifi dp feature. Change-Id: Iaec8374548a991e4660f0a0a31f1d6309b572bea CRs-Fixed: 3403427
This commit is contained in:

committed by
Madan Koyyalamudi

parent
09186dbaf9
commit
c9c59b99ed
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019, 2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2019, 2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -88,6 +88,8 @@ typedef __qdf_ipa_wdi_init_out_params_t qdf_ipa_wdi_init_out_params_t;
|
|||||||
__QDF_IPA_WDI_INIT_OUT_PARAMS_IS_SMMU_ENABLED(out_params)
|
__QDF_IPA_WDI_INIT_OUT_PARAMS_IS_SMMU_ENABLED(out_params)
|
||||||
#define QDF_IPA_WDI_INIT_OUT_PARAMS_HANDLE(out_params) \
|
#define QDF_IPA_WDI_INIT_OUT_PARAMS_HANDLE(out_params) \
|
||||||
__QDF_IPA_WDI_INIT_OUT_PARAMS_HANDLE(out_params)
|
__QDF_IPA_WDI_INIT_OUT_PARAMS_HANDLE(out_params)
|
||||||
|
#define QDF_IPA_WDI_INIT_OUT_PARAMS_OPT_WIFI_DP(out_params) \
|
||||||
|
__QDF_IPA_WDI_INIT_OUT_PARAMS_OPT_WIFI_DP(out_params)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_ipa_wdi_pipe_setup_info_smmu_t - WDI TX/Rx configuration
|
* qdf_ipa_wdi_pipe_setup_info_smmu_t - WDI TX/Rx configuration
|
||||||
@@ -216,7 +218,6 @@ typedef __qdf_ipa_wdi_reg_intf_in_params_t qdf_ipa_wdi_reg_intf_in_params_t;
|
|||||||
__QDF_IPA_WDI_REG_INTF_IN_PARAMS_IS_RX1_USED(in)
|
__QDF_IPA_WDI_REG_INTF_IN_PARAMS_IS_RX1_USED(in)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_ipa_wdi_pipe_setup_info_t - WDI TX/Rx configuration
|
* qdf_ipa_wdi_pipe_setup_info_t - WDI TX/Rx configuration
|
||||||
*/
|
*/
|
||||||
@@ -507,7 +508,62 @@ static inline int qdf_ipa_uc_bw_monitor(qdf_ipa_wdi_bw_info_t *bw_info)
|
|||||||
{
|
{
|
||||||
return __qdf_ipa_uc_bw_monitor(bw_info);
|
return __qdf_ipa_uc_bw_monitor(bw_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef IPA_OPT_WIFI_DP
|
||||||
|
/**
|
||||||
|
* qdf_ipa_wdi_register_flt_cb() - register cb functions with IPA
|
||||||
|
* for optional wifi datapath
|
||||||
|
* @hdl: ipa hdl
|
||||||
|
* @flt_rsrv_cb: cb for filter reservation
|
||||||
|
* @flt_rsrv_rel_cb: cb for filter release
|
||||||
|
* @flt_add_cb: cb for filter addition
|
||||||
|
* @flt_rem_cb: cb for filter removal
|
||||||
|
*
|
||||||
|
* Return: 0 on success, negative on failure
|
||||||
|
*/
|
||||||
|
static inline int qdf_ipa_wdi_register_flt_cb(
|
||||||
|
ipa_wdi_hdl_t hdl,
|
||||||
|
ipa_wdi_opt_dpath_flt_rsrv_cb flt_rsrv_cb,
|
||||||
|
ipa_wdi_opt_dpath_flt_rsrv_rel_cb flt_rsrv_rel_cb,
|
||||||
|
ipa_wdi_opt_dpath_flt_add_cb flt_add_cb,
|
||||||
|
ipa_wdi_opt_dpath_flt_rem_cb flt_rem_cb)
|
||||||
|
{
|
||||||
|
return __qdf_ipa_wdi_register_flt_cb((__qdf_ipa_wdi_hdl_t)hdl,
|
||||||
|
flt_rsrv_cb, flt_rsrv_rel_cb,
|
||||||
|
flt_add_cb, flt_rem_cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ipa_wdi_opt_dpath_notify_flt_rsvd_per_inst() - notify IPA with filter
|
||||||
|
* reserve response for optional wifi datapath
|
||||||
|
* @hdl: ipa hdl
|
||||||
|
* @is_succes: true for success, false or failure
|
||||||
|
*
|
||||||
|
* Return: 0 on success, negative on failure
|
||||||
|
*/
|
||||||
|
static inline int qdf_ipa_wdi_opt_dpath_notify_flt_rsvd_per_inst(
|
||||||
|
ipa_wdi_hdl_t hdl, bool is_success)
|
||||||
|
{
|
||||||
|
return __qdf_ipa_wdi_opt_dpath_notify_flt_rsvd_per_inst(hdl,
|
||||||
|
is_success);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ipa_wdi_opt_dpath_notify_flt_rlsd_per_inst() - notify IPA with filter
|
||||||
|
* release response for optional wifi datapath
|
||||||
|
* @hdl: ipa hdl
|
||||||
|
* @is_succes: true for success, false or failure
|
||||||
|
*
|
||||||
|
* Return: 0 on success, negative on failure
|
||||||
|
*/
|
||||||
|
static inline int qdf_ipa_wdi_opt_dpath_notify_flt_rlsd_per_inst(
|
||||||
|
ipa_wdi_hdl_t hdl, bool is_success)
|
||||||
|
{
|
||||||
|
return __qdf_ipa_wdi_opt_dpath_notify_flt_rlsd_per_inst(hdl,
|
||||||
|
is_success);
|
||||||
|
}
|
||||||
|
#endif /* IPA_OPT_WIFI_DP */
|
||||||
#endif /* IPA_OFFLOAD */
|
#endif /* IPA_OFFLOAD */
|
||||||
#endif /* _QDF_IPA_WDI3_H */
|
#endif /* QDF_IPA_WDI3_H */
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
|
||||||
@@ -76,6 +76,7 @@
|
|||||||
* @QDF_STATUS_E_RANGE: result/parameter/operation was out of range
|
* @QDF_STATUS_E_RANGE: result/parameter/operation was out of range
|
||||||
* @QDF_STATUS_E_GRO_DROP: return code for GRO drop
|
* @QDF_STATUS_E_GRO_DROP: return code for GRO drop
|
||||||
* @QDF_STATUS_E_RESTART: return error code for wait_event_interruptible
|
* @QDF_STATUS_E_RESTART: return error code for wait_event_interruptible
|
||||||
|
* @QDF_STATUS_FILT_REQ_ERROR: return error code cee filter rule request
|
||||||
* @QDF_STATUS_MAX: not a real value just a place holder for max
|
* @QDF_STATUS_MAX: not a real value just a place holder for max
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -128,6 +129,7 @@ typedef enum {
|
|||||||
QDF_STATUS_E_RANGE,
|
QDF_STATUS_E_RANGE,
|
||||||
QDF_STATUS_E_GRO_DROP,
|
QDF_STATUS_E_GRO_DROP,
|
||||||
QDF_STATUS_E_RESTART,
|
QDF_STATUS_E_RESTART,
|
||||||
|
QDF_STATUS_FILT_REQ_ERROR,
|
||||||
QDF_STATUS_MAX
|
QDF_STATUS_MAX
|
||||||
} QDF_STATUS;
|
} QDF_STATUS;
|
||||||
|
|
||||||
|
@@ -140,6 +140,10 @@ typedef struct ipa_wdi_init_out_params __qdf_ipa_wdi_init_out_params_t;
|
|||||||
(((struct ipa_wdi_init_out_params *)(out_params))->is_uC_ready)
|
(((struct ipa_wdi_init_out_params *)(out_params))->is_uC_ready)
|
||||||
#define __QDF_IPA_WDI_INIT_OUT_PARAMS_IS_SMMU_ENABLED(out_params) \
|
#define __QDF_IPA_WDI_INIT_OUT_PARAMS_IS_SMMU_ENABLED(out_params) \
|
||||||
(((struct ipa_wdi_init_out_params *)(out_params))->is_smmu_enabled)
|
(((struct ipa_wdi_init_out_params *)(out_params))->is_smmu_enabled)
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||||
|
#define __QDF_IPA_WDI_INIT_OUT_PARAMS_OPT_WIFI_DP(out_params) \
|
||||||
|
(((struct ipa_wdi_init_out_params *)(out_params))->opt_wdi_dpath)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
||||||
#define __QDF_IPA_WDI_INIT_OUT_PARAMS_HANDLE(out_params) \
|
#define __QDF_IPA_WDI_INIT_OUT_PARAMS_HANDLE(out_params) \
|
||||||
@@ -424,6 +428,67 @@ static inline int __qdf_ipa_wdi_reg_intf(
|
|||||||
return ipa_wdi_reg_intf_per_inst(in);
|
return ipa_wdi_reg_intf_per_inst(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef IPA_OPT_WIFI_DP
|
||||||
|
/**
|
||||||
|
* __qdf_ipa_wdi_register_flt_cb() - register callbacks for optional wifi dp
|
||||||
|
* @hdl: ipa_hdl
|
||||||
|
* @flt_rsrv_cb: filter reserve cb function
|
||||||
|
* @flt_rsrv_rel_cb: filter release cb function
|
||||||
|
* @flt_add_cb: filter add cb function
|
||||||
|
* @flt_rem_cb: filter remove cb
|
||||||
|
*
|
||||||
|
* Note: Should not be called from atomic context and only
|
||||||
|
* after checking IPA readiness using ipa_register_ipa_ready_cb()
|
||||||
|
*
|
||||||
|
* @Return 0 on successful register of filter cb, negative on failure
|
||||||
|
*/
|
||||||
|
static inline int __qdf_ipa_wdi_register_flt_cb(
|
||||||
|
ipa_wdi_hdl_t hdl,
|
||||||
|
ipa_wdi_opt_dpath_flt_rsrv_cb flt_rsrv_cb,
|
||||||
|
ipa_wdi_opt_dpath_flt_rsrv_rel_cb flt_rsrv_rel_cb,
|
||||||
|
ipa_wdi_opt_dpath_flt_add_cb flt_add_cb,
|
||||||
|
ipa_wdi_opt_dpath_flt_rem_cb flt_rem_cb)
|
||||||
|
{
|
||||||
|
return ipa_wdi_opt_dpath_register_flt_cb_per_inst(
|
||||||
|
hdl, flt_rsrv_cb,
|
||||||
|
flt_rsrv_rel_cb,
|
||||||
|
flt_add_cb, flt_rem_cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_ipa_wdi_opt_dpath_notify_flt_rsvd_per_inst() - notify response to
|
||||||
|
* filter reserve request from IPA
|
||||||
|
* @hdl: ipa_hdl
|
||||||
|
* @is_success: result of filter reservation
|
||||||
|
*
|
||||||
|
* Note: Should not be called from atomic context and only
|
||||||
|
* after checking IPA readiness using ipa_register_ipa_ready_cb()
|
||||||
|
*
|
||||||
|
* @Return 0 if ipa received the notification, negative on failure
|
||||||
|
*/
|
||||||
|
static inline int __qdf_ipa_wdi_opt_dpath_notify_flt_rsvd_per_inst(
|
||||||
|
ipa_wdi_hdl_t hdl, bool is_success)
|
||||||
|
{
|
||||||
|
return ipa_wdi_opt_dpath_notify_flt_rsvd_per_inst(hdl, is_success);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*__qdf_ipa_wdi_opt_dpath_notify_flt_rlsd_per_inst() notify response to
|
||||||
|
*filter release request from IPA
|
||||||
|
* @hdl: ipa_hdl
|
||||||
|
* @is_success: result of filter release
|
||||||
|
*
|
||||||
|
* Note: Should not be called from atomic context and only
|
||||||
|
* after checking IPA readiness using ipa_register_ipa_ready_cb()
|
||||||
|
*
|
||||||
|
* @Return 0 if ipa received the notification, negative on failure
|
||||||
|
*/
|
||||||
|
static inline int __qdf_ipa_wdi_opt_dpath_notify_flt_rlsd_per_inst(
|
||||||
|
ipa_wdi_hdl_t hdl, bool is_success)
|
||||||
|
{
|
||||||
|
return ipa_wdi_opt_dpath_notify_flt_rlsd_per_inst(hdl, is_success);
|
||||||
|
}
|
||||||
|
#endif /*IPA_OPT_WIFI_DP */
|
||||||
/**
|
/**
|
||||||
* __qdf_ipa_wdi_dereg_intf - Client Driver should call this
|
* __qdf_ipa_wdi_dereg_intf - Client Driver should call this
|
||||||
* function to deregister before unload and after disconnect
|
* function to deregister before unload and after disconnect
|
||||||
|
Reference in New Issue
Block a user