qcacmn: Enabling TX FW metadata V2
As part of TX FW metadata V2 global sequence number based and SVC ID based support added. Change-Id: Iefee2c47ecbebf6edfec9a687ef67e0e270bbf06 CRs-Fixed: 3136931
This commit is contained in:

committed by
Madan Koyyalamudi

vanhempi
193246d3d3
commit
9e4a8f0f21
@@ -330,15 +330,61 @@ dp_htt_h2t_send_complete(void *context, HTC_PACKET *htc_pkt)
|
||||
|
||||
#endif /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */
|
||||
|
||||
#ifdef WLAN_MCAST_MLO
|
||||
/*
|
||||
* dp_htt_h2t_add_tcl_metadata_verg() - Add tcl_metadata verion
|
||||
* dp_htt_h2t_add_tcl_metadata_ver_v1() - Add tcl_metadata verion V1
|
||||
* @htt_soc: HTT SOC handle
|
||||
* @msg: Pointer to nbuf
|
||||
*
|
||||
* Return: 0 on success; error code on failure
|
||||
*/
|
||||
static int dp_htt_h2t_add_tcl_metadata_ver(struct htt_soc *soc, qdf_nbuf_t *msg)
|
||||
static int dp_htt_h2t_add_tcl_metadata_ver_v1(struct htt_soc *soc,
|
||||
qdf_nbuf_t *msg)
|
||||
{
|
||||
uint32_t *msg_word;
|
||||
|
||||
*msg = qdf_nbuf_alloc(
|
||||
soc->osdev,
|
||||
HTT_MSG_BUF_SIZE(HTT_VER_REQ_BYTES),
|
||||
/* reserve room for the HTC header */
|
||||
HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING, 4, TRUE);
|
||||
if (!*msg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
/*
|
||||
* Set the length of the message.
|
||||
* The contribution from the HTC_HDR_ALIGNMENT_PADDING is added
|
||||
* separately during the below call to qdf_nbuf_push_head.
|
||||
* The contribution from the HTC header is added separately inside HTC.
|
||||
*/
|
||||
if (!qdf_nbuf_put_tail(*msg, HTT_VER_REQ_BYTES)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Failed to expand head for HTT_H2T_MSG_TYPE_VERSION_REQ msg",
|
||||
__func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* fill in the message contents */
|
||||
msg_word = (u_int32_t *)qdf_nbuf_data(*msg);
|
||||
|
||||
/* rewind beyond alignment pad to get to the HTC header reserved area */
|
||||
qdf_nbuf_push_head(*msg, HTC_HDR_ALIGNMENT_PADDING);
|
||||
|
||||
*msg_word = 0;
|
||||
HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_VERSION_REQ);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef QCA_DP_TX_FW_METADATA_V2
|
||||
/*
|
||||
* dp_htt_h2t_add_tcl_metadata_ver_v2() - Add tcl_metadata verion V2
|
||||
* @htt_soc: HTT SOC handle
|
||||
* @msg: Pointer to nbuf
|
||||
*
|
||||
* Return: 0 on success; error code on failure
|
||||
*/
|
||||
static int dp_htt_h2t_add_tcl_metadata_ver_v2(struct htt_soc *soc,
|
||||
qdf_nbuf_t *msg)
|
||||
{
|
||||
uint32_t *msg_word;
|
||||
|
||||
@@ -383,9 +429,9 @@ static int dp_htt_h2t_add_tcl_metadata_ver(struct htt_soc *soc, qdf_nbuf_t *msg)
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#else
|
||||
|
||||
/*
|
||||
* dp_htt_h2t_add_tcl_metadata_verg() - Add tcl_metadata verion
|
||||
* dp_htt_h2t_add_tcl_metadata_ver() - Add tcl_metadata verion
|
||||
* @htt_soc: HTT SOC handle
|
||||
* @msg: Pointer to nbuf
|
||||
*
|
||||
@@ -393,39 +439,16 @@ static int dp_htt_h2t_add_tcl_metadata_ver(struct htt_soc *soc, qdf_nbuf_t *msg)
|
||||
*/
|
||||
static int dp_htt_h2t_add_tcl_metadata_ver(struct htt_soc *soc, qdf_nbuf_t *msg)
|
||||
{
|
||||
uint32_t *msg_word;
|
||||
|
||||
*msg = qdf_nbuf_alloc(
|
||||
soc->osdev,
|
||||
HTT_MSG_BUF_SIZE(HTT_VER_REQ_BYTES),
|
||||
/* reserve room for the HTC header */
|
||||
HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING, 4, TRUE);
|
||||
if (!*msg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
/*
|
||||
* Set the length of the message.
|
||||
* The contribution from the HTC_HDR_ALIGNMENT_PADDING is added
|
||||
* separately during the below call to qdf_nbuf_push_head.
|
||||
* The contribution from the HTC header is added separately inside HTC.
|
||||
*/
|
||||
if (!qdf_nbuf_put_tail(*msg, HTT_VER_REQ_BYTES)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Failed to expand head for HTT_H2T_MSG_TYPE_VERSION_REQ msg",
|
||||
__func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* fill in the message contents */
|
||||
msg_word = (u_int32_t *)qdf_nbuf_data(*msg);
|
||||
|
||||
/* rewind beyond alignment pad to get to the HTC header reserved area */
|
||||
qdf_nbuf_push_head(*msg, HTC_HDR_ALIGNMENT_PADDING);
|
||||
|
||||
*msg_word = 0;
|
||||
HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_VERSION_REQ);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
/* Use tcl_metadata_v1 when NSS offload is enabled */
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->dp_soc->wlan_cfg_ctx))
|
||||
return dp_htt_h2t_add_tcl_metadata_ver_v1(soc, msg);
|
||||
else
|
||||
return dp_htt_h2t_add_tcl_metadata_ver_v2(soc, msg);
|
||||
}
|
||||
#else
|
||||
static int dp_htt_h2t_add_tcl_metadata_ver(struct htt_soc *soc, qdf_nbuf_t *msg)
|
||||
{
|
||||
return dp_htt_h2t_add_tcl_metadata_ver_v1(soc, msg);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user