qcacld-3.0: Add skeleton code for direct link datapath

Add skeleton code for direct link datapath in DP
component.

Change-Id: I1279abfe573017258b13043d779d0ddc41ee8dd2
CRs-Fixed: 3295346
This commit is contained in:
Yeshwanth Sriram Guntuka
2022-11-08 11:05:02 +05:30
committed by Madan Koyyalamudi
parent 8f5a6f0e39
commit f263f50933
5 changed files with 124 additions and 1 deletions

View File

@@ -657,4 +657,32 @@ void dp_clear_net_dev_stats(struct wlan_dp_intf *dp_intf)
qdf_mem_set(&dp_intf->stats, sizeof(dp_intf->stats), 0);
}
#ifdef FEATURE_DIRECT_LINK
/**
* dp_direct_link_init() - Initializes Direct Link datapath
* @dp_ctx: DP private context
*
* Return: QDF status
*/
QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx);
/**
* dp_direct_link_deinit() - De-initializes Direct Link datapath
* @dp_ctx: DP private context
*
* Return: None
*/
void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx);
#else
static inline
QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx)
{
return QDF_STATUS_SUCCESS;
}
static inline
void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx)
{
}
#endif
#endif

View File

@@ -360,6 +360,16 @@ enum RX_OFFLOAD {
CFG_GRO_ENABLED,
};
#ifdef FEATURE_DIRECT_LINK
/**
* struct dp_direct_link_context - Datapath Direct Link context
* @dp_ctx: pointer to DP psoc priv context
*/
struct dp_direct_link_context {
struct wlan_dp_psoc_context *dp_ctx;
};
#endif
/**
* struct wlan_dp_psoc_context - psoc related data required for DP
* @pdev: object manager pdev context
@@ -375,6 +385,7 @@ enum RX_OFFLOAD {
* @rtpm_tput_policy_ctx: Runtime Tput policy context
* @txrx_hist: TxRx histogram
* @bbm_ctx: bus bandwidth manager context
* @dp_direct_link_ctx: DP Direct Link context
*/
struct wlan_dp_psoc_context {
struct wlan_objmgr_psoc *psoc;
@@ -459,6 +470,9 @@ struct wlan_dp_psoc_context {
qdf_wake_lock_t rx_wake_lock;
enum RX_OFFLOAD ol_enable;
#ifdef FEATURE_DIRECT_LINK
struct dp_direct_link_context *dp_direct_link_ctx;
#endif
};
#endif /* end of _WLAN_DP_PRIV_STRUCT_H_ */

View File

@@ -1539,3 +1539,29 @@ bool dp_is_data_stall_event_enabled(uint32_t evt)
return false;
}
#ifdef FEATURE_DIRECT_LINK
QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx)
{
struct dp_direct_link_context *dp_direct_link_ctx;
/* ToDo: Check for FW direct_link capability */
dp_direct_link_ctx = qdf_mem_malloc(sizeof(*dp_direct_link_ctx));
if (!dp_direct_link_ctx) {
dp_err("Failed to allocate memory for DP Direct Link context");
return QDF_STATUS_E_NOMEM;
}
dp_ctx->dp_direct_link_ctx = dp_direct_link_ctx;
dp_direct_link_ctx->dp_ctx = dp_ctx;
return QDF_STATUS_SUCCESS;
}
void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx)
{
qdf_mem_free(dp_ctx->dp_direct_link_ctx);
dp_ctx->dp_direct_link_ctx = NULL;
}
#endif