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
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
1c95626911
commit
585178db34
@@ -195,6 +195,8 @@ htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev,
|
|||||||
#ifndef AR6004_HW
|
#ifndef AR6004_HW
|
||||||
if (htt_htc_attach(pdev))
|
if (htt_htc_attach(pdev))
|
||||||
goto fail2;
|
goto fail2;
|
||||||
|
if (hif_ce_fastpath_cb_register(htt_t2h_msg_handler_fast, pdev))
|
||||||
|
qdf_print("failed to register fastpath callback\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return pdev;
|
return pdev;
|
||||||
@@ -397,10 +399,6 @@ int htt_htc_attach(struct htt_pdev_t *pdev)
|
|||||||
HTC_SERVICE_CONNECT_RESP response;
|
HTC_SERVICE_CONNECT_RESP response;
|
||||||
A_STATUS status;
|
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(&connect, sizeof(connect), 0);
|
||||||
qdf_mem_set(&response, sizeof(response), 0);
|
qdf_mem_set(&response, sizeof(response), 0);
|
||||||
|
|
||||||
|
@@ -431,8 +431,16 @@ 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);
|
||||||
|
|
||||||
void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt);
|
void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt);
|
||||||
int htt_t2h_msg_handler_fast(void *htt_pdev, qdf_nbuf_t *cmpl_msdus,
|
#ifdef WLAN_FEATURE_FASTPATH
|
||||||
|
void htt_t2h_msg_handler_fast(void *htt_pdev, qdf_nbuf_t *cmpl_msdus,
|
||||||
uint32_t num_cmpls);
|
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);
|
void htt_h2t_send_complete(void *context, HTC_PACKET *pkt);
|
||||||
|
|
||||||
|
@@ -44,7 +44,6 @@
|
|||||||
#include <ol_htt_tx_api.h>
|
#include <ol_htt_tx_api.h>
|
||||||
#include <ol_txrx_htt_api.h> /* htt_tx_status */
|
#include <ol_txrx_htt_api.h> /* htt_tx_status */
|
||||||
|
|
||||||
#include <osdep.h>
|
|
||||||
#include <htt_internal.h> /* HTT_TX_SCHED, etc. */
|
#include <htt_internal.h> /* HTT_TX_SCHED, etc. */
|
||||||
#include <pktlog_ac_fmt.h>
|
#include <pktlog_ac_fmt.h>
|
||||||
#include <wdi_event.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*/
|
/* 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
|
void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
|
||||||
free_msg_buf)
|
bool free_msg_buf)
|
||||||
{
|
{
|
||||||
struct htt_pdev_t *pdev = (struct htt_pdev_t *)context;
|
struct htt_pdev_t *pdev = (struct htt_pdev_t *)context;
|
||||||
uint32_t *msg_word;
|
uint32_t *msg_word;
|
||||||
@@ -698,7 +697,8 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
|
|||||||
QDF_NBUF_CB_PADDR(_buf) -= (HTC_HEADER_LEN + \
|
QDF_NBUF_CB_PADDR(_buf) -= (HTC_HEADER_LEN + \
|
||||||
HTC_HDR_ALIGNMENT_PADDING); \
|
HTC_HDR_ALIGNMENT_PADDING); \
|
||||||
qdf_nbuf_init_fast((_buf)); \
|
qdf_nbuf_init_fast((_buf)); \
|
||||||
OS_SYNC_SINGLE_FOR_DEVICE(dev, (QDF_NBUF_CB_PADDR(_buf)), \
|
qdf_mem_dma_sync_single_for_device(dev, \
|
||||||
|
(QDF_NBUF_CB_PADDR(_buf)), \
|
||||||
(skb_end_pointer(_buf) - \
|
(skb_end_pointer(_buf) - \
|
||||||
(_buf)->data) , \
|
(_buf)->data) , \
|
||||||
PCI_DMA_FROMDEVICE); \
|
PCI_DMA_FROMDEVICE); \
|
||||||
@@ -710,10 +710,9 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
|
|||||||
* @cmpl_msdus: netbuf completions
|
* @cmpl_msdus: netbuf completions
|
||||||
* @num_cmpls: number of completions to be handled
|
* @num_cmpls: number of completions to be handled
|
||||||
*
|
*
|
||||||
* Return: Number of completions handled
|
* Return: None
|
||||||
*/
|
*/
|
||||||
int
|
void htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
|
||||||
htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
|
|
||||||
uint32_t num_cmpls)
|
uint32_t num_cmpls)
|
||||||
{
|
{
|
||||||
struct htt_pdev_t *pdev = (struct htt_pdev_t *)context;
|
struct htt_pdev_t *pdev = (struct htt_pdev_t *)context;
|
||||||
@@ -722,7 +721,6 @@ htt_t2h_msg_handler_fast(void *context, qdf_nbuf_t *cmpl_msdus,
|
|||||||
uint32_t i;
|
uint32_t i;
|
||||||
enum htt_t2h_msg_type msg_type;
|
enum htt_t2h_msg_type msg_type;
|
||||||
uint32_t msg_len;
|
uint32_t msg_len;
|
||||||
uint32_t num_htt_tx_cmpls = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < num_cmpls; i++) {
|
for (i = 0; i < num_cmpls; i++) {
|
||||||
htt_t2h_msg = cmpl_msdus[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,
|
ol_tx_completion_handler(pdev->txrx_pdev, num_msdus,
|
||||||
status, msg_word + 1);
|
status, msg_word + 1);
|
||||||
|
|
||||||
num_htt_tx_cmpls += SLOTS_PER_TX;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case HTT_T2H_MSG_TYPE_RX_PN_IND:
|
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,
|
ol_tx_inspect_handler(pdev->txrx_pdev,
|
||||||
num_msdus, msg_word + 1);
|
num_msdus, msg_word + 1);
|
||||||
num_htt_tx_cmpls += SLOTS_PER_TX;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND:
|
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 */
|
/* 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);
|
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 */
|
#endif /* WLAN_FEATURE_FASTPATH */
|
||||||
|
|
||||||
|
@@ -5609,8 +5609,6 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
|
|||||||
if (IS_ERR(hdd_ctx))
|
if (IS_ERR(hdd_ctx))
|
||||||
return PTR_ERR(hdd_ctx);
|
return PTR_ERR(hdd_ctx);
|
||||||
|
|
||||||
hif_update_fastpath_recv_bufs_cnt(hif_sc);
|
|
||||||
|
|
||||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||||
ret = hdd_enable_ftm(hdd_ctx);
|
ret = hdd_enable_ftm(hdd_ctx);
|
||||||
|
|
||||||
|
@@ -231,6 +231,7 @@ void a_netbuf_queue_init(A_NETBUF_QUEUE_T *q);
|
|||||||
#include "ath_carr_pltfrm.h"
|
#include "ath_carr_pltfrm.h"
|
||||||
#endif /* QCA_PARTNER_PLATFORM */
|
#endif /* QCA_PARTNER_PLATFORM */
|
||||||
|
|
||||||
|
#define SLOTS_PER_DATAPATH_TX 2
|
||||||
#else /* __KERNEL__ */
|
#else /* __KERNEL__ */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
Reference in New Issue
Block a user