qcacmn: Add HTT RxDMA and RxOLE PPE message
Add the DP HTT RxDMA and RxOLE data types and their respective configuration APIs. Change-Id: I4ce423a31eab84764666b7d0f11815f4895898af CRs-Fixed: 3147720
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c903ec29a1
commit
28d17d9290
@@ -4520,6 +4520,112 @@ dp_htt_rx_fisa_config(struct dp_pdev *pdev,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_SUPPORT_PPEDS
|
||||||
|
/**
|
||||||
|
* dp_htt_rxdma_rxole_ppe_cfg_set() - Send RxOLE and RxDMA PPE config
|
||||||
|
* @dp_osc: Data path SoC handle
|
||||||
|
* @cfg: RxDMA and RxOLE PPE config
|
||||||
|
*
|
||||||
|
* Return: Success when HTT message is sent, error on failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
dp_htt_rxdma_rxole_ppe_cfg_set(struct dp_soc *soc,
|
||||||
|
struct dp_htt_rxdma_rxole_ppe_config *cfg)
|
||||||
|
{
|
||||||
|
struct htt_soc *htt_handle = soc->htt_handle;
|
||||||
|
uint32_t len;
|
||||||
|
qdf_nbuf_t msg;
|
||||||
|
u_int32_t *msg_word;
|
||||||
|
QDF_STATUS status;
|
||||||
|
uint8_t *htt_logger_bufp;
|
||||||
|
struct dp_htt_htc_pkt *pkt;
|
||||||
|
|
||||||
|
len = HTT_MSG_BUF_SIZE(
|
||||||
|
sizeof(struct htt_h2t_msg_type_rxdma_rxole_ppe_cfg_t));
|
||||||
|
|
||||||
|
msg = qdf_nbuf_alloc(soc->osdev,
|
||||||
|
len,
|
||||||
|
/* 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, sizeof(struct htt_h2t_msg_type_rxdma_rxole_ppe_cfg_t))) {
|
||||||
|
qdf_err("Failed to expand head for HTT_H2T_MSG_TYPE_RXDMA_RXOLE_PPE_CFG msg");
|
||||||
|
qdf_nbuf_free(msg);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fill in the message contents */
|
||||||
|
msg_word = (u_int32_t *)qdf_nbuf_data(msg);
|
||||||
|
|
||||||
|
memset(msg_word, 0,
|
||||||
|
sizeof(struct htt_h2t_msg_type_rxdma_rxole_ppe_cfg_t));
|
||||||
|
|
||||||
|
/* Rewind beyond alignment pad to get to the HTC header reserved area */
|
||||||
|
qdf_nbuf_push_head(msg, HTC_HDR_ALIGNMENT_PADDING);
|
||||||
|
htt_logger_bufp = (uint8_t *)msg_word;
|
||||||
|
|
||||||
|
*msg_word = 0;
|
||||||
|
HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_RXDMA_RXOLE_PPE_CFG);
|
||||||
|
HTT_PPE_CFG_OVERRIDE_SET(*msg_word, cfg->override);
|
||||||
|
HTT_PPE_CFG_REO_DEST_IND_SET(
|
||||||
|
*msg_word, cfg->reo_destination_indication);
|
||||||
|
HTT_PPE_CFG_MULTI_BUF_MSDU_OVERRIDE_EN_SET(
|
||||||
|
*msg_word, cfg->multi_buffer_msdu_override_en);
|
||||||
|
HTT_PPE_CFG_INTRA_BSS_OVERRIDE_EN_SET(
|
||||||
|
*msg_word, cfg->intra_bss_override);
|
||||||
|
HTT_PPE_CFG_DECAP_RAW_OVERRIDE_EN_SET(
|
||||||
|
*msg_word, cfg->decap_raw_override);
|
||||||
|
HTT_PPE_CFG_DECAP_NWIFI_OVERRIDE_EN_SET(
|
||||||
|
*msg_word, cfg->decap_nwifi_override);
|
||||||
|
HTT_PPE_CFG_IP_FRAG_OVERRIDE_EN_SET(
|
||||||
|
*msg_word, cfg->ip_frag_override);
|
||||||
|
|
||||||
|
pkt = htt_htc_pkt_alloc(htt_handle);
|
||||||
|
if (!pkt) {
|
||||||
|
qdf_err("Fail to allocate dp_htt_htc_pkt buffer");
|
||||||
|
qdf_assert(0);
|
||||||
|
qdf_nbuf_free(msg);
|
||||||
|
return QDF_STATUS_E_RESOURCES; /* failure */
|
||||||
|
}
|
||||||
|
|
||||||
|
pkt->soc_ctxt = NULL; /* not used during send-done callback */
|
||||||
|
|
||||||
|
SET_HTC_PACKET_INFO_TX(&pkt->htc_pkt,
|
||||||
|
dp_htt_h2t_send_complete_free_netbuf,
|
||||||
|
qdf_nbuf_data(msg),
|
||||||
|
qdf_nbuf_len(msg),
|
||||||
|
htt_handle->htc_endpoint,
|
||||||
|
/* tag for no FW response msg */
|
||||||
|
HTC_TX_PACKET_TAG_RUNTIME_PUT);
|
||||||
|
|
||||||
|
SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg);
|
||||||
|
|
||||||
|
status = DP_HTT_SEND_HTC_PKT(htt_handle, pkt,
|
||||||
|
HTT_H2T_MSG_TYPE_RXDMA_RXOLE_PPE_CFG,
|
||||||
|
htt_logger_bufp);
|
||||||
|
|
||||||
|
if (status != QDF_STATUS_SUCCESS) {
|
||||||
|
qdf_nbuf_free(msg);
|
||||||
|
htt_htc_pkt_free(htt_handle, pkt);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
dp_info("HTT_H2T_MSG_TYPE_RXDMA_RXOLE_PPE_CFG sent");
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
#endif /* WLAN_SUPPORT_PPEDS */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_bk_pressure_stats_handler(): worker function to print back pressure
|
* dp_bk_pressure_stats_handler(): worker function to print back pressure
|
||||||
* stats
|
* stats
|
||||||
|
@@ -802,6 +802,35 @@ static inline QDF_STATUS DP_HTT_SEND_HTC_PKT(struct htt_soc *soc,
|
|||||||
QDF_STATUS dp_htt_rx_fisa_config(struct dp_pdev *pdev,
|
QDF_STATUS dp_htt_rx_fisa_config(struct dp_pdev *pdev,
|
||||||
struct dp_htt_rx_fisa_cfg *fisa_config);
|
struct dp_htt_rx_fisa_cfg *fisa_config);
|
||||||
|
|
||||||
|
#ifdef WLAN_SUPPORT_PPEDS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dp_htt_rxdma_rxole_ppe_config: Rx DMA and RxOLE PPE config
|
||||||
|
* @override: RxDMA override to override the reo_destinatoin_indication
|
||||||
|
* @reo_destination_indication: REO destination indication value
|
||||||
|
* @multi_buffer_msdu_override_en: Override the indicatio for SG
|
||||||
|
* @intra_bss_override: Rx OLE IntraBSS override
|
||||||
|
* @decap_raw_override: Rx Decap Raw override
|
||||||
|
* @decap_nwifi_override: Rx Native override
|
||||||
|
* @ip_frag_override: IP fragments override
|
||||||
|
* @reserved: Reserved
|
||||||
|
*/
|
||||||
|
struct dp_htt_rxdma_rxole_ppe_config {
|
||||||
|
uint32_t override:1,
|
||||||
|
reo_destination_indication:5,
|
||||||
|
multi_buffer_msdu_override_en:1,
|
||||||
|
intra_bss_override:1,
|
||||||
|
decap_raw_override:1,
|
||||||
|
decap_nwifi_override:1,
|
||||||
|
ip_frag_override:1,
|
||||||
|
reserved:21;
|
||||||
|
};
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
dp_htt_rxdma_rxole_ppe_cfg_set(struct dp_soc *soc,
|
||||||
|
struct dp_htt_rxdma_rxole_ppe_config *cfg);
|
||||||
|
#endif /* WLAN_SUPPORT_PPEDS */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* htt_soc_initialize() - SOC level HTT initialization
|
* htt_soc_initialize() - SOC level HTT initialization
|
||||||
* @htt_soc: Opaque htt SOC handle
|
* @htt_soc: Opaque htt SOC handle
|
||||||
|
Reference in New Issue
Block a user