diff options
| author | Houston Hoffman <hhoffman@codeaurora.org> | 2016-02-26 12:19:11 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-04-20 22:25:01 -0700 |
| commit | 23e76f99ceb68a80ab2a6750886681d33a19d922 (patch) | |
| tree | 6ba6a0b59d11c12886d91f9bd6e2ed7c36702023 | |
| parent | 1771b5fcd85a8a0c045d2584a24f6200a5bab9b0 (diff) | |
qcacld-3.0: enable additional two HTT data services
Enable HTT_DATA2_MSG_SVC and HTT_DATA3_MSG_SVC, using only
rx legs, CE 9 and 10, respectively. Add required CE entries
to the map that gets sent to the FW, and define the latter
service.
Rename htc_endpoint to htc_tx_endpoint in htt_pdev to
represent the role better.
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
Change-Id: I81ae796bdb7e632aa24f15c63a2811791dd29d28
CRs-Fixed: 982728
| -rw-r--r-- | core/dp/htt/htt.c | 54 | ||||
| -rw-r--r-- | core/dp/htt/htt_h2t.c | 27 | ||||
| -rw-r--r-- | core/dp/htt/htt_internal.h | 2 | ||||
| -rw-r--r-- | core/dp/htt/htt_tx.c | 10 | ||||
| -rw-r--r-- | core/dp/htt/htt_types.h | 4 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_ipa.c | 2 |
6 files changed, 73 insertions, 26 deletions
diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index 8b6afd1f9b59..58860948dd5e 100644 --- a/core/dp/htt/htt.c +++ b/core/dp/htt/htt.c @@ -44,6 +44,7 @@ #include <htt_internal.h> #include <ol_htt_tx_api.h> +#include <cds_api.h> #include "hif.h" #define HTT_HTC_PKT_POOL_INIT_SIZE 100 /* enough for a large A-MPDU */ @@ -193,10 +194,19 @@ htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev, */ /* AR6004 don't need HTT layer. */ #ifndef AR6004_HW - if (htt_htc_attach(pdev)) + if (htt_htc_attach(pdev, HTT_DATA_MSG_SVC)) goto fail2; + if (htt_htc_attach(pdev, HTT_DATA2_MSG_SVC)) + ; + /* TODO: enable the following line once FW is ready */ + /* goto fail2; */ + if (htt_htc_attach(pdev, HTT_DATA3_MSG_SVC)) + ; + /* TODO: enable the following line once FW is ready */ + /* goto fail2; */ if (hif_ce_fastpath_cb_register(htt_t2h_msg_handler_fast, pdev)) qdf_print("failed to register fastpath callback\n"); + #endif return pdev; @@ -393,7 +403,43 @@ int htt_pkt_dl_len_get(struct htt_pdev_t *htt_dev) } #endif -int htt_htc_attach(struct htt_pdev_t *pdev) +static inline +int htt_update_endpoint(struct htt_pdev_t *pdev, + uint16_t service_id, HTC_ENDPOINT_ID ep) +{ + struct hif_opaque_softc *hif_ctx; + uint8_t ul = 0xff, dl = 0xff; + int ul_polled, dl_polled; + int tx_service = 0; + int rc = 0; + + hif_ctx = cds_get_context(QDF_MODULE_ID_HIF); + if (qdf_unlikely(NULL == hif_ctx)) { + QDF_ASSERT(NULL != hif_ctx); + qdf_print("%s:%d: assuming non-tx service.", + __func__, __LINE__); + } else { + ul = dl = 0xff; + if (QDF_STATUS_SUCCESS != + hif_map_service_to_pipe(hif_ctx, service_id, + &ul, &dl, + &ul_polled, &dl_polled)) + qdf_print("%s:%d: assuming non-tx srv.", + __func__, __LINE__); + else + tx_service = (ul != 0xff); + } + if (tx_service) { + /* currently we have only one OUT htt tx service */ + QDF_BUG(service_id == HTT_DATA_MSG_SVC); + + pdev->htc_tx_endpoint = ep; + rc = 1; + } + return rc; +} + +int htt_htc_attach(struct htt_pdev_t *pdev, uint16_t service_id) { HTC_SERVICE_CONNECT_REQ connect; HTC_SERVICE_CONNECT_RESP response; @@ -428,14 +474,14 @@ int htt_htc_attach(struct htt_pdev_t *pdev) #endif /* connect to control service */ - connect.service_id = HTT_DATA_MSG_SVC; + connect.service_id = service_id; status = htc_connect_service(pdev->htc_pdev, &connect, &response); if (status != A_OK) return -EIO; /* failure */ - pdev->htc_endpoint = response.Endpoint; + htt_update_endpoint(pdev, service_id, response.Endpoint); return 0; /* success */ } diff --git a/core/dp/htt/htt_h2t.c b/core/dp/htt/htt_h2t.c index d472d915e591..a1c020279d4c 100644 --- a/core/dp/htt/htt_h2t.c +++ b/core/dp/htt/htt_h2t.c @@ -136,7 +136,7 @@ A_STATUS htt_h2t_frag_desc_bank_cfg_msg(struct htt_pdev_t *pdev) /* fill in the message contents */ msg_word = (u_int32_t *) qdf_nbuf_data(msg); - memset(msg_word, 0 , sizeof(struct htt_tx_frag_desc_bank_cfg_t)); + memset(msg_word, 0, sizeof(struct htt_tx_frag_desc_bank_cfg_t)); /* rewind beyond alignment pad to get to the HTC header reserved area */ qdf_nbuf_push_head(msg, HTC_HDR_ALIGNMENT_PADDING); @@ -172,7 +172,7 @@ A_STATUS htt_h2t_frag_desc_bank_cfg_msg(struct htt_pdev_t *pdev) htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, 1); /* tag - not relevant here */ SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -229,7 +229,7 @@ A_STATUS htt_h2t_ver_req_msg(struct htt_pdev_t *pdev) 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, + pdev->htc_tx_endpoint, 1); /* tag - not relevant here */ SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -414,7 +414,7 @@ A_STATUS htt_h2t_rx_ring_cfg_msg_ll(struct htt_pdev_t *pdev) htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, HTC_TX_PACKET_TAG_RUNTIME_PUT); SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -504,7 +504,7 @@ htt_h2t_dbg_stats_get(struct htt_pdev_t *pdev, htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, htc_tag); /* tag - not relevant here */ SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -560,7 +560,7 @@ A_STATUS htt_h2t_sync_msg(struct htt_pdev_t *pdev, uint8_t sync_cnt) htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, HTC_TX_PACKET_TAG_RUNTIME_PUT); SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -627,7 +627,7 @@ htt_h2t_aggr_cfg_msg(struct htt_pdev_t *pdev, htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, HTC_TX_PACKET_TAG_RUNTIME_PUT); SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -785,8 +785,8 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev) htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, - 1); /* tag - not relevant here */ + pdev->htc_tx_endpoint, + HTC_TX_PACKET_TAG_RUNTIME_PUT); SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -841,7 +841,8 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev) msg_word++; *msg_word = 0; - HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_SET(*msg_word, + HTT_WDI_IPA_CFG_TX_COMP_RING_SIZE_SET( + *msg_word, (unsigned int)ol_cfg_ipa_uc_tx_max_buf_cnt(pdev->ctrl_pdev)); msg_word++; @@ -878,7 +879,7 @@ int htt_h2t_ipa_uc_rsc_cfg_msg(struct htt_pdev_t *pdev) htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, HTC_TX_PACKET_TAG_RUNTIME_PUT); SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -951,7 +952,7 @@ int htt_h2t_ipa_uc_set_active(struct htt_pdev_t *pdev, htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, 1); /* tag - not relevant here */ SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); @@ -1011,7 +1012,7 @@ int htt_h2t_ipa_uc_get_stats(struct htt_pdev_t *pdev) htt_h2t_send_complete_free_netbuf, qdf_nbuf_data(msg), qdf_nbuf_len(msg), - pdev->htc_endpoint, + pdev->htc_tx_endpoint, 1); /* tag - not relevant here */ SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, msg); diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h index 5b8b167260c7..7d3ffbddafcb 100644 --- a/core/dp/htt/htt_internal.h +++ b/core/dp/htt/htt_internal.h @@ -428,7 +428,7 @@ int htt_rx_attach(struct htt_pdev_t *pdev); void htt_rx_detach(struct htt_pdev_t *pdev); -int htt_htc_attach(struct htt_pdev_t *pdev); +int htt_htc_attach(struct htt_pdev_t *pdev, uint16_t service_id); void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt); #ifdef WLAN_FEATURE_FASTPATH diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c index 5727bb5891b1..0dcdb52e3beb 100644 --- a/core/dp/htt/htt_tx.c +++ b/core/dp/htt/htt_tx.c @@ -573,7 +573,7 @@ void htt_tx_sched(htt_pdev_handle pdev) not_accepted = htc_send_data_pkt(pdev->htc_pdev, msdu, - pdev->htc_endpoint, + pdev->htc_tx_endpoint, download_len); if (not_accepted) { HTT_TX_NBUF_QUEUE_INSERT_HEAD(pdev, msdu); @@ -616,8 +616,8 @@ int htt_tx_send_std(htt_pdev_handle pdev, qdf_nbuf_t msdu, uint16_t msdu_id) } qdf_nbuf_trace_update(msdu, "HT:T:"); - if (htc_send_data_pkt - (pdev->htc_pdev, msdu, pdev->htc_endpoint, download_len)) { + if (htc_send_data_pkt(pdev->htc_pdev, msdu, + pdev->htc_tx_endpoint, download_len)) { HTT_TX_NBUF_QUEUE_ADD(pdev, msdu); } @@ -689,10 +689,10 @@ htt_tx_htt2_get_ep_id(htt_pdev_handle pdev, qdf_nbuf_t msdu) (qdf_nbuf_len(msdu) < pdev->htc_tx_htt2_max_size)) return pdev->htc_tx_htt2_endpoint; else - return pdev->htc_endpoint; + return pdev->htc_tx_endpoint; } #else -#define htt_tx_htt2_get_ep_id(pdev, msdu) (pdev->htc_endpoint) +#define htt_tx_htt2_get_ep_id(pdev, msdu) (pdev->htc_tx_endpoint) #endif /* QCA_TX_HTT2_SUPPORT */ static inline int diff --git a/core/dp/htt/htt_types.h b/core/dp/htt/htt_types.h index c49a02273338..b0bcf811a926 100644 --- a/core/dp/htt/htt_types.h +++ b/core/dp/htt/htt_types.h @@ -217,7 +217,7 @@ struct htt_pdev_t { HTC_HANDLE htc_pdev; qdf_device_t osdev; - HTC_ENDPOINT_ID htc_endpoint; + HTC_ENDPOINT_ID htc_tx_endpoint; #ifdef QCA_TX_HTT2_SUPPORT HTC_ENDPOINT_ID htc_tx_htt2_endpoint; @@ -388,7 +388,7 @@ struct htt_pdev_t { }; #define HTT_EPID_GET(_htt_pdev_hdl) \ - (((struct htt_pdev_t *)(_htt_pdev_hdl))->htc_endpoint) + (((struct htt_pdev_t *)(_htt_pdev_hdl))->htc_tx_endpoint) #if defined(HELIUMPLUS_PADDR64) #define HTT_WIFI_IP(pdev, x, y) (((pdev)->wifi_ip_ver.major == (x)) && \ diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 19f55055d60c..84cc0e37cb38 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -451,7 +451,7 @@ struct hdd_ipa_priv { }; /** - * FIXME: The following conversion routines will are just stubs. + * FIXME: The following conversion routines are just stubs. * They will be implemented fully by another update. * The stubs will let the compile go ahead, and functionality * is broken. |
