summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManjunathappa Prakash <prakashpm@codeaurora.org>2016-04-14 01:11:18 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-04-17 18:16:51 -0700
commit585178db34ffb93318da51f54c8cdf55d9cd0433 (patch)
tree9a7523ebee4d9b76a6264a92c23189da6ab0715c
parent1c9562691142e02d08c40bf796d36751b4c9cfe3 (diff)
qcacld-3.0: Cleanup fastpath changes
Do following cleanup on fastpath code changes: 1) Remove reaping of Tx HIF buffers in Rx handling, instead handle reaping in Tx fastpath itself. 2) In ce_per_engine_service_fast check for more Rx packets after packet processing. 3) Make stub functions as static inline for non-fastpath enabled case. Change-Id: If07c4344a424ce13b94128bf28931a24255b661a CRs-Fixed: 987182
-rw-r--r--core/dp/htt/htt.c6
-rw-r--r--core/dp/htt/htt_internal.h12
-rw-r--r--core/dp/htt/htt_t2h.c33
-rw-r--r--core/hdd/src/wlan_hdd_main.c2
-rw-r--r--uapi/linux/osapi_linux.h1
5 files changed, 24 insertions, 30 deletions
diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c
index ed114ac44caa..8b6afd1f9b59 100644
--- a/core/dp/htt/htt.c
+++ b/core/dp/htt/htt.c
@@ -195,6 +195,8 @@ htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev,
#ifndef AR6004_HW
if (htt_htc_attach(pdev))
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;
@@ -397,10 +399,6 @@ int htt_htc_attach(struct htt_pdev_t *pdev)
HTC_SERVICE_CONNECT_RESP response;
A_STATUS status;
- if (QDF_STATUS_SUCCESS !=
- hif_ce_fastpath_cb_register(htt_t2h_msg_handler_fast, pdev))
- qdf_print("failed to register fastpath callback\n");
-
qdf_mem_set(&connect, sizeof(connect), 0);
qdf_mem_set(&response, sizeof(response), 0);
diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h
index 9e4628b86b3d..5b8b167260c7 100644
--- a/core/dp/htt/htt_internal.h
+++ b/core/dp/htt/htt_internal.h
@@ -431,8 +431,16 @@ void htt_rx_detach(struct htt_pdev_t *pdev);
int htt_htc_attach(struct htt_pdev_t *pdev);
void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt);
-int htt_t2h_msg_handler_fast(void *htt_pdev, qdf_nbuf_t *cmpl_msdus,
- uint32_t num_cmpls);
+#ifdef WLAN_FEATURE_FASTPATH
+void htt_t2h_msg_handler_fast(void *htt_pdev, qdf_nbuf_t *cmpl_msdus,
+ uint32_t num_cmpls);
+#else
+static inline void htt_t2h_msg_handler_fast(void *htt_pdev,
+ qdf_nbuf_t *cmpl_msdus,
+ uint32_t num_cmpls)
+{
+}
+#endif
void htt_h2t_send_complete(void *context, HTC_PACKET *pkt);
diff --git a/core/dp/htt/htt_t2h.c b/core/dp/htt/htt_t2h.c
index 3efa3f76cf80..63fbe2eab7ce 100644
--- a/core/dp/htt/htt_t2h.c
+++ b/core/dp/htt/htt_t2h.c
@@ -44,7 +44,6 @@
#include <ol_htt_tx_api.h>
#include <ol_txrx_htt_api.h> /* htt_tx_status */
-#include <osdep.h>
#include <htt_internal.h> /* HTT_TX_SCHED, etc. */
#include <pktlog_ac_fmt.h>
#include <wdi_event.h>
@@ -133,8 +132,8 @@ static void htt_rx_frag_set_last_msdu(struct htt_pdev_t *pdev, qdf_nbuf_t msg)
}
/* Target to host Msg/event handler for low priority messages*/
-void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg, bool
- free_msg_buf)
+void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
+ bool free_msg_buf)
{
struct htt_pdev_t *pdev = (struct htt_pdev_t *)context;
uint32_t *msg_word;
@@ -698,10 +697,11 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
QDF_NBUF_CB_PADDR(_buf) -= (HTC_HEADER_LEN + \
HTC_HDR_ALIGNMENT_PADDING); \
qdf_nbuf_init_fast((_buf)); \
- OS_SYNC_SINGLE_FOR_DEVICE(dev, (QDF_NBUF_CB_PADDR(_buf)), \
- (skb_end_pointer(_buf) - \
- (_buf)->data) , \
- PCI_DMA_FROMDEVICE); \
+ qdf_mem_dma_sync_single_for_device(dev, \
+ (QDF_NBUF_CB_PADDR(_buf)), \
+ (skb_end_pointer(_buf) - \
+ (_buf)->data) , \
+ PCI_DMA_FROMDEVICE); \
} while (0)
/**
@@ -710,11 +710,10 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
* @cmpl_msdus: netbuf completions
* @num_cmpls: number of completions to be handled
*
- * Return: Number of completions handled
+ * Return: None
*/
-int
-htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
- uint32_t num_cmpls)
+void htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
+ uint32_t num_cmpls)
{
struct htt_pdev_t *pdev = (struct htt_pdev_t *)context;
qdf_nbuf_t htt_t2h_msg;
@@ -722,7 +721,6 @@ htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
uint32_t i;
enum htt_t2h_msg_type msg_type;
uint32_t msg_len;
- uint32_t num_htt_tx_cmpls = 0;
for (i = 0; i < num_cmpls; i++) {
htt_t2h_msg = cmpl_msdus[i];
@@ -807,7 +805,6 @@ htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
ol_tx_completion_handler(pdev->txrx_pdev, num_msdus,
status, msg_word + 1);
- num_htt_tx_cmpls += SLOTS_PER_TX;
break;
}
case HTT_T2H_MSG_TYPE_RX_PN_IND:
@@ -866,7 +863,6 @@ htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
}
ol_tx_inspect_handler(pdev->txrx_pdev,
num_msdus, msg_word + 1);
- num_htt_tx_cmpls += SLOTS_PER_TX;
break;
}
case HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND:
@@ -915,16 +911,9 @@ htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
};
/* Re-initialize the indication buffer */
- HTT_T2H_MSG_BUF_REINIT(htt_t2h_msg, pdev->osdev->dev);
+ HTT_T2H_MSG_BUF_REINIT(htt_t2h_msg, pdev->osdev);
qdf_nbuf_set_pktlen(htt_t2h_msg, 0);
}
- return num_htt_tx_cmpls;
-}
-#else
-int htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
- uint32_t num_cmpls)
-{
- return 0;
}
#endif /* WLAN_FEATURE_FASTPATH */
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 60270235ffdc..ae1e9d00109c 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -5609,8 +5609,6 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
if (IS_ERR(hdd_ctx))
return PTR_ERR(hdd_ctx);
- hif_update_fastpath_recv_bufs_cnt(hif_sc);
-
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
ret = hdd_enable_ftm(hdd_ctx);
diff --git a/uapi/linux/osapi_linux.h b/uapi/linux/osapi_linux.h
index a62b96d3f613..21f8ff629ab1 100644
--- a/uapi/linux/osapi_linux.h
+++ b/uapi/linux/osapi_linux.h
@@ -231,6 +231,7 @@ void a_netbuf_queue_init(A_NETBUF_QUEUE_T *q);
#include "ath_carr_pltfrm.h"
#endif /* QCA_PARTNER_PLATFORM */
+#define SLOTS_PER_DATAPATH_TX 2
#else /* __KERNEL__ */
#ifdef __GNUC__