|
@@ -650,8 +650,7 @@ htt_h2t_aggr_cfg_msg(struct htt_pdev_t *pdev,
|
|
|
* Return: 0 success
|
|
|
* A_NO_MEMORY No memory fail
|
|
|
*/
|
|
|
-#ifdef QCA_WIFI_2_0
|
|
|
-/* Rome Support only WDI 1.0 */
|
|
|
+#ifdef QCA_WIFI_3_0
|
|
|
int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
{
|
|
|
struct htt_htc_pkt *pkt;
|
|
@@ -660,7 +659,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
pkt = htt_htc_pkt_alloc(pdev);
|
|
|
if (!pkt)
|
|
|
- return A_NO_MEMORY;
|
|
|
+ return -A_NO_MEMORY;
|
|
|
|
|
|
/* show that this is not a tx frame download
|
|
|
* (not required, but helpful)
|
|
@@ -674,7 +673,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
false);
|
|
|
if (!msg) {
|
|
|
htt_htc_pkt_free(pdev, pkt);
|
|
|
- return A_NO_MEMORY;
|
|
|
+ return -A_NO_MEMORY;
|
|
|
}
|
|
|
/* set the length of the message */
|
|
|
qdf_nbuf_put_tail(msg, HTT_WDI_IPA_CFG_SZ);
|
|
@@ -687,13 +686,17 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
*msg_word = 0;
|
|
|
HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_SET(*msg_word,
|
|
|
- pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt);
|
|
|
+ pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt);
|
|
|
HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_WDI_IPA_CFG);
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_SET(*msg_word,
|
|
|
+ /* TX COMP RING BASE LO */
|
|
|
+ HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_tx_rsc.tx_comp_base.paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ /* TX COMP RING BASE HI, NONE */
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
@@ -702,18 +705,26 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_tx_rsc.tx_comp_idx_paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_rx_rsc.rx_ind_ring_base.paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_SET(*msg_word,
|
|
|
+ 0);
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
@@ -722,20 +733,60 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_SET(*msg_word,
|
|
|
+ 0);
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_SET(*msg_word,
|
|
|
- (unsigned int)pdev->ipa_uc_rx_rsc.rx_rdy_idx_paddr);
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
+ (unsigned int)pdev->ipa_uc_rx_rsc.rx_rdy_idx_paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_SET(*msg_word,
|
|
|
+ 0);
|
|
|
+
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_SET(*msg_word,
|
|
|
+ (unsigned int)pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_SET(*msg_word,
|
|
|
+ 0);
|
|
|
+
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_RING2_SIZE_SET(*msg_word,
|
|
|
+ (unsigned int)ol_cfg_ipa_uc_rx_ind_ring_size(pdev->ctrl_pdev));
|
|
|
+
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_SET(*msg_word,
|
|
|
+ (unsigned int)pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_SET(*msg_word,
|
|
|
+ 0);
|
|
|
+
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
+ (unsigned int)pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr);
|
|
|
+ msg_word++;
|
|
|
+ *msg_word = 0;
|
|
|
+ HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_SET(*msg_word,
|
|
|
+ 0);
|
|
|
|
|
|
SET_HTC_PACKET_INFO_TX(&pkt->htc_pkt,
|
|
|
htt_h2t_send_complete_free_netbuf,
|
|
|
qdf_nbuf_data(msg),
|
|
|
qdf_nbuf_len(msg),
|
|
|
pdev->htc_endpoint,
|
|
|
- HTC_TX_PACKET_TAG_RUNTIME_PUT);
|
|
|
+ 1); /* tag - not relevant here */
|
|
|
|
|
|
SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg);
|
|
|
|
|
@@ -744,6 +795,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
return A_OK;
|
|
|
}
|
|
|
#else
|
|
|
+/* Rome Support only WDI 1.0 */
|
|
|
int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
{
|
|
|
struct htt_htc_pkt *pkt;
|
|
@@ -752,7 +804,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
pkt = htt_htc_pkt_alloc(pdev);
|
|
|
if (!pkt)
|
|
|
- return -A_NO_MEMORY;
|
|
|
+ return A_NO_MEMORY;
|
|
|
|
|
|
/* show that this is not a tx frame download
|
|
|
* (not required, but helpful)
|
|
@@ -766,7 +818,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
false);
|
|
|
if (!msg) {
|
|
|
htt_htc_pkt_free(pdev, pkt);
|
|
|
- return -A_NO_MEMORY;
|
|
|
+ return A_NO_MEMORY;
|
|
|
}
|
|
|
/* set the length of the message */
|
|
|
qdf_nbuf_put_tail(msg, HTT_WDI_IPA_CFG_SZ);
|
|
@@ -779,17 +831,13 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
*msg_word = 0;
|
|
|
HTT_WDI_IPA_CFG_TX_PKT_POOL_SIZE_SET(*msg_word,
|
|
|
- pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt);
|
|
|
+ pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt);
|
|
|
HTT_H2T_MSG_TYPE_SET(*msg_word, HTT_H2T_MSG_TYPE_WDI_IPA_CFG);
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- /* TX COMP RING BASE LO */
|
|
|
- HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_LO_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_TX_COMP_RING_BASE_ADDR_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_tx_rsc.tx_comp_base.paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- /* TX COMP RING BASE HI, NONE */
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
@@ -798,26 +846,18 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_TX_COMP_WR_IDX_ADDR_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_tx_rsc.tx_comp_idx_paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_TX_CE_WR_IDX_ADDR_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_LO_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_rx_rsc.rx_ind_ring_base.paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_RING_BASE_ADDR_HI_SET(*msg_word,
|
|
|
- 0);
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
@@ -826,60 +866,20 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev)
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_LO_SET(*msg_word,
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_SET(*msg_word,
|
|
|
(unsigned int)pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_RD_IDX_ADDR_HI_SET(*msg_word,
|
|
|
- 0);
|
|
|
|
|
|
msg_word++;
|
|
|
*msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
- (unsigned int)pdev->ipa_uc_rx_rsc.rx_rdy_idx_paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_HI_SET(*msg_word,
|
|
|
- 0);
|
|
|
-
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_LO_SET(*msg_word,
|
|
|
- (unsigned int)pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_RING2_BASE_ADDR_HI_SET(*msg_word,
|
|
|
- 0);
|
|
|
-
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_RING2_SIZE_SET(*msg_word,
|
|
|
- (unsigned int)ol_cfg_ipa_uc_rx_ind_ring_size(pdev->ctrl_pdev));
|
|
|
-
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_LO_SET(*msg_word,
|
|
|
- (unsigned int)pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_RING2_RD_IDX_ADDR_HI_SET(*msg_word,
|
|
|
- 0);
|
|
|
-
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_LO_SET(*msg_word,
|
|
|
- (unsigned int)pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr);
|
|
|
- msg_word++;
|
|
|
- *msg_word = 0;
|
|
|
- HTT_WDI_IPA_CFG_RX_RING2_WR_IDX_ADDR_HI_SET(*msg_word,
|
|
|
- 0);
|
|
|
+ HTT_WDI_IPA_CFG_RX_IND_WR_IDX_ADDR_SET(*msg_word,
|
|
|
+ (unsigned int)pdev->ipa_uc_rx_rsc.rx_rdy_idx_paddr);
|
|
|
|
|
|
SET_HTC_PACKET_INFO_TX(&pkt->htc_pkt,
|
|
|
htt_h2t_send_complete_free_netbuf,
|
|
|
qdf_nbuf_data(msg),
|
|
|
qdf_nbuf_len(msg),
|
|
|
pdev->htc_endpoint,
|
|
|
- 1); /* tag - not relevant here */
|
|
|
+ HTC_TX_PACKET_TAG_RUNTIME_PUT);
|
|
|
|
|
|
SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg);
|
|
|
|