Merge "qcacld-3.0: Add changes for Napier flow control" into wlan-cld3.driver.lnx.2.0-dev

This commit is contained in:
CNSS_WLAN Service
2017-07-19 20:21:41 -07:00
committed by Gerrit - the friendly Code Review server
5 changed files with 18 additions and 13 deletions

5
Kbuild
View File

@@ -182,7 +182,7 @@ ifneq ($(CONFIG_ROME_IF),sdio)
CONFIG_WLAN_NAPI_DEBUG := n CONFIG_WLAN_NAPI_DEBUG := n
# Flag to enable FW based TX Flow control # Flag to enable FW based TX Flow control
ifeq ($(CONFIG_CNSS_EOS),y) ifeq (y,$(findstring y,$(CONFIG_CNSS_EOS) $(CONFIG_LITHIUM)))
CONFIG_WLAN_TX_FLOW_CONTROL_V2 := y CONFIG_WLAN_TX_FLOW_CONTROL_V2 := y
else else
CONFIG_WLAN_TX_FLOW_CONTROL_V2 := n CONFIG_WLAN_TX_FLOW_CONTROL_V2 := n
@@ -1080,6 +1080,9 @@ DP_OBJS := $(DP_SRC)/dp_main.o \
$(DP_SRC)/dp_rx_mon_status.o \ $(DP_SRC)/dp_rx_mon_status.o \
$(DP_SRC)/dp_rx_defrag.o \ $(DP_SRC)/dp_rx_defrag.o \
$(DP_SRC)/dp_stats.o $(DP_SRC)/dp_stats.o
ifeq ($(CONFIG_WLAN_TX_FLOW_CONTROL_V2), y)
DP_OBJS += $(DP_SRC)/dp_tx_flow_control.o
endif
endif endif
############ CFG ############ ############ CFG ############

View File

@@ -514,7 +514,7 @@ uint8_t ol_tx_get_is_mgmt_over_wmi_enabled(void);
void ol_tx_register_flow_control(struct ol_txrx_pdev_t *pdev); void ol_tx_register_flow_control(struct ol_txrx_pdev_t *pdev);
void ol_tx_deregister_flow_control(struct ol_txrx_pdev_t *pdev); void ol_tx_deregister_flow_control(struct ol_txrx_pdev_t *pdev);
void ol_tx_dump_flow_pool_info(void); void ol_tx_dump_flow_pool_info(void *);
void ol_tx_clear_flow_pool_stats(void); void ol_tx_clear_flow_pool_stats(void);
void ol_tx_flow_pool_map_handler(uint8_t flow_id, uint8_t flow_type, void ol_tx_flow_pool_map_handler(uint8_t flow_id, uint8_t flow_type,
uint8_t flow_pool_id, uint16_t flow_pool_size); uint8_t flow_pool_id, uint16_t flow_pool_size);
@@ -557,7 +557,7 @@ static inline void ol_tx_register_flow_control(struct ol_txrx_pdev_t *pdev)
static inline void ol_tx_deregister_flow_control(struct ol_txrx_pdev_t *pdev) static inline void ol_tx_deregister_flow_control(struct ol_txrx_pdev_t *pdev)
{ {
} }
static inline void ol_tx_dump_flow_pool_info(void) static inline void ol_tx_dump_flow_pool_info(void *ctx)
{ {
} }
static inline void ol_tx_clear_flow_pool_stats(void) static inline void ol_tx_clear_flow_pool_stats(void)

View File

@@ -1807,7 +1807,7 @@ static void ol_txrx_pdev_pre_detach(struct cdp_pdev *ppdev, int force)
} }
/* to get flow pool status before freeing descs */ /* to get flow pool status before freeing descs */
ol_tx_dump_flow_pool_info(); ol_tx_dump_flow_pool_info((void *)pdev);
for (i = 0; i < pdev->tx_desc.pool_size; i++) { for (i = 0; i < pdev->tx_desc.pool_size; i++) {
void *htt_tx_desc; void *htt_tx_desc;
@@ -4566,7 +4566,7 @@ static QDF_STATUS ol_txrx_display_stats(void *soc, uint16_t value)
ol_txrx_stats_display_tso(pdev); ol_txrx_stats_display_tso(pdev);
break; break;
case CDP_DUMP_TX_FLOW_POOL_INFO: case CDP_DUMP_TX_FLOW_POOL_INFO:
ol_tx_dump_flow_pool_info(); ol_tx_dump_flow_pool_info((void *)pdev);
break; break;
case CDP_TXRX_DESC_STATS: case CDP_TXRX_DESC_STATS:
qdf_nbuf_tx_desc_count_display(); qdf_nbuf_tx_desc_count_display();
@@ -4979,7 +4979,8 @@ exit:
* *
* Return: QDF status * Return: QDF status
*/ */
static QDF_STATUS ol_txrx_register_pause_cb(ol_tx_pause_callback_fp pause_cb) static QDF_STATUS ol_txrx_register_pause_cb(struct cdp_soc_t *soc,
tx_pause_callback pause_cb)
{ {
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX); struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
@@ -5348,7 +5349,7 @@ static struct cdp_flowctl_ops ol_ops_flowctl = {
#ifdef QCA_LL_TX_FLOW_CONTROL_V2 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
.register_pause_cb = ol_txrx_register_pause_cb, .register_pause_cb = ol_txrx_register_pause_cb,
.set_desc_global_pool_size = ol_tx_set_desc_global_pool_size, .set_desc_global_pool_size = ol_tx_set_desc_global_pool_size,
.dump_flow_pool_info = ol_tx_dump_flow_pool_info .dump_flow_pool_info = ol_tx_dump_flow_pool_info,
#endif /* QCA_LL_TX_FLOW_CONTROL_V2 */ #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
}; };

View File

@@ -128,8 +128,10 @@ void ol_tx_deregister_flow_control(struct ol_txrx_pdev_t *pdev)
break; break;
qdf_spin_unlock_bh(&pdev->tx_desc.flow_pool_list_lock); qdf_spin_unlock_bh(&pdev->tx_desc.flow_pool_list_lock);
ol_txrx_info("flow pool list is not empty %d!!!\n", i++); ol_txrx_info("flow pool list is not empty %d!!!\n", i++);
if (i == 1) if (i == 1)
ol_tx_dump_flow_pool_info(); ol_tx_dump_flow_pool_info((void *)pdev);
ol_tx_dec_pool_ref(pool, true); ol_tx_dec_pool_ref(pool, true);
qdf_spin_lock_bh(&pdev->tx_desc.flow_pool_list_lock); qdf_spin_lock_bh(&pdev->tx_desc.flow_pool_list_lock);
} }
@@ -274,13 +276,12 @@ QDF_STATUS ol_tx_dec_pool_ref(struct ol_tx_flow_pool_t *pool, bool force)
* *
* Return: none * Return: none
*/ */
void ol_tx_dump_flow_pool_info(void) void ol_tx_dump_flow_pool_info(void *ctx)
{ {
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX); struct ol_txrx_pdev_t *pdev = ctx;
struct ol_tx_flow_pool_t *pool = NULL, *pool_prev = NULL; struct ol_tx_flow_pool_t *pool = NULL, *pool_prev = NULL;
struct ol_tx_flow_pool_t tmp_pool; struct ol_tx_flow_pool_t tmp_pool;
ol_txrx_info("Global Pool"); ol_txrx_info("Global Pool");
if (!pdev) { if (!pdev) {
ol_txrx_err("ERROR: pdev NULL"); ol_txrx_err("ERROR: pdev NULL");

View File

@@ -48,7 +48,7 @@
#include "ol_htt_tx_api.h" #include "ol_htt_tx_api.h"
#include "ol_htt_rx_api.h" #include "ol_htt_rx_api.h"
#include "ol_txrx_ctrl_api.h" /* WLAN_MAX_STA_COUNT */ #include "ol_txrx_ctrl_api.h" /* WLAN_MAX_STA_COUNT */
#include "ol_txrx_osif_api.h" /* ol_rx_callback_fp */ #include "ol_txrx_osif_api.h" /* ol_rx_callback */
#include "cdp_txrx_flow_ctrl_v2.h" #include "cdp_txrx_flow_ctrl_v2.h"
#include "cdp_txrx_peer_ops.h" #include "cdp_txrx_peer_ops.h"
@@ -967,7 +967,7 @@ struct ol_txrx_pdev_t {
int tid_to_ac[OL_TX_NUM_TIDS + OL_TX_VDEV_NUM_QUEUES]; int tid_to_ac[OL_TX_NUM_TIDS + OL_TX_VDEV_NUM_QUEUES];
uint8_t ocb_peer_valid; uint8_t ocb_peer_valid;
struct ol_txrx_peer_t *ocb_peer; struct ol_txrx_peer_t *ocb_peer;
ol_tx_pause_callback_fp pause_cb; tx_pause_callback pause_cb;
struct { struct {
void (*lro_flush_cb)(void *); void (*lro_flush_cb)(void *);