qcacmn: Code to init/deinit SOFTUMAC based Rhine architecture.
This code helps to initialize and deinitialize new SOFTUMAC based Rhine architecture. Change-Id: I374140ccb3b31e9351c6e683c77d81a5a876472a CRs-Fixed: 3382913
This commit is contained in:

committed by
Madan Koyyalamudi

parent
a7cd30b5da
commit
0562ed7a5e
@@ -33,6 +33,9 @@
|
|||||||
#define LITHIUM_DP 0xfffd
|
#define LITHIUM_DP 0xfffd
|
||||||
/* Beryllium device IDs */
|
/* Beryllium device IDs */
|
||||||
#define BERYLLIUM_DP 0xaffe
|
#define BERYLLIUM_DP 0xaffe
|
||||||
|
|
||||||
|
/* RHINE device IDs */
|
||||||
|
#define RHINE_DP 0xbff0
|
||||||
/* Use device IDs for attach in future */
|
/* Use device IDs for attach in future */
|
||||||
|
|
||||||
/* enum cdp_arch_type - enum for DP arch type
|
/* enum cdp_arch_type - enum for DP arch type
|
||||||
@@ -44,6 +47,7 @@ enum cdp_arch_type {
|
|||||||
CDP_ARCH_TYPE_NONE = -1,
|
CDP_ARCH_TYPE_NONE = -1,
|
||||||
CDP_ARCH_TYPE_LI,
|
CDP_ARCH_TYPE_LI,
|
||||||
CDP_ARCH_TYPE_BE,
|
CDP_ARCH_TYPE_BE,
|
||||||
|
CDP_ARCH_TYPE_RH,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(DP_TXRX_SOC_ATTACH)
|
#if defined(DP_TXRX_SOC_ATTACH)
|
||||||
@@ -138,6 +142,8 @@ static inline int cdp_get_arch_type_from_devid(uint16_t devid)
|
|||||||
case MANGO_DEVICE_ID:
|
case MANGO_DEVICE_ID:
|
||||||
case PEACH_DEVICE_ID:
|
case PEACH_DEVICE_ID:
|
||||||
return CDP_ARCH_TYPE_BE;
|
return CDP_ARCH_TYPE_BE;
|
||||||
|
case RHINE_DP:
|
||||||
|
return CDP_ARCH_TYPE_RH;
|
||||||
default:
|
default:
|
||||||
return CDP_ARCH_TYPE_NONE;
|
return CDP_ARCH_TYPE_NONE;
|
||||||
}
|
}
|
||||||
@@ -162,6 +168,7 @@ ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid,
|
|||||||
switch (devid) {
|
switch (devid) {
|
||||||
case LITHIUM_DP: /*FIXME Add lithium device IDs */
|
case LITHIUM_DP: /*FIXME Add lithium device IDs */
|
||||||
case BERYLLIUM_DP:
|
case BERYLLIUM_DP:
|
||||||
|
case RHINE_DP:
|
||||||
case QCA8074_DEVICE_ID: /* Hawekeye */
|
case QCA8074_DEVICE_ID: /* Hawekeye */
|
||||||
case QCA8074V2_DEVICE_ID: /* Hawekeye V2*/
|
case QCA8074V2_DEVICE_ID: /* Hawekeye V2*/
|
||||||
case QCA5018_DEVICE_ID:
|
case QCA5018_DEVICE_ID:
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -32,6 +33,11 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops);
|
|||||||
qdf_size_t dp_get_soc_context_size_be(void);
|
qdf_size_t dp_get_soc_context_size_be(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_RHINE
|
||||||
|
void dp_initialize_arch_ops_rh(struct dp_arch_ops *arch_ops);
|
||||||
|
qdf_size_t dp_get_soc_context_size_rh(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void dp_initialize_default_arch_ops(struct dp_arch_ops *arch_ops)
|
static void dp_initialize_default_arch_ops(struct dp_arch_ops *arch_ops)
|
||||||
{
|
{
|
||||||
/* assign dummy functions for arch_ops which are architecture specific */
|
/* assign dummy functions for arch_ops which are architecture specific */
|
||||||
@@ -51,6 +57,12 @@ qdf_size_t dp_get_soc_context_size(uint16_t device_id)
|
|||||||
return dp_get_soc_context_size_be();
|
return dp_get_soc_context_size_be();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_RHINE
|
||||||
|
case CDP_ARCH_TYPE_RH:
|
||||||
|
return dp_get_soc_context_size_rh();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
}
|
}
|
||||||
@@ -74,6 +86,13 @@ void dp_configure_arch_ops(struct dp_soc *soc)
|
|||||||
dp_initialize_arch_ops_be(&soc->arch_ops);
|
dp_initialize_arch_ops_be(&soc->arch_ops);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_RHINE
|
||||||
|
case CDP_ARCH_TYPE_RH:
|
||||||
|
dp_initialize_arch_ops_rh(&soc->arch_ops);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
}
|
}
|
||||||
|
@@ -2769,6 +2769,7 @@ QDF_STATUS dp_umac_reset_notify_asserted_soc(struct dp_soc *soc)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
QDF_STATUS dp_reo_send_cmd(struct dp_soc *soc, enum hal_reo_cmd_type type,
|
QDF_STATUS dp_reo_send_cmd(struct dp_soc *soc, enum hal_reo_cmd_type type,
|
||||||
struct hal_reo_cmd_params *params,
|
struct hal_reo_cmd_params *params,
|
||||||
void (*callback_fn), void *data);
|
void (*callback_fn), void *data);
|
||||||
@@ -2790,6 +2791,7 @@ void dp_reo_cmdlist_destroy(struct dp_soc *soc);
|
|||||||
*/
|
*/
|
||||||
uint32_t dp_reo_status_ring_handler(struct dp_intr *int_ctx,
|
uint32_t dp_reo_status_ring_handler(struct dp_intr *int_ctx,
|
||||||
struct dp_soc *soc);
|
struct dp_soc *soc);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_aggregate_vdev_stats() - Consolidate stats at VDEV level
|
* dp_aggregate_vdev_stats() - Consolidate stats at VDEV level
|
||||||
|
@@ -6848,6 +6848,7 @@ static QDF_STATUS dp_set_pdev_param(struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
|
|||||||
target_type = hal_get_target_type(soc->hal_soc);
|
target_type = hal_get_target_type(soc->hal_soc);
|
||||||
switch (target_type) {
|
switch (target_type) {
|
||||||
case TARGET_TYPE_QCA6750:
|
case TARGET_TYPE_QCA6750:
|
||||||
|
case TARGET_TYPE_WCN6450:
|
||||||
pdev->ch_band_lmac_id_mapping[REG_BAND_2G] = DP_MAC0_LMAC_ID;
|
pdev->ch_band_lmac_id_mapping[REG_BAND_2G] = DP_MAC0_LMAC_ID;
|
||||||
pdev->ch_band_lmac_id_mapping[REG_BAND_5G] = DP_MAC0_LMAC_ID;
|
pdev->ch_band_lmac_id_mapping[REG_BAND_5G] = DP_MAC0_LMAC_ID;
|
||||||
pdev->ch_band_lmac_id_mapping[REG_BAND_6G] = DP_MAC0_LMAC_ID;
|
pdev->ch_band_lmac_id_mapping[REG_BAND_6G] = DP_MAC0_LMAC_ID;
|
||||||
@@ -10151,6 +10152,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||||||
.txrx_get_vdev_mac_addr = dp_get_vdev_mac_addr_wifi3,
|
.txrx_get_vdev_mac_addr = dp_get_vdev_mac_addr_wifi3,
|
||||||
.txrx_get_ctrl_pdev_from_vdev = dp_get_ctrl_pdev_from_vdev_wifi3,
|
.txrx_get_ctrl_pdev_from_vdev = dp_get_ctrl_pdev_from_vdev_wifi3,
|
||||||
.txrx_ath_getstats = dp_get_device_stats,
|
.txrx_ath_getstats = dp_get_device_stats,
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
.addba_requestprocess = dp_addba_requestprocess_wifi3,
|
.addba_requestprocess = dp_addba_requestprocess_wifi3,
|
||||||
.addba_responsesetup = dp_addba_responsesetup_wifi3,
|
.addba_responsesetup = dp_addba_responsesetup_wifi3,
|
||||||
.addba_resp_tx_completion = dp_addba_resp_tx_completion_wifi3,
|
.addba_resp_tx_completion = dp_addba_resp_tx_completion_wifi3,
|
||||||
@@ -10158,6 +10160,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||||||
.set_addba_response = dp_set_addba_response,
|
.set_addba_response = dp_set_addba_response,
|
||||||
.flush_cache_rx_queue = NULL,
|
.flush_cache_rx_queue = NULL,
|
||||||
.tid_update_ba_win_size = dp_rx_tid_update_ba_win_size,
|
.tid_update_ba_win_size = dp_rx_tid_update_ba_win_size,
|
||||||
|
#endif
|
||||||
/* TODO: get API's for dscp-tid need to be added*/
|
/* TODO: get API's for dscp-tid need to be added*/
|
||||||
.set_vdev_dscp_tid_map = dp_set_vdev_dscp_tid_map_wifi3,
|
.set_vdev_dscp_tid_map = dp_set_vdev_dscp_tid_map_wifi3,
|
||||||
.set_pdev_dscp_tid_map = dp_set_pdev_dscp_tid_map_wifi3,
|
.set_pdev_dscp_tid_map = dp_set_pdev_dscp_tid_map_wifi3,
|
||||||
@@ -10169,7 +10172,6 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||||||
.txrx_intr_attach = dp_soc_interrupt_attach_wrapper,
|
.txrx_intr_attach = dp_soc_interrupt_attach_wrapper,
|
||||||
.txrx_intr_detach = dp_soc_interrupt_detach,
|
.txrx_intr_detach = dp_soc_interrupt_detach,
|
||||||
.txrx_ppeds_stop = dp_soc_ppeds_stop,
|
.txrx_ppeds_stop = dp_soc_ppeds_stop,
|
||||||
.set_pn_check = dp_set_pn_check_wifi3,
|
|
||||||
.set_key_sec_type = dp_set_key_sec_type_wifi3,
|
.set_key_sec_type = dp_set_key_sec_type_wifi3,
|
||||||
.update_config_parameters = dp_update_config_parameters,
|
.update_config_parameters = dp_update_config_parameters,
|
||||||
/* TODO: Add other functions */
|
/* TODO: Add other functions */
|
||||||
@@ -10183,8 +10185,6 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||||||
.map_pdev_to_lmac = dp_soc_map_pdev_to_lmac,
|
.map_pdev_to_lmac = dp_soc_map_pdev_to_lmac,
|
||||||
.handle_mode_change = dp_soc_handle_pdev_mode_change,
|
.handle_mode_change = dp_soc_handle_pdev_mode_change,
|
||||||
.set_pdev_status_down = dp_soc_set_pdev_status_down,
|
.set_pdev_status_down = dp_soc_set_pdev_status_down,
|
||||||
.txrx_set_ba_aging_timeout = dp_set_ba_aging_timeout,
|
|
||||||
.txrx_get_ba_aging_timeout = dp_get_ba_aging_timeout,
|
|
||||||
.txrx_peer_reset_ast = dp_wds_reset_ast_wifi3,
|
.txrx_peer_reset_ast = dp_wds_reset_ast_wifi3,
|
||||||
.txrx_peer_reset_ast_table = dp_wds_reset_ast_table_wifi3,
|
.txrx_peer_reset_ast_table = dp_wds_reset_ast_table_wifi3,
|
||||||
.txrx_peer_flush_ast_table = dp_wds_flush_ast_table_wifi3,
|
.txrx_peer_flush_ast_table = dp_wds_flush_ast_table_wifi3,
|
||||||
@@ -10192,7 +10192,14 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||||||
.set_soc_param = dp_soc_set_param,
|
.set_soc_param = dp_soc_set_param,
|
||||||
.txrx_get_os_rx_handles_from_vdev =
|
.txrx_get_os_rx_handles_from_vdev =
|
||||||
dp_get_os_rx_handles_from_vdev_wifi3,
|
dp_get_os_rx_handles_from_vdev_wifi3,
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
|
.set_pn_check = dp_set_pn_check_wifi3,
|
||||||
|
.txrx_set_ba_aging_timeout = dp_set_ba_aging_timeout,
|
||||||
|
.txrx_get_ba_aging_timeout = dp_get_ba_aging_timeout,
|
||||||
.delba_tx_completion = dp_delba_tx_completion_wifi3,
|
.delba_tx_completion = dp_delba_tx_completion_wifi3,
|
||||||
|
.set_pdev_pcp_tid_map = dp_set_pdev_pcp_tid_map_wifi3,
|
||||||
|
.set_vdev_pcp_tid_map = dp_set_vdev_pcp_tid_map_wifi3,
|
||||||
|
#endif
|
||||||
.get_dp_capabilities = dp_get_cfg_capabilities,
|
.get_dp_capabilities = dp_get_cfg_capabilities,
|
||||||
.txrx_get_cfg = dp_get_cfg,
|
.txrx_get_cfg = dp_get_cfg,
|
||||||
.set_rate_stats_ctx = dp_soc_set_rate_stats_ctx,
|
.set_rate_stats_ctx = dp_soc_set_rate_stats_ctx,
|
||||||
@@ -10201,9 +10208,6 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||||||
.txrx_flush_rate_stats_request = dp_flush_rate_stats_req,
|
.txrx_flush_rate_stats_request = dp_flush_rate_stats_req,
|
||||||
.txrx_peer_get_peerstats_ctx = dp_peer_get_peerstats_ctx,
|
.txrx_peer_get_peerstats_ctx = dp_peer_get_peerstats_ctx,
|
||||||
|
|
||||||
.set_pdev_pcp_tid_map = dp_set_pdev_pcp_tid_map_wifi3,
|
|
||||||
.set_vdev_pcp_tid_map = dp_set_vdev_pcp_tid_map_wifi3,
|
|
||||||
|
|
||||||
.txrx_cp_peer_del_response = dp_cp_peer_del_resp_handler,
|
.txrx_cp_peer_del_response = dp_cp_peer_del_resp_handler,
|
||||||
#ifdef QCA_MULTIPASS_SUPPORT
|
#ifdef QCA_MULTIPASS_SUPPORT
|
||||||
.set_vlan_groupkey = dp_set_vlan_groupkey,
|
.set_vlan_groupkey = dp_set_vlan_groupkey,
|
||||||
@@ -10251,8 +10255,10 @@ static struct cdp_ctrl_ops dp_ops_ctrl = {
|
|||||||
.txrx_set_vdev_param = dp_set_vdev_param,
|
.txrx_set_vdev_param = dp_set_vdev_param,
|
||||||
.txrx_set_psoc_param = dp_set_psoc_param,
|
.txrx_set_psoc_param = dp_set_psoc_param,
|
||||||
.txrx_get_psoc_param = dp_get_psoc_param,
|
.txrx_get_psoc_param = dp_get_psoc_param,
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
.txrx_set_pdev_reo_dest = dp_set_pdev_reo_dest,
|
.txrx_set_pdev_reo_dest = dp_set_pdev_reo_dest,
|
||||||
.txrx_get_pdev_reo_dest = dp_get_pdev_reo_dest,
|
.txrx_get_pdev_reo_dest = dp_get_pdev_reo_dest,
|
||||||
|
#endif
|
||||||
.txrx_get_sec_type = dp_get_sec_type,
|
.txrx_get_sec_type = dp_get_sec_type,
|
||||||
.txrx_wdi_event_sub = dp_wdi_event_sub,
|
.txrx_wdi_event_sub = dp_wdi_event_sub,
|
||||||
.txrx_wdi_event_unsub = dp_wdi_event_unsub,
|
.txrx_wdi_event_unsub = dp_wdi_event_unsub,
|
||||||
@@ -10887,8 +10893,10 @@ static struct cdp_misc_ops dp_ops_misc = {
|
|||||||
|
|
||||||
#ifdef WLAN_FEATURE_STATS_EXT
|
#ifdef WLAN_FEATURE_STATS_EXT
|
||||||
.txrx_ext_stats_request = dp_txrx_ext_stats_request,
|
.txrx_ext_stats_request = dp_txrx_ext_stats_request,
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
.request_rx_hw_stats = dp_request_rx_hw_stats,
|
.request_rx_hw_stats = dp_request_rx_hw_stats,
|
||||||
.reset_rx_hw_ext_stats = dp_reset_rx_hw_ext_stats,
|
.reset_rx_hw_ext_stats = dp_reset_rx_hw_ext_stats,
|
||||||
|
#endif
|
||||||
#endif /* WLAN_FEATURE_STATS_EXT */
|
#endif /* WLAN_FEATURE_STATS_EXT */
|
||||||
.vdev_inform_ll_conn = dp_vdev_inform_ll_conn,
|
.vdev_inform_ll_conn = dp_vdev_inform_ll_conn,
|
||||||
#ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
|
#ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
|
||||||
@@ -10896,7 +10904,9 @@ static struct cdp_misc_ops dp_ops_misc = {
|
|||||||
.is_swlm_enabled = dp_soc_is_swlm_enabled,
|
.is_swlm_enabled = dp_soc_is_swlm_enabled,
|
||||||
#endif
|
#endif
|
||||||
.display_txrx_hw_info = dp_display_srng_info,
|
.display_txrx_hw_info = dp_display_srng_info,
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
.get_tx_rings_grp_bitmap = dp_get_tx_rings_grp_bitmap,
|
.get_tx_rings_grp_bitmap = dp_get_tx_rings_grp_bitmap,
|
||||||
|
#endif
|
||||||
#ifdef WLAN_FEATURE_MARK_FIRST_WAKEUP_PACKET
|
#ifdef WLAN_FEATURE_MARK_FIRST_WAKEUP_PACKET
|
||||||
.mark_first_wakeup_packet = dp_mark_first_wakeup_packet,
|
.mark_first_wakeup_packet = dp_mark_first_wakeup_packet,
|
||||||
#endif
|
#endif
|
||||||
@@ -11211,6 +11221,7 @@ dp_get_link_desc_id_start(uint16_t arch_id)
|
|||||||
{
|
{
|
||||||
switch (arch_id) {
|
switch (arch_id) {
|
||||||
case CDP_ARCH_TYPE_LI:
|
case CDP_ARCH_TYPE_LI:
|
||||||
|
case CDP_ARCH_TYPE_RH:
|
||||||
return LINK_DESC_ID_START_21_BITS_COOKIE;
|
return LINK_DESC_ID_START_21_BITS_COOKIE;
|
||||||
case CDP_ARCH_TYPE_BE:
|
case CDP_ARCH_TYPE_BE:
|
||||||
return LINK_DESC_ID_START_20_BITS_COOKIE;
|
return LINK_DESC_ID_START_20_BITS_COOKIE;
|
||||||
|
@@ -6699,6 +6699,55 @@ void dp_print_peer_txrx_stats_li(struct cdp_peer_stats *peer_stats,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dp_print_peer_txrx_stats_rh(struct cdp_peer_stats *peer_stats,
|
||||||
|
enum peer_stats_type stats_type)
|
||||||
|
{
|
||||||
|
if (stats_type == PEER_TX_STATS) {
|
||||||
|
DP_PRINT_STATS("BW Counts = 20MHZ %d 40MHZ %d 80MHZ %d 160MHZ %d\n",
|
||||||
|
peer_stats->tx.bw[CMN_BW_20MHZ],
|
||||||
|
peer_stats->tx.bw[CMN_BW_40MHZ],
|
||||||
|
peer_stats->tx.bw[CMN_BW_80MHZ],
|
||||||
|
peer_stats->tx.bw[CMN_BW_160MHZ]);
|
||||||
|
DP_PRINT_STATS("RU Locations");
|
||||||
|
DP_PRINT_STATS("%s: MSDUs Success = %d MPDUs Success = %d MPDUs Tried = %d",
|
||||||
|
cdp_ru_string[RU_26_INDEX].ru_type,
|
||||||
|
peer_stats->tx.ru_loc[RU_26_INDEX].num_msdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_26_INDEX].num_mpdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_26_INDEX].mpdu_tried);
|
||||||
|
DP_PRINT_STATS("%s: MSDUs Success = %d MPDUs Success = %d MPDUs Tried = %d",
|
||||||
|
cdp_ru_string[RU_52_INDEX].ru_type,
|
||||||
|
peer_stats->tx.ru_loc[RU_52_INDEX].num_msdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_52_INDEX].num_mpdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_52_INDEX].mpdu_tried);
|
||||||
|
DP_PRINT_STATS("%s: MSDUs Success = %d MPDUs Success = %d MPDUs Tried = %d",
|
||||||
|
cdp_ru_string[RU_106_INDEX].ru_type,
|
||||||
|
peer_stats->tx.ru_loc[RU_106_INDEX].num_msdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_106_INDEX].num_mpdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_106_INDEX].mpdu_tried);
|
||||||
|
DP_PRINT_STATS("%s: MSDUs Success = %d MPDUs Success = %d MPDUs Tried = %d",
|
||||||
|
cdp_ru_string[RU_242_INDEX].ru_type,
|
||||||
|
peer_stats->tx.ru_loc[RU_242_INDEX].num_msdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_242_INDEX].num_mpdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_242_INDEX].mpdu_tried);
|
||||||
|
DP_PRINT_STATS("%s: MSDUs Success = %d MPDUs Success = %d MPDUs Tried = %d",
|
||||||
|
cdp_ru_string[RU_484_INDEX].ru_type,
|
||||||
|
peer_stats->tx.ru_loc[RU_484_INDEX].num_msdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_484_INDEX].num_mpdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_484_INDEX].mpdu_tried);
|
||||||
|
DP_PRINT_STATS("%s: MSDUs Success = %d MPDUs Success = %d MPDUs Tried = %d",
|
||||||
|
cdp_ru_string[RU_996_INDEX].ru_type,
|
||||||
|
peer_stats->tx.ru_loc[RU_996_INDEX].num_msdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_996_INDEX].num_mpdu,
|
||||||
|
peer_stats->tx.ru_loc[RU_996_INDEX].mpdu_tried);
|
||||||
|
} else {
|
||||||
|
DP_PRINT_STATS("BW Counts = 20MHZ %d 40MHZ %d 80MHZ %d 160MHZ %d",
|
||||||
|
peer_stats->rx.bw[CMN_BW_20MHZ],
|
||||||
|
peer_stats->rx.bw[CMN_BW_40MHZ],
|
||||||
|
peer_stats->rx.bw[CMN_BW_80MHZ],
|
||||||
|
peer_stats->rx.bw[CMN_BW_160MHZ]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef REO_SHARED_QREF_TABLE_EN
|
#ifdef REO_SHARED_QREF_TABLE_EN
|
||||||
static void dp_peer_print_reo_qref_table(struct dp_peer *peer)
|
static void dp_peer_print_reo_qref_table(struct dp_peer *peer)
|
||||||
{
|
{
|
||||||
@@ -7395,6 +7444,7 @@ void dp_txrx_path_stats(struct dp_soc *soc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
/**
|
/**
|
||||||
* dp_peer_ctrl_frames_stats_get() - function to agreegate peer stats
|
* dp_peer_ctrl_frames_stats_get() - function to agreegate peer stats
|
||||||
* Current scope is bar received count
|
* Current scope is bar received count
|
||||||
@@ -7425,6 +7475,25 @@ dp_peer_ctrl_frames_stats_get(struct dp_soc *soc,
|
|||||||
qdf_atomic_set(&pdev->stats_cmd_complete, 0);
|
qdf_atomic_set(&pdev->stats_cmd_complete, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
/**
|
||||||
|
* dp_peer_ctrl_frames_stats_get() - function to agreegate peer stats
|
||||||
|
* Current scope is bar received count
|
||||||
|
*
|
||||||
|
* @soc : Datapath SOC handle
|
||||||
|
* @peer: Datapath peer handle
|
||||||
|
* @arg : argument to iterate function
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
dp_peer_ctrl_frames_stats_get(struct dp_soc *soc,
|
||||||
|
struct dp_peer *peer,
|
||||||
|
void *arg)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif /* WLAN_SOFTUMAC_SUPPORT */
|
||||||
|
|
||||||
void
|
void
|
||||||
dp_print_pdev_tx_stats(struct dp_pdev *pdev)
|
dp_print_pdev_tx_stats(struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
|
@@ -5769,6 +5769,7 @@ void dp_tx_desc_check_corruption(struct dp_tx_desc_s *tx_desc)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
uint32_t dp_tx_comp_handler(struct dp_intr *int_ctx, struct dp_soc *soc,
|
uint32_t dp_tx_comp_handler(struct dp_intr *int_ctx, struct dp_soc *soc,
|
||||||
hal_ring_handle_t hal_ring_hdl, uint8_t ring_id,
|
hal_ring_handle_t hal_ring_hdl, uint8_t ring_id,
|
||||||
uint32_t quota)
|
uint32_t quota)
|
||||||
@@ -6035,6 +6036,7 @@ next_desc:
|
|||||||
|
|
||||||
return num_processed;
|
return num_processed;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_TDLS
|
#ifdef FEATURE_WLAN_TDLS
|
||||||
qdf_nbuf_t dp_tx_non_std(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
qdf_nbuf_t dp_tx_non_std(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||||
@@ -6395,6 +6397,7 @@ static void dp_tx_tso_cmn_desc_pool_free(struct dp_soc *soc, uint8_t num_pool)
|
|||||||
dp_tx_tso_num_seg_pool_free(soc, num_pool);
|
dp_tx_tso_num_seg_pool_free(soc, num_pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
void dp_soc_tx_desc_sw_pools_free(struct dp_soc *soc)
|
void dp_soc_tx_desc_sw_pools_free(struct dp_soc *soc)
|
||||||
{
|
{
|
||||||
uint8_t num_pool;
|
uint8_t num_pool;
|
||||||
@@ -6417,6 +6420,26 @@ void dp_soc_tx_desc_sw_pools_deinit(struct dp_soc *soc)
|
|||||||
dp_tx_ext_desc_pool_deinit(soc, num_pool);
|
dp_tx_ext_desc_pool_deinit(soc, num_pool);
|
||||||
dp_tx_deinit_static_pools(soc, num_pool);
|
dp_tx_deinit_static_pools(soc, num_pool);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
void dp_soc_tx_desc_sw_pools_free(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
uint8_t num_pool;
|
||||||
|
|
||||||
|
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||||
|
|
||||||
|
dp_tx_delete_static_pools(soc, num_pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dp_soc_tx_desc_sw_pools_deinit(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
uint8_t num_pool;
|
||||||
|
|
||||||
|
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||||
|
|
||||||
|
dp_tx_flow_control_deinit(soc);
|
||||||
|
dp_tx_deinit_static_pools(soc, num_pool);
|
||||||
|
}
|
||||||
|
#endif /*WLAN_SOFTUMAC_SUPPORT*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_tx_tso_cmn_desc_pool_alloc() - TSO cmn desc pool allocator
|
* dp_tx_tso_cmn_desc_pool_alloc() - TSO cmn desc pool allocator
|
||||||
@@ -6475,6 +6498,7 @@ static QDF_STATUS dp_tx_tso_cmn_desc_pool_init(struct dp_soc *soc,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
QDF_STATUS dp_soc_tx_desc_sw_pools_alloc(struct dp_soc *soc)
|
QDF_STATUS dp_soc_tx_desc_sw_pools_alloc(struct dp_soc *soc)
|
||||||
{
|
{
|
||||||
uint8_t num_pool;
|
uint8_t num_pool;
|
||||||
@@ -6549,6 +6573,46 @@ fail1:
|
|||||||
return QDF_STATUS_E_RESOURCES;
|
return QDF_STATUS_E_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
QDF_STATUS dp_soc_tx_desc_sw_pools_alloc(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
uint8_t num_pool;
|
||||||
|
uint32_t num_desc;
|
||||||
|
|
||||||
|
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||||
|
num_desc = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
||||||
|
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
|
||||||
|
"%s Tx Desc Alloc num_pool = %d, descs = %d",
|
||||||
|
__func__, num_pool, num_desc);
|
||||||
|
|
||||||
|
if ((num_pool > MAX_TXDESC_POOLS) ||
|
||||||
|
(num_desc > WLAN_CFG_NUM_TX_DESC_MAX))
|
||||||
|
return QDF_STATUS_E_RESOURCES;
|
||||||
|
|
||||||
|
if (dp_tx_alloc_static_pools(soc, num_pool, num_desc))
|
||||||
|
return QDF_STATUS_E_RESOURCES;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS dp_soc_tx_desc_sw_pools_init(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
uint8_t num_pool;
|
||||||
|
uint32_t num_desc;
|
||||||
|
|
||||||
|
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||||
|
num_desc = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
||||||
|
|
||||||
|
if (dp_tx_init_static_pools(soc, num_pool, num_desc))
|
||||||
|
return QDF_STATUS_E_RESOURCES;
|
||||||
|
|
||||||
|
dp_tx_flow_control_init(soc);
|
||||||
|
soc->process_tx_status = CONFIG_PROCESS_TX_STATUS;
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS dp_tso_soc_attach(struct cdp_soc_t *txrx_soc)
|
QDF_STATUS dp_tso_soc_attach(struct cdp_soc_t *txrx_soc)
|
||||||
{
|
{
|
||||||
struct dp_soc *soc = (struct dp_soc *)txrx_soc;
|
struct dp_soc *soc = (struct dp_soc *)txrx_soc;
|
||||||
|
@@ -604,6 +604,7 @@ qdf_nbuf_t dp_tx_non_std(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
|||||||
*/
|
*/
|
||||||
int dp_tx_frame_is_drop(struct dp_vdev *vdev, uint8_t *srcmac, uint8_t *dstmac);
|
int dp_tx_frame_is_drop(struct dp_vdev *vdev, uint8_t *srcmac, uint8_t *dstmac);
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
/**
|
/**
|
||||||
* dp_tx_comp_handler() - Tx completion handler
|
* dp_tx_comp_handler() - Tx completion handler
|
||||||
* @int_ctx: pointer to DP interrupt context
|
* @int_ctx: pointer to DP interrupt context
|
||||||
@@ -621,6 +622,7 @@ int dp_tx_frame_is_drop(struct dp_vdev *vdev, uint8_t *srcmac, uint8_t *dstmac);
|
|||||||
uint32_t dp_tx_comp_handler(struct dp_intr *int_ctx, struct dp_soc *soc,
|
uint32_t dp_tx_comp_handler(struct dp_intr *int_ctx, struct dp_soc *soc,
|
||||||
hal_ring_handle_t hal_srng, uint8_t ring_id,
|
hal_ring_handle_t hal_srng, uint8_t ring_id,
|
||||||
uint32_t quota);
|
uint32_t quota);
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
dp_tx_prepare_send_me(struct dp_vdev *vdev, qdf_nbuf_t nbuf);
|
dp_tx_prepare_send_me(struct dp_vdev *vdev, qdf_nbuf_t nbuf);
|
||||||
@@ -1076,6 +1078,7 @@ void dp_soc_tx_desc_sw_pools_free(struct dp_soc *soc);
|
|||||||
*/
|
*/
|
||||||
void dp_soc_tx_desc_sw_pools_deinit(struct dp_soc *soc);
|
void dp_soc_tx_desc_sw_pools_deinit(struct dp_soc *soc);
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
/**
|
/**
|
||||||
* dp_handle_wbm_internal_error() - handles wbm_internal_error case
|
* dp_handle_wbm_internal_error() - handles wbm_internal_error case
|
||||||
* @soc: core DP main context
|
* @soc: core DP main context
|
||||||
@@ -1098,6 +1101,7 @@ void dp_soc_tx_desc_sw_pools_deinit(struct dp_soc *soc);
|
|||||||
void
|
void
|
||||||
dp_handle_wbm_internal_error(struct dp_soc *soc, void *hal_desc,
|
dp_handle_wbm_internal_error(struct dp_soc *soc, void *hal_desc,
|
||||||
uint32_t buf_type);
|
uint32_t buf_type);
|
||||||
|
#endif
|
||||||
#else /* QCA_HOST_MODE_WIFI_DISABLED */
|
#else /* QCA_HOST_MODE_WIFI_DISABLED */
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
|
@@ -5191,6 +5191,9 @@ void dp_print_peer_txrx_stats_be(struct cdp_peer_stats *peer_stats,
|
|||||||
void dp_print_peer_txrx_stats_li(struct cdp_peer_stats *peer_stats,
|
void dp_print_peer_txrx_stats_li(struct cdp_peer_stats *peer_stats,
|
||||||
enum peer_stats_type stats_type);
|
enum peer_stats_type stats_type);
|
||||||
|
|
||||||
|
void dp_print_peer_txrx_stats_rh(struct cdp_peer_stats *peer_stats,
|
||||||
|
enum peer_stats_type stats_type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_should_timer_irq_yield() - Decide if the bottom half should yield
|
* dp_should_timer_irq_yield() - Decide if the bottom half should yield
|
||||||
* @soc: DP soc handle
|
* @soc: DP soc handle
|
||||||
|
@@ -5453,6 +5453,7 @@ QDF_STATUS dp_mon_soc_cfg_init(struct dp_soc *soc)
|
|||||||
case TARGET_TYPE_KIWI:
|
case TARGET_TYPE_KIWI:
|
||||||
case TARGET_TYPE_MANGO:
|
case TARGET_TYPE_MANGO:
|
||||||
case TARGET_TYPE_PEACH:
|
case TARGET_TYPE_PEACH:
|
||||||
|
case TARGET_TYPE_WCN6450:
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
break;
|
break;
|
||||||
case TARGET_TYPE_QCA8074:
|
case TARGET_TYPE_QCA8074:
|
||||||
@@ -6164,6 +6165,7 @@ void dp_mon_ops_register(struct dp_soc *soc)
|
|||||||
case TARGET_TYPE_QCN9000:
|
case TARGET_TYPE_QCN9000:
|
||||||
case TARGET_TYPE_QCA5018:
|
case TARGET_TYPE_QCA5018:
|
||||||
case TARGET_TYPE_QCN6122:
|
case TARGET_TYPE_QCN6122:
|
||||||
|
case TARGET_TYPE_WCN6450:
|
||||||
dp_mon_ops_register_1_0(mon_soc);
|
dp_mon_ops_register_1_0(mon_soc);
|
||||||
break;
|
break;
|
||||||
case TARGET_TYPE_QCN9224:
|
case TARGET_TYPE_QCN9224:
|
||||||
@@ -6226,6 +6228,7 @@ void dp_mon_cdp_ops_register(struct dp_soc *soc)
|
|||||||
case TARGET_TYPE_QCN9000:
|
case TARGET_TYPE_QCN9000:
|
||||||
case TARGET_TYPE_QCA5018:
|
case TARGET_TYPE_QCA5018:
|
||||||
case TARGET_TYPE_QCN6122:
|
case TARGET_TYPE_QCN6122:
|
||||||
|
case TARGET_TYPE_WCN6450:
|
||||||
dp_mon_cdp_ops_register_1_0(ops);
|
dp_mon_cdp_ops_register_1_0(ops);
|
||||||
#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
|
#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
|
||||||
dp_cfr_filter_register_1_0(ops);
|
dp_cfr_filter_register_1_0(ops);
|
||||||
|
@@ -26,9 +26,205 @@
|
|||||||
#include "dp_rh_rx.h"
|
#include "dp_rh_rx.h"
|
||||||
#include "dp_peer.h"
|
#include "dp_peer.h"
|
||||||
#include <wlan_utility.h>
|
#include <wlan_utility.h>
|
||||||
|
#include <dp_rings.h>
|
||||||
|
|
||||||
|
static QDF_STATUS
|
||||||
|
dp_srng_init_rh(struct dp_soc *soc, struct dp_srng *srng, int ring_type,
|
||||||
|
int ring_num, int mac_id)
|
||||||
|
{
|
||||||
|
hal_soc_handle_t hal_soc = soc->hal_soc;
|
||||||
|
struct hal_srng_params ring_params;
|
||||||
|
|
||||||
|
if (srng->hal_srng) {
|
||||||
|
dp_init_err("%pK: Ring type: %d, num:%d is already initialized",
|
||||||
|
soc, ring_type, ring_num);
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* memset the srng ring to zero */
|
||||||
|
qdf_mem_zero(srng->base_vaddr_unaligned, srng->alloc_size);
|
||||||
|
|
||||||
|
qdf_mem_zero(&ring_params, sizeof(struct hal_srng_params));
|
||||||
|
ring_params.ring_base_paddr = srng->base_paddr_aligned;
|
||||||
|
ring_params.ring_base_vaddr = srng->base_vaddr_aligned;
|
||||||
|
|
||||||
|
ring_params.num_entries = srng->num_entries;
|
||||||
|
|
||||||
|
dp_info("Ring type: %d, num:%d vaddr %pK paddr %pK entries %u",
|
||||||
|
ring_type, ring_num,
|
||||||
|
(void *)ring_params.ring_base_vaddr,
|
||||||
|
(void *)ring_params.ring_base_paddr,
|
||||||
|
ring_params.num_entries);
|
||||||
|
|
||||||
|
srng->hal_srng = hal_srng_setup(hal_soc, ring_type, ring_num,
|
||||||
|
mac_id, &ring_params, 0);
|
||||||
|
|
||||||
|
if (!srng->hal_srng) {
|
||||||
|
dp_srng_free(soc, srng);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS
|
||||||
|
dp_peer_setup_rh(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||||
|
uint8_t *peer_mac,
|
||||||
|
struct cdp_peer_setup_info *setup_info)
|
||||||
|
{
|
||||||
|
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
||||||
|
struct dp_pdev *pdev;
|
||||||
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
struct dp_vdev *vdev = NULL;
|
||||||
|
struct dp_peer *peer =
|
||||||
|
dp_peer_find_hash_find(soc, peer_mac, 0, vdev_id,
|
||||||
|
DP_MOD_ID_CDP);
|
||||||
|
enum wlan_op_mode vdev_opmode;
|
||||||
|
|
||||||
|
if (!peer)
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
|
vdev = peer->vdev;
|
||||||
|
if (!vdev) {
|
||||||
|
status = QDF_STATUS_E_FAILURE;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* save vdev related member in case vdev freed */
|
||||||
|
vdev_opmode = vdev->opmode;
|
||||||
|
pdev = vdev->pdev;
|
||||||
|
|
||||||
|
dp_info("pdev: %d vdev :%d opmode:%u",
|
||||||
|
pdev->pdev_id, vdev->vdev_id, vdev->opmode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* There are corner cases where the AD1 = AD2 = "VAPs address"
|
||||||
|
* i.e both the devices have same MAC address. In these
|
||||||
|
* cases we want such pkts to be processed in NULL Q handler
|
||||||
|
* which is REO2TCL ring. for this reason we should
|
||||||
|
* not setup reo_queues and default route for bss_peer.
|
||||||
|
*/
|
||||||
|
dp_monitor_peer_tx_init(pdev, peer);
|
||||||
|
|
||||||
|
if (!setup_info)
|
||||||
|
if (dp_peer_legacy_setup(soc, peer) !=
|
||||||
|
QDF_STATUS_SUCCESS) {
|
||||||
|
status = QDF_STATUS_E_RESOURCES;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (peer->bss_peer && vdev->opmode == wlan_op_mode_ap) {
|
||||||
|
status = QDF_STATUS_E_FAILURE;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vdev_opmode != wlan_op_mode_monitor)
|
||||||
|
dp_peer_rx_init(pdev, peer);
|
||||||
|
|
||||||
|
dp_peer_ppdu_delayed_ba_init(peer);
|
||||||
|
|
||||||
|
fail:
|
||||||
|
dp_peer_unref_delete(peer, DP_MOD_ID_CDP);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AST_OFFLOAD_ENABLE
|
||||||
|
static void dp_peer_map_detach_rh(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
dp_soc_wds_detach(soc);
|
||||||
|
dp_peer_ast_table_detach(soc);
|
||||||
|
dp_peer_ast_hash_detach(soc);
|
||||||
|
dp_peer_mec_hash_detach(soc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS dp_peer_map_attach_rh(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
soc->max_peer_id = soc->max_peers;
|
||||||
|
|
||||||
|
status = dp_peer_ast_table_attach(soc);
|
||||||
|
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||||
|
return status;
|
||||||
|
|
||||||
|
status = dp_peer_ast_hash_attach(soc);
|
||||||
|
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||||
|
goto ast_table_detach;
|
||||||
|
|
||||||
|
status = dp_peer_mec_hash_attach(soc);
|
||||||
|
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||||
|
goto hash_detach;
|
||||||
|
|
||||||
|
dp_soc_wds_attach(soc);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
hash_detach:
|
||||||
|
dp_peer_ast_hash_detach(soc);
|
||||||
|
ast_table_detach:
|
||||||
|
dp_peer_ast_table_detach(soc);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void dp_peer_map_detach_rh(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS dp_peer_map_attach_rh(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
soc->max_peer_id = soc->max_peers;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dp_soc_cfg_init_rh() - initialize target specific configuration
|
||||||
|
* during dp_soc_init
|
||||||
|
* @soc: dp soc handle
|
||||||
|
*/
|
||||||
|
static void dp_soc_cfg_init_rh(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
uint32_t target_type;
|
||||||
|
|
||||||
|
target_type = hal_get_target_type(soc->hal_soc);
|
||||||
|
switch (target_type) {
|
||||||
|
case TARGET_TYPE_WCN6450:
|
||||||
|
wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, true);
|
||||||
|
soc->ast_override_support = 1;
|
||||||
|
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
qdf_print("%s: Unknown tgt type %d\n", __func__, target_type);
|
||||||
|
qdf_assert_always(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void dp_soc_cfg_attach_rh(struct dp_soc *soc)
|
static void dp_soc_cfg_attach_rh(struct dp_soc *soc)
|
||||||
{
|
{
|
||||||
|
int target_type;
|
||||||
|
|
||||||
|
target_type = hal_get_target_type(soc->hal_soc);
|
||||||
|
switch (target_type) {
|
||||||
|
case TARGET_TYPE_WCN6450:
|
||||||
|
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
qdf_print("%s: Unknown tgt type %d\n", __func__, target_type);
|
||||||
|
qdf_assert_always(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* keeping TCL and completion rings number, this data
|
||||||
|
* is equivalent number of TX interface rings.
|
||||||
|
*/
|
||||||
|
soc->num_tx_comp_rings =
|
||||||
|
wlan_cfg_num_tx_comp_rings(soc->wlan_cfg_ctx);
|
||||||
|
soc->num_tcl_data_rings =
|
||||||
|
wlan_cfg_num_tcl_data_rings(soc->wlan_cfg_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_size_t dp_get_context_size_rh(enum dp_context_type context_type)
|
qdf_size_t dp_get_context_size_rh(enum dp_context_type context_type)
|
||||||
@@ -70,20 +266,204 @@ static QDF_STATUS dp_soc_detach_rh(struct dp_soc *soc)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDF_STATUS dp_soc_init_rh(struct dp_soc *soc)
|
static QDF_STATUS dp_soc_deinit_rh(struct dp_soc *soc)
|
||||||
{
|
{
|
||||||
/*Register RX offload flush handlers*/
|
struct htt_soc *htt_soc = soc->htt_handle;
|
||||||
hif_offld_flush_cb_register(soc->hif_handle, dp_rx_data_flush);
|
struct dp_mon_ops *mon_ops;
|
||||||
|
|
||||||
|
qdf_atomic_set(&soc->cmn_init_done, 0);
|
||||||
|
|
||||||
|
/*Degister RX offload flush handlers*/
|
||||||
|
hif_offld_flush_cb_deregister(soc->hif_handle);
|
||||||
|
|
||||||
|
mon_ops = dp_mon_ops_get(soc);
|
||||||
|
if (mon_ops && mon_ops->mon_soc_deinit)
|
||||||
|
mon_ops->mon_soc_deinit(soc);
|
||||||
|
|
||||||
|
/* free peer tables & AST tables allocated during peer_map_attach */
|
||||||
|
if (soc->peer_map_attach_success) {
|
||||||
|
dp_peer_find_detach(soc);
|
||||||
|
dp_peer_map_detach_rh(soc);
|
||||||
|
soc->peer_map_attach_success = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_flush_work(&soc->htt_stats.work);
|
||||||
|
qdf_disable_work(&soc->htt_stats.work);
|
||||||
|
|
||||||
|
qdf_spinlock_destroy(&soc->htt_stats.lock);
|
||||||
|
|
||||||
|
qdf_spinlock_destroy(&soc->ast_lock);
|
||||||
|
|
||||||
|
dp_peer_mec_spinlock_destroy(soc);
|
||||||
|
|
||||||
|
qdf_nbuf_queue_free(&soc->htt_stats.msg);
|
||||||
|
|
||||||
|
qdf_nbuf_queue_free(&soc->invalid_buf_queue);
|
||||||
|
|
||||||
|
qdf_spinlock_destroy(&soc->rx.defrag.defrag_lock);
|
||||||
|
|
||||||
|
qdf_spinlock_destroy(&soc->vdev_map_lock);
|
||||||
|
|
||||||
|
dp_soc_tx_desc_sw_pools_deinit(soc);
|
||||||
|
|
||||||
|
dp_soc_srng_deinit(soc);
|
||||||
|
|
||||||
|
dp_hw_link_desc_ring_deinit(soc);
|
||||||
|
|
||||||
|
dp_soc_print_inactive_objects(soc);
|
||||||
|
qdf_spinlock_destroy(&soc->inactive_peer_list_lock);
|
||||||
|
qdf_spinlock_destroy(&soc->inactive_vdev_list_lock);
|
||||||
|
|
||||||
|
htt_soc_htc_dealloc(soc->htt_handle);
|
||||||
|
|
||||||
|
htt_soc_detach(htt_soc);
|
||||||
|
|
||||||
|
wlan_minidump_remove(soc, sizeof(*soc), soc->ctrl_psoc,
|
||||||
|
WLAN_MD_DP_SOC, "dp_soc");
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDF_STATUS dp_soc_deinit_rh(struct dp_soc *soc)
|
static void *dp_soc_init_rh(struct dp_soc *soc, HTC_HANDLE htc_handle,
|
||||||
|
struct hif_opaque_softc *hif_handle)
|
||||||
{
|
{
|
||||||
/*Degister RX offload flush handlers*/
|
struct htt_soc *htt_soc = (struct htt_soc *)soc->htt_handle;
|
||||||
hif_offld_flush_cb_deregister(soc->hif_handle);
|
bool is_monitor_mode = false;
|
||||||
|
uint8_t i;
|
||||||
|
struct dp_mon_ops *mon_ops;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
wlan_minidump_log(soc, sizeof(*soc), soc->ctrl_psoc,
|
||||||
|
WLAN_MD_DP_SOC, "dp_soc");
|
||||||
|
|
||||||
|
soc->hif_handle = hif_handle;
|
||||||
|
|
||||||
|
soc->hal_soc = hif_get_hal_handle(soc->hif_handle);
|
||||||
|
if (!soc->hal_soc)
|
||||||
|
goto fail1;
|
||||||
|
|
||||||
|
htt_soc = htt_soc_attach(soc, htc_handle);
|
||||||
|
if (!htt_soc)
|
||||||
|
goto fail1;
|
||||||
|
|
||||||
|
soc->htt_handle = htt_soc;
|
||||||
|
|
||||||
|
if (htt_soc_htc_prealloc(htt_soc) != QDF_STATUS_SUCCESS)
|
||||||
|
goto fail2;
|
||||||
|
|
||||||
|
htt_set_htc_handle(htt_soc, htc_handle);
|
||||||
|
|
||||||
|
dp_soc_cfg_init_rh(soc);
|
||||||
|
|
||||||
|
dp_monitor_soc_cfg_init(soc);
|
||||||
|
|
||||||
|
/* Note: Any SRNG ring initialization should happen only after
|
||||||
|
* Interrupt mode is set and followed by filling up the
|
||||||
|
* interrupt mask. IT SHOULD ALWAYS BE IN THIS ORDER.
|
||||||
|
*/
|
||||||
|
dp_soc_set_interrupt_mode(soc);
|
||||||
|
if (soc->cdp_soc.ol_ops->get_con_mode &&
|
||||||
|
soc->cdp_soc.ol_ops->get_con_mode() ==
|
||||||
|
QDF_GLOBAL_MONITOR_MODE)
|
||||||
|
is_monitor_mode = true;
|
||||||
|
|
||||||
|
if (dp_soc_srng_init(soc)) {
|
||||||
|
dp_init_err("%pK: dp_soc_srng_init failed", soc);
|
||||||
|
goto fail3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dp_htt_soc_initialize_rh(soc->htt_handle, soc->ctrl_psoc,
|
||||||
|
htt_get_htc_handle(htt_soc),
|
||||||
|
soc->hal_soc, soc->osdev) == NULL)
|
||||||
|
goto fail4;
|
||||||
|
|
||||||
|
/* Initialize descriptors in TCL Rings */
|
||||||
|
for (i = 0; i < soc->num_tcl_data_rings; i++) {
|
||||||
|
hal_tx_init_data_ring(soc->hal_soc,
|
||||||
|
soc->tcl_data_ring[i].hal_srng);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dp_soc_tx_desc_sw_pools_init(soc)) {
|
||||||
|
dp_init_err("%pK: dp_tx_soc_attach failed", soc);
|
||||||
|
goto fail5;
|
||||||
|
}
|
||||||
|
|
||||||
|
wlan_cfg_set_rx_hash(soc->wlan_cfg_ctx,
|
||||||
|
cfg_get(soc->ctrl_psoc, CFG_DP_RX_HASH));
|
||||||
|
soc->cce_disable = false;
|
||||||
|
soc->max_ast_ageout_count = MAX_AST_AGEOUT_COUNT;
|
||||||
|
|
||||||
|
soc->sta_mode_search_policy = DP_TX_ADDR_SEARCH_ADDR_POLICY;
|
||||||
|
qdf_mem_zero(&soc->vdev_id_map, sizeof(soc->vdev_id_map));
|
||||||
|
qdf_spinlock_create(&soc->vdev_map_lock);
|
||||||
|
qdf_atomic_init(&soc->num_tx_outstanding);
|
||||||
|
qdf_atomic_init(&soc->num_tx_exception);
|
||||||
|
soc->num_tx_allowed =
|
||||||
|
wlan_cfg_get_dp_soc_tx_device_limit(soc->wlan_cfg_ctx);
|
||||||
|
|
||||||
|
if (soc->cdp_soc.ol_ops->get_dp_cfg_param) {
|
||||||
|
int ret = soc->cdp_soc.ol_ops->get_dp_cfg_param(soc->ctrl_psoc,
|
||||||
|
CDP_CFG_MAX_PEER_ID);
|
||||||
|
|
||||||
|
if (ret != -EINVAL)
|
||||||
|
wlan_cfg_set_max_peer_id(soc->wlan_cfg_ctx, ret);
|
||||||
|
|
||||||
|
ret = soc->cdp_soc.ol_ops->get_dp_cfg_param(soc->ctrl_psoc,
|
||||||
|
CDP_CFG_CCE_DISABLE);
|
||||||
|
if (ret == 1)
|
||||||
|
soc->cce_disable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* setup the global rx defrag waitlist */
|
||||||
|
TAILQ_INIT(&soc->rx.defrag.waitlist);
|
||||||
|
soc->rx.defrag.timeout_ms =
|
||||||
|
wlan_cfg_get_rx_defrag_min_timeout(soc->wlan_cfg_ctx);
|
||||||
|
soc->rx.defrag.next_flush_ms = 0;
|
||||||
|
soc->rx.flags.defrag_timeout_check =
|
||||||
|
wlan_cfg_get_defrag_timeout_check(soc->wlan_cfg_ctx);
|
||||||
|
qdf_spinlock_create(&soc->rx.defrag.defrag_lock);
|
||||||
|
|
||||||
|
mon_ops = dp_mon_ops_get(soc);
|
||||||
|
if (mon_ops && mon_ops->mon_soc_init)
|
||||||
|
mon_ops->mon_soc_init(soc);
|
||||||
|
|
||||||
|
qdf_atomic_set(&soc->cmn_init_done, 1);
|
||||||
|
|
||||||
|
qdf_nbuf_queue_init(&soc->htt_stats.msg);
|
||||||
|
|
||||||
|
qdf_spinlock_create(&soc->ast_lock);
|
||||||
|
dp_peer_mec_spinlock_create(soc);
|
||||||
|
|
||||||
|
qdf_nbuf_queue_init(&soc->invalid_buf_queue);
|
||||||
|
|
||||||
|
TAILQ_INIT(&soc->inactive_peer_list);
|
||||||
|
qdf_spinlock_create(&soc->inactive_peer_list_lock);
|
||||||
|
TAILQ_INIT(&soc->inactive_vdev_list);
|
||||||
|
qdf_spinlock_create(&soc->inactive_vdev_list_lock);
|
||||||
|
qdf_spinlock_create(&soc->htt_stats.lock);
|
||||||
|
/* initialize work queue for stats processing */
|
||||||
|
qdf_create_work(0, &soc->htt_stats.work, htt_t2h_stats_handler, soc);
|
||||||
|
|
||||||
|
/*Register RX offload flush handlers*/
|
||||||
|
hif_offld_flush_cb_register(soc->hif_handle, dp_rx_data_flush);
|
||||||
|
|
||||||
|
dp_info("Mem stats: DMA = %u HEAP = %u SKB = %u",
|
||||||
|
qdf_dma_mem_stats_read(),
|
||||||
|
qdf_heap_mem_stats_read(),
|
||||||
|
qdf_skb_total_mem_stats_read());
|
||||||
|
|
||||||
|
soc->vdev_stats_id_map = 0;
|
||||||
|
|
||||||
|
return soc;
|
||||||
|
fail5:
|
||||||
|
htt_soc_htc_dealloc(soc->htt_handle);
|
||||||
|
fail4:
|
||||||
|
dp_soc_srng_deinit(soc);
|
||||||
|
fail3:
|
||||||
|
htt_htc_pkt_pool_free(htt_soc);
|
||||||
|
fail2:
|
||||||
|
htt_soc_detach(htt_soc);
|
||||||
|
fail1:
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -146,57 +526,6 @@ static QDF_STATUS dp_vdev_detach_rh(struct dp_soc *soc, struct dp_vdev *vdev)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AST_OFFLOAD_ENABLE
|
|
||||||
static void dp_peer_map_detach_rh(struct dp_soc *soc)
|
|
||||||
{
|
|
||||||
dp_soc_wds_detach(soc);
|
|
||||||
dp_peer_ast_table_detach(soc);
|
|
||||||
dp_peer_ast_hash_detach(soc);
|
|
||||||
dp_peer_mec_hash_detach(soc);
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS dp_peer_map_attach_rh(struct dp_soc *soc)
|
|
||||||
{
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
soc->max_peer_id = soc->max_peers;
|
|
||||||
|
|
||||||
status = dp_peer_ast_table_attach(soc);
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
|
||||||
return status;
|
|
||||||
|
|
||||||
status = dp_peer_ast_hash_attach(soc);
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
|
||||||
goto ast_table_detach;
|
|
||||||
|
|
||||||
status = dp_peer_mec_hash_attach(soc);
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
|
||||||
goto hash_detach;
|
|
||||||
|
|
||||||
dp_soc_wds_attach(soc);
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
|
|
||||||
hash_detach:
|
|
||||||
dp_peer_ast_hash_detach(soc);
|
|
||||||
ast_table_detach:
|
|
||||||
dp_peer_ast_table_detach(soc);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static void dp_peer_map_detach_rh(struct dp_soc *soc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS dp_peer_map_attach_rh(struct dp_soc *soc)
|
|
||||||
{
|
|
||||||
soc->max_peer_id = soc->max_peers;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
qdf_size_t dp_get_soc_context_size_rh(void)
|
qdf_size_t dp_get_soc_context_size_rh(void)
|
||||||
{
|
{
|
||||||
return sizeof(struct dp_soc_rh);
|
return sizeof(struct dp_soc_rh);
|
||||||
@@ -495,4 +824,6 @@ void dp_initialize_arch_ops_rh(struct dp_arch_ops *arch_ops)
|
|||||||
arch_ops->dp_find_peer_by_destmac = dp_find_peer_by_destmac_rh;
|
arch_ops->dp_find_peer_by_destmac = dp_find_peer_by_destmac_rh;
|
||||||
arch_ops->peer_get_reo_hash = dp_peer_get_reo_hash_rh;
|
arch_ops->peer_get_reo_hash = dp_peer_get_reo_hash_rh;
|
||||||
arch_ops->reo_remap_config = dp_reo_remap_config_rh;
|
arch_ops->reo_remap_config = dp_reo_remap_config_rh;
|
||||||
|
arch_ops->txrx_peer_setup = dp_peer_setup_rh;
|
||||||
|
arch_ops->txrx_srng_init = dp_srng_init_rh;
|
||||||
}
|
}
|
||||||
|
@@ -224,7 +224,7 @@ dp_rx_intrabss_fwd_rh(struct dp_soc *soc,
|
|||||||
*/
|
*/
|
||||||
if (qdf_nbuf_is_da_mcbc(nbuf) && !ta_txrx_peer->bss_peer)
|
if (qdf_nbuf_is_da_mcbc(nbuf) && !ta_txrx_peer->bss_peer)
|
||||||
return dp_rx_intrabss_mcbc_fwd(soc, ta_txrx_peer, rx_tlv_hdr,
|
return dp_rx_intrabss_mcbc_fwd(soc, ta_txrx_peer, rx_tlv_hdr,
|
||||||
nbuf, tid_stats);
|
nbuf, tid_stats, 0);
|
||||||
|
|
||||||
if (dp_rx_intrabss_eapol_drop_check(soc, ta_txrx_peer, rx_tlv_hdr,
|
if (dp_rx_intrabss_eapol_drop_check(soc, ta_txrx_peer, rx_tlv_hdr,
|
||||||
nbuf))
|
nbuf))
|
||||||
@@ -233,7 +233,8 @@ dp_rx_intrabss_fwd_rh(struct dp_soc *soc,
|
|||||||
if (dp_rx_intrabss_ucast_check_rh(soc, nbuf, ta_txrx_peer,
|
if (dp_rx_intrabss_ucast_check_rh(soc, nbuf, ta_txrx_peer,
|
||||||
&msdu_metadata, &tx_vdev_id))
|
&msdu_metadata, &tx_vdev_id))
|
||||||
return dp_rx_intrabss_ucast_fwd(soc, ta_txrx_peer, tx_vdev_id,
|
return dp_rx_intrabss_ucast_fwd(soc, ta_txrx_peer, tx_vdev_id,
|
||||||
rx_tlv_hdr, nbuf, tid_stats);
|
rx_tlv_hdr, nbuf, tid_stats,
|
||||||
|
0);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -648,7 +649,8 @@ dp_rx_data_indication_handler(struct dp_soc *soc, qdf_nbuf_t data_ind,
|
|||||||
DP_STATS_INC(vdev->pdev, rx_raw_pkts, 1);
|
DP_STATS_INC(vdev->pdev, rx_raw_pkts, 1);
|
||||||
DP_PEER_PER_PKT_STATS_INC_PKT(txrx_peer,
|
DP_PEER_PER_PKT_STATS_INC_PKT(txrx_peer,
|
||||||
rx.raw, 1,
|
rx.raw, 1,
|
||||||
msdu_len);
|
msdu_len,
|
||||||
|
0);
|
||||||
} else {
|
} else {
|
||||||
dp_rx_nbuf_free(nbuf);
|
dp_rx_nbuf_free(nbuf);
|
||||||
DP_STATS_INC(soc, rx.err.scatter_msdu, 1);
|
DP_STATS_INC(soc, rx.err.scatter_msdu, 1);
|
||||||
@@ -672,7 +674,7 @@ dp_rx_data_indication_handler(struct dp_soc *soc, qdf_nbuf_t data_ind,
|
|||||||
if (!dp_wds_rx_policy_check(rx_tlv_hdr, vdev, txrx_peer)) {
|
if (!dp_wds_rx_policy_check(rx_tlv_hdr, vdev, txrx_peer)) {
|
||||||
dp_rx_err("%pK: Policy Check Drop pkt", soc);
|
dp_rx_err("%pK: Policy Check Drop pkt", soc);
|
||||||
DP_PEER_PER_PKT_STATS_INC(txrx_peer,
|
DP_PEER_PER_PKT_STATS_INC(txrx_peer,
|
||||||
rx.policy_check_drop, 1);
|
rx.policy_check_drop, 1, 0);
|
||||||
tid_stats->fail_cnt[POLICY_CHECK_DROP]++;
|
tid_stats->fail_cnt[POLICY_CHECK_DROP]++;
|
||||||
/* Drop & free packet */
|
/* Drop & free packet */
|
||||||
dp_rx_nbuf_free(nbuf);
|
dp_rx_nbuf_free(nbuf);
|
||||||
@@ -693,7 +695,7 @@ dp_rx_data_indication_handler(struct dp_soc *soc, qdf_nbuf_t data_ind,
|
|||||||
if (!is_eapol) {
|
if (!is_eapol) {
|
||||||
DP_PEER_PER_PKT_STATS_INC(txrx_peer,
|
DP_PEER_PER_PKT_STATS_INC(txrx_peer,
|
||||||
rx.peer_unauth_rx_pkt_drop,
|
rx.peer_unauth_rx_pkt_drop,
|
||||||
1);
|
1, 0);
|
||||||
dp_rx_nbuf_free(nbuf);
|
dp_rx_nbuf_free(nbuf);
|
||||||
nbuf = next;
|
nbuf = next;
|
||||||
continue;
|
continue;
|
||||||
@@ -704,7 +706,7 @@ dp_rx_data_indication_handler(struct dp_soc *soc, qdf_nbuf_t data_ind,
|
|||||||
dp_rx_cksum_offload(vdev->pdev, nbuf, rx_tlv_hdr);
|
dp_rx_cksum_offload(vdev->pdev, nbuf, rx_tlv_hdr);
|
||||||
|
|
||||||
dp_rx_msdu_stats_update(soc, nbuf, rx_tlv_hdr, txrx_peer,
|
dp_rx_msdu_stats_update(soc, nbuf, rx_tlv_hdr, txrx_peer,
|
||||||
rx_ctx_id, tid_stats);
|
rx_ctx_id, tid_stats, 0);
|
||||||
|
|
||||||
if (qdf_likely(vdev->rx_decap_type ==
|
if (qdf_likely(vdev->rx_decap_type ==
|
||||||
htt_cmn_pkt_type_ethernet)) {
|
htt_cmn_pkt_type_ethernet)) {
|
||||||
@@ -732,7 +734,8 @@ dp_rx_data_indication_handler(struct dp_soc *soc, qdf_nbuf_t data_ind,
|
|||||||
/* this is a looped back MCBC pkt,drop it */
|
/* this is a looped back MCBC pkt,drop it */
|
||||||
DP_PEER_PER_PKT_STATS_INC_PKT(txrx_peer,
|
DP_PEER_PER_PKT_STATS_INC_PKT(txrx_peer,
|
||||||
rx.mec_drop, 1,
|
rx.mec_drop, 1,
|
||||||
QDF_NBUF_CB_RX_PKT_LEN(nbuf));
|
QDF_NBUF_CB_RX_PKT_LEN(nbuf),
|
||||||
|
0);
|
||||||
dp_rx_nbuf_free(nbuf);
|
dp_rx_nbuf_free(nbuf);
|
||||||
nbuf = next;
|
nbuf = next;
|
||||||
continue;
|
continue;
|
||||||
@@ -779,7 +782,8 @@ dp_rx_data_indication_handler(struct dp_soc *soc, qdf_nbuf_t data_ind,
|
|||||||
if (qdf_unlikely(txrx_peer->in_twt))
|
if (qdf_unlikely(txrx_peer->in_twt))
|
||||||
DP_PEER_PER_PKT_STATS_INC_PKT(txrx_peer,
|
DP_PEER_PER_PKT_STATS_INC_PKT(txrx_peer,
|
||||||
rx.to_stack_twt, 1,
|
rx.to_stack_twt, 1,
|
||||||
QDF_NBUF_CB_RX_PKT_LEN(nbuf));
|
QDF_NBUF_CB_RX_PKT_LEN(nbuf),
|
||||||
|
0);
|
||||||
|
|
||||||
tid_stats->delivered_to_stack++;
|
tid_stats->delivered_to_stack++;
|
||||||
nbuf = next;
|
nbuf = next;
|
||||||
|
@@ -126,7 +126,8 @@ dp_rx_frag_indication_handler(struct dp_soc *soc, qdf_nbuf_t data_ind,
|
|||||||
static inline bool
|
static inline bool
|
||||||
dp_rx_intrabss_handle_nawds_rh(struct dp_soc *soc, struct dp_txrx_peer *ta_peer,
|
dp_rx_intrabss_handle_nawds_rh(struct dp_soc *soc, struct dp_txrx_peer *ta_peer,
|
||||||
qdf_nbuf_t nbuf_copy,
|
qdf_nbuf_t nbuf_copy,
|
||||||
struct cdp_tid_rx_stats *tid_stats)
|
struct cdp_tid_rx_stats *tid_stats,
|
||||||
|
uint8_t link_id)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -104,7 +104,7 @@
|
|||||||
#define WLAN_CFG_PER_PDEV_RX_RING 0
|
#define WLAN_CFG_PER_PDEV_RX_RING 0
|
||||||
#define WLAN_CFG_PER_PDEV_LMAC_RING 0
|
#define WLAN_CFG_PER_PDEV_LMAC_RING 0
|
||||||
#define WLAN_LRO_ENABLE 0
|
#define WLAN_LRO_ENABLE 0
|
||||||
#ifdef QCA_WIFI_QCA6750
|
#if defined(QCA_WIFI_QCA6750) || defined(QCA_WIFI_WCN6450)
|
||||||
#define WLAN_CFG_MAC_PER_TARGET 1
|
#define WLAN_CFG_MAC_PER_TARGET 1
|
||||||
#else
|
#else
|
||||||
#define WLAN_CFG_MAC_PER_TARGET 2
|
#define WLAN_CFG_MAC_PER_TARGET 2
|
||||||
|
@@ -3018,6 +3018,7 @@ static struct dp_int_mask_assignment dp_mask_assignment[NUM_INTERRUPT_COMBINATIO
|
|||||||
/* g_wlan_srng_cfg[] - Per ring_type specific configuration */
|
/* g_wlan_srng_cfg[] - Per ring_type specific configuration */
|
||||||
struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES];
|
struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES];
|
||||||
|
|
||||||
|
#ifndef WLAN_SOFTUMAC_SUPPORT
|
||||||
/* REO_DST ring configuration */
|
/* REO_DST ring configuration */
|
||||||
struct wlan_srng_cfg wlan_srng_reo_cfg = {
|
struct wlan_srng_cfg wlan_srng_reo_cfg = {
|
||||||
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING,
|
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING,
|
||||||
@@ -3031,6 +3032,7 @@ struct wlan_srng_cfg wlan_srng_wbm_release_cfg = {
|
|||||||
.batch_count_threshold = 0,
|
.batch_count_threshold = 0,
|
||||||
.low_threshold = 0,
|
.low_threshold = 0,
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/* RXDMA_BUF ring configuration */
|
/* RXDMA_BUF ring configuration */
|
||||||
struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = {
|
struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = {
|
||||||
@@ -3091,6 +3093,24 @@ struct wlan_srng_cfg wlan_src_srng_default_cfg = {
|
|||||||
.low_threshold = 0,
|
.low_threshold = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WLAN_SOFTUMAC_SUPPORT
|
||||||
|
void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
|
||||||
|
{
|
||||||
|
g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg;
|
||||||
|
g_wlan_srng_cfg[RXDMA_MONITOR_BUF] =
|
||||||
|
wlan_srng_rxdma_monitor_buf_cfg;
|
||||||
|
g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] =
|
||||||
|
wlan_srng_rxdma_monitor_status_cfg;
|
||||||
|
g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg;
|
||||||
|
g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg;
|
||||||
|
g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg;
|
||||||
|
#ifdef WLAN_FEATURE_CIF_CFR
|
||||||
|
g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg;
|
||||||
|
#endif
|
||||||
|
g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
|
||||||
|
*wlan_cfg = g_wlan_srng_cfg;
|
||||||
|
}
|
||||||
|
#else
|
||||||
void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
|
void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
|
||||||
{
|
{
|
||||||
g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg;
|
g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg;
|
||||||
@@ -3121,6 +3141,8 @@ void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
|
|||||||
g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
|
g_wlan_srng_cfg[TX_MONITOR_BUF] = wlan_srng_tx_monitor_buf_cfg;
|
||||||
*wlan_cfg = g_wlan_srng_cfg;
|
*wlan_cfg = g_wlan_srng_cfg;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
|
static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
|
||||||
0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
|
0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
|
||||||
@@ -3131,6 +3153,37 @@ static const uint8_t rx_fst_toeplitz_key[WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
||||||
|
#ifdef WLAN_SOFTUMAC_SUPPORT
|
||||||
|
void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||||
|
int num_dp_msi,
|
||||||
|
int interrupt_mode,
|
||||||
|
bool is_monitor_mode)
|
||||||
|
{ int i = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < WLAN_CFG_INT_NUM_CONTEXTS; i++) {
|
||||||
|
wlan_cfg_ctx->int_rx_mon_ring_mask[i] =
|
||||||
|
rx_mon_ring_mask_msi[i];
|
||||||
|
wlan_cfg_ctx->int_tx_mon_ring_mask[i] = 0;
|
||||||
|
if (is_monitor_mode) {
|
||||||
|
wlan_cfg_ctx->int_rx_ring_mask[i] = 0;
|
||||||
|
if (interrupt_mode == DP_INTR_POLL)
|
||||||
|
wlan_cfg_ctx->int_rxdma2host_ring_mask[i] = 0;
|
||||||
|
else
|
||||||
|
wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
|
||||||
|
rxdma2host_ring_mask_msi[i];
|
||||||
|
} else {
|
||||||
|
wlan_cfg_ctx->int_rx_ring_mask[i] =
|
||||||
|
rx_ring_mask_msi[i];
|
||||||
|
wlan_cfg_ctx->int_rxdma2host_ring_mask[i] =
|
||||||
|
rxdma2host_ring_mask_msi[i];
|
||||||
|
}
|
||||||
|
wlan_cfg_ctx->int_host2rxdma_mon_ring_mask[i] =
|
||||||
|
host2rxdma_mon_ring_mask_msi[i];
|
||||||
|
wlan_cfg_ctx->int_rxdma2host_mon_ring_mask[i] =
|
||||||
|
rxdma2host_mon_ring_mask_msi[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
||||||
int num_dp_msi,
|
int num_dp_msi,
|
||||||
int interrupt_mode,
|
int interrupt_mode,
|
||||||
@@ -3180,6 +3233,7 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
|
|||||||
tx_ring_near_full_irq_mask_msi[i];
|
tx_ring_near_full_irq_mask_msi[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -3594,6 +3648,187 @@ wlan_soc_tx_packet_inspect_attach(struct cdp_ctrl_objmgr_psoc *psoc,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_SOFTUMAC_SUPPORT
|
||||||
|
struct wlan_cfg_dp_soc_ctxt *
|
||||||
|
wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
|
||||||
|
qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
|
||||||
|
uint32_t gro_bit_set;
|
||||||
|
|
||||||
|
if (!wlan_cfg_ctx)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
|
||||||
|
wlan_cfg_ctx->num_int_ctxts = WLAN_CFG_INT_NUM_CONTEXTS;
|
||||||
|
wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
|
||||||
|
wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
|
||||||
|
wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
|
||||||
|
wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
|
||||||
|
wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_EXT_DESC_POOLS);
|
||||||
|
wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
|
||||||
|
wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
|
||||||
|
wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
|
||||||
|
wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
|
||||||
|
wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
|
||||||
|
wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
|
||||||
|
|
||||||
|
wlan_cfg_ctx->int_batch_threshold_tx =
|
||||||
|
cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
|
||||||
|
wlan_cfg_ctx->int_timer_threshold_tx =
|
||||||
|
cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_TX);
|
||||||
|
wlan_cfg_ctx->int_batch_threshold_rx =
|
||||||
|
cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_RX);
|
||||||
|
wlan_cfg_ctx->int_timer_threshold_rx =
|
||||||
|
cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_RX);
|
||||||
|
wlan_cfg_ctx->int_batch_threshold_other =
|
||||||
|
cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
|
||||||
|
wlan_cfg_ctx->int_timer_threshold_other =
|
||||||
|
cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
|
||||||
|
wlan_cfg_ctx->pktlog_buffer_size =
|
||||||
|
cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is default mapping and can be overridden by
|
||||||
|
* HW config received from FW.
|
||||||
|
*/
|
||||||
|
wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 0, 0);
|
||||||
|
if (MAX_PDEV_CNT > 1)
|
||||||
|
wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 1, 2);
|
||||||
|
if (MAX_PDEV_CNT > 2)
|
||||||
|
wlan_cfg_set_hw_mac_idx(wlan_cfg_ctx, 2, 1);
|
||||||
|
|
||||||
|
wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
|
||||||
|
|
||||||
|
wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
|
||||||
|
wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
|
||||||
|
wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
|
||||||
|
wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
|
||||||
|
gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
|
||||||
|
if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
|
||||||
|
wlan_cfg_ctx->gro_enabled = true;
|
||||||
|
if (gro_bit_set & DP_TC_BASED_DYNAMIC_GRO)
|
||||||
|
wlan_cfg_ctx->tc_based_dynamic_gro = true;
|
||||||
|
}
|
||||||
|
wlan_cfg_ctx->tc_ingress_prio = cfg_get(psoc, CFG_DP_TC_INGRESS_PRIO);
|
||||||
|
wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
|
||||||
|
wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
|
||||||
|
wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
|
||||||
|
wlan_cfg_ctx->peer_flow_ctrl_enabled =
|
||||||
|
cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
|
||||||
|
wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
|
||||||
|
wlan_cfg_ctx->p2p_tcp_udp_checksumoffload =
|
||||||
|
cfg_get(psoc, CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD);
|
||||||
|
wlan_cfg_ctx->nan_tcp_udp_checksumoffload =
|
||||||
|
cfg_get(psoc, CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD);
|
||||||
|
wlan_cfg_ctx->tcp_udp_checksumoffload =
|
||||||
|
cfg_get(psoc, CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
|
||||||
|
wlan_cfg_ctx->legacy_mode_checksumoffload_disable =
|
||||||
|
cfg_get(psoc, CFG_DP_LEGACY_MODE_CSUM_DISABLE);
|
||||||
|
wlan_cfg_ctx->per_pkt_trace = cfg_get(psoc, CFG_DP_PER_PKT_LOGGING);
|
||||||
|
wlan_cfg_ctx->defrag_timeout_check =
|
||||||
|
cfg_get(psoc, CFG_DP_DEFRAG_TIMEOUT_CHECK);
|
||||||
|
wlan_cfg_ctx->rx_defrag_min_timeout =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_DEFRAG_TIMEOUT);
|
||||||
|
|
||||||
|
wlan_cfg_ctx->rxdma_refill_ring = cfg_get(psoc,
|
||||||
|
CFG_DP_RXDMA_REFILL_RING);
|
||||||
|
wlan_cfg_ctx->tx_desc_limit_0 = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_DESC_LIMIT_0);
|
||||||
|
wlan_cfg_ctx->tx_desc_limit_1 = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_DESC_LIMIT_1);
|
||||||
|
wlan_cfg_ctx->tx_desc_limit_2 = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_DESC_LIMIT_2);
|
||||||
|
wlan_cfg_ctx->tx_device_limit = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_DEVICE_LIMIT);
|
||||||
|
wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_SPL_DEVICE_LIMIT);
|
||||||
|
wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_SW_INTERNODE_QUEUE);
|
||||||
|
wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc,
|
||||||
|
CFG_DP_RXDMA_ERR_DST_RING);
|
||||||
|
wlan_cfg_ctx->enable_data_stall_detection =
|
||||||
|
cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
|
||||||
|
wlan_cfg_ctx->tx_flow_start_queue_offset =
|
||||||
|
cfg_get(psoc, CFG_DP_TX_FLOW_START_QUEUE_OFFSET);
|
||||||
|
wlan_cfg_ctx->tx_flow_stop_queue_threshold =
|
||||||
|
cfg_get(psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH);
|
||||||
|
wlan_cfg_ctx->disable_intra_bss_fwd =
|
||||||
|
cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
|
||||||
|
wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
|
||||||
|
CFG_DP_RX_SW_DESC_WEIGHT);
|
||||||
|
wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
|
||||||
|
CFG_DP_RX_SW_DESC_NUM);
|
||||||
|
wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
|
||||||
|
wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
|
||||||
|
wlan_cfg_ctx->is_rx_flow_tag_enabled =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_FLOW_TAG_ENABLE);
|
||||||
|
wlan_cfg_ctx->is_rx_flow_search_table_per_pdev =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV);
|
||||||
|
wlan_cfg_ctx->rx_flow_search_table_size =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE);
|
||||||
|
wlan_cfg_ctx->is_rx_mon_protocol_flow_tag_enabled =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE);
|
||||||
|
wlan_cfg_ctx->mon_drop_thresh =
|
||||||
|
cfg_get(psoc, CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD);
|
||||||
|
wlan_cfg_ctx->is_rx_fisa_enabled = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE);
|
||||||
|
wlan_cfg_ctx->is_rx_fisa_lru_del_enabled =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_FISA_LRU_DEL_ENABLE);
|
||||||
|
/* TODO: add INI item for RX RINGS MAPPING in RHINE */
|
||||||
|
wlan_cfg_ctx->rx_rings_mapping = 0x7;
|
||||||
|
wlan_cfg_ctx->pext_stats_enabled = cfg_get(psoc, CFG_DP_PEER_EXT_STATS);
|
||||||
|
wlan_cfg_ctx->is_rx_buff_pool_enabled =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
|
||||||
|
wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
|
||||||
|
wlan_cfg_ctx->rx_pending_high_threshold =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
|
||||||
|
wlan_cfg_ctx->rx_pending_low_threshold =
|
||||||
|
cfg_get(psoc, CFG_DP_RX_PENDING_LO_THRESHOLD);
|
||||||
|
wlan_cfg_ctx->is_poll_mode_enabled =
|
||||||
|
cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
|
||||||
|
wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
|
||||||
|
wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
|
||||||
|
wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
|
||||||
|
cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
|
||||||
|
wlan_cfg_ctx->wow_check_rx_pending_enable =
|
||||||
|
cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
|
||||||
|
wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
|
||||||
|
CFG_DP_DELAY_MON_REPLENISH);
|
||||||
|
wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
|
||||||
|
CFG_DP_RXDMA_MONITOR_BUF_RING);
|
||||||
|
wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
|
||||||
|
CFG_DP_TX_MONITOR_BUF_RING);
|
||||||
|
wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
|
||||||
|
wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
|
||||||
|
wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
|
||||||
|
wlan_soc_mlo_cfg_attach(psoc, wlan_cfg_ctx);
|
||||||
|
wlan_soc_vdev_hw_stats_cfg_attach(psoc, wlan_cfg_ctx);
|
||||||
|
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
|
||||||
|
wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
|
||||||
|
PKT_CAPTURE_MODE_DATA_ONLY;
|
||||||
|
#endif
|
||||||
|
wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
|
||||||
|
wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
|
||||||
|
NUM_RXDMA_RINGS_PER_PDEV;
|
||||||
|
wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
|
||||||
|
wlan_cfg_ctx->mpdu_retry_threshold_1 =
|
||||||
|
cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
|
||||||
|
wlan_cfg_ctx->mpdu_retry_threshold_2 =
|
||||||
|
cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
|
||||||
|
|
||||||
|
wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
|
||||||
|
CFG_DP_NAPI_SCALE_FACTOR);
|
||||||
|
wlan_soc_sawf_stats_cfg_attach(psoc, wlan_cfg_ctx);
|
||||||
|
wlan_cfg_ctx->txmon_sw_peer_filtering =
|
||||||
|
cfg_get(psoc, CFG_DP_TXMON_SW_PEER_FILTERING);
|
||||||
|
wlan_soc_tx_packet_inspect_attach(psoc, wlan_cfg_ctx);
|
||||||
|
return wlan_cfg_ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
struct wlan_cfg_dp_soc_ctxt *
|
struct wlan_cfg_dp_soc_ctxt *
|
||||||
wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
@@ -3832,6 +4067,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
|||||||
|
|
||||||
return wlan_cfg_ctx;
|
return wlan_cfg_ctx;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
|
void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
|
||||||
{
|
{
|
||||||
@@ -4628,6 +4864,12 @@ wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
return cfg->reo_rings_mapping;
|
return cfg->reo_rings_mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
wlan_cfg_get_rx_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
{
|
||||||
|
return cfg->rx_rings_mapping;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
|
wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
|
||||||
enum cdp_capabilities dp_caps)
|
enum cdp_capabilities dp_caps)
|
||||||
@@ -4909,6 +5151,13 @@ wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
|
|
||||||
qdf_export_symbol(wlan_cfg_is_delay_mon_replenish);
|
qdf_export_symbol(wlan_cfg_is_delay_mon_replenish);
|
||||||
|
|
||||||
|
#ifdef WLAN_SOFTUMAC_SUPPORT
|
||||||
|
void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
{
|
||||||
|
dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,",
|
||||||
|
cfg->delay_mon_replenish);
|
||||||
|
}
|
||||||
|
#else
|
||||||
void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
|
void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
{
|
{
|
||||||
dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,",
|
dp_info("DP CFG SoC ctx: delay_mon_replenish = %d,",
|
||||||
@@ -4916,6 +5165,7 @@ void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d",
|
dp_info("reo_dst_ring_size = %d, delayed_replenish_entries = %d",
|
||||||
cfg->reo_dst_ring_size, cfg->delayed_replenish_entries);
|
cfg->reo_dst_ring_size, cfg->delayed_replenish_entries);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef IPA_OFFLOAD
|
#ifdef IPA_OFFLOAD
|
||||||
uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
@@ -282,6 +282,7 @@ struct wlan_srng_cfg {
|
|||||||
* @is_tso_desc_attach_defer:
|
* @is_tso_desc_attach_defer:
|
||||||
* @delayed_replenish_entries:
|
* @delayed_replenish_entries:
|
||||||
* @reo_rings_mapping:
|
* @reo_rings_mapping:
|
||||||
|
* @rx_rings_mapping: DP RX rings mapping mask
|
||||||
* @pext_stats_enabled: Flag to enable and disabled peer extended stats
|
* @pext_stats_enabled: Flag to enable and disabled peer extended stats
|
||||||
* @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
|
* @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
|
||||||
* pool support
|
* pool support
|
||||||
@@ -465,6 +466,7 @@ struct wlan_cfg_dp_soc_ctxt {
|
|||||||
bool is_tso_desc_attach_defer;
|
bool is_tso_desc_attach_defer;
|
||||||
uint32_t delayed_replenish_entries;
|
uint32_t delayed_replenish_entries;
|
||||||
uint32_t reo_rings_mapping;
|
uint32_t reo_rings_mapping;
|
||||||
|
uint32_t rx_rings_mapping;
|
||||||
bool pext_stats_enabled;
|
bool pext_stats_enabled;
|
||||||
bool is_rx_buff_pool_enabled;
|
bool is_rx_buff_pool_enabled;
|
||||||
bool is_rx_refill_buff_pool_enabled;
|
bool is_rx_refill_buff_pool_enabled;
|
||||||
@@ -1929,6 +1931,15 @@ bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg);
|
|||||||
*/
|
*/
|
||||||
uint32_t wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
|
uint32_t wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_cfg_get_rx_rings_mapping() - Get RX ring bitmap
|
||||||
|
*
|
||||||
|
* @cfg: soc configuration context
|
||||||
|
*
|
||||||
|
* Return: rx ring bitmap.
|
||||||
|
*/
|
||||||
|
uint32_t wlan_cfg_get_rx_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cfg_set_peer_ext_stats() - set peer extended stats
|
* wlan_cfg_set_peer_ext_stats() - set peer extended stats
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user