From 667547b486acbf94ab245e86144164d6d80f55d4 Mon Sep 17 00:00:00 2001 From: Karthik Kantamneni Date: Sun, 15 May 2022 11:56:34 +0530 Subject: [PATCH] Revert "qcacld-3.0: HDD changes to incorporate new DP component" This reverts commit Ic8d60f182b4af5c2706e8de45f677195f6aabfe4. Change-Id: I7d8d8c792bc94868ddde04e2c8dec543e07da81a CRs-Fixed: 3196571 --- components/cfg/cfg_all.h | 2 - core/hdd/src/wlan_hdd_hostapd.c | 2 - core/hdd/src/wlan_hdd_main.c | 135 ++++++++++++++++++++------------ 3 files changed, 83 insertions(+), 56 deletions(-) diff --git a/components/cfg/cfg_all.h b/components/cfg/cfg_all.h index 7f997e1530..6cf85d87d9 100644 --- a/components/cfg/cfg_all.h +++ b/components/cfg/cfg_all.h @@ -45,7 +45,6 @@ #include "cfg_ftm_time_sync.h" #include "wlan_pmo_cfg.h" -#include "wlan_dp_cfg.h" #include "hdd_config.h" #include "hdd_dp_cfg.h" #include "cfg_legacy_dp.h" @@ -60,7 +59,6 @@ CFG_POLICY_MGR_ALL \ CFG_HDD_ALL \ CFG_HDD_DP_ALL \ - CFG_DP_ALL \ CFG_LEGACY_DP_ALL \ CFG_MLME_ALL \ CFG_NAN_ALL \ diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index af94c9c1b6..525d46a582 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -109,7 +109,6 @@ #include "wlan_hdd_son.h" #include "wlan_hdd_mcc_quota.h" #include "wlan_hdd_wds.h" -#include #define ACS_SCAN_EXPIRY_TIMEOUT_S 4 @@ -784,7 +783,6 @@ static int __hdd_hostapd_set_mac_address(struct net_device *dev, void *addr) } hdd_update_dynamic_mac(hdd_ctx, &adapter->mac_addr, &mac_addr); - ucfg_dp_update_inf_mac(hdd_ctx->psoc, &adapter->mac_addr, &mac_addr); memcpy(&adapter->mac_addr, psta_mac_addr->sa_data, ETH_ALEN); memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); hdd_exit(); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index aa85824ac3..9591310dc9 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -222,9 +222,6 @@ #include "osif_twt_util.h" #include "wlan_twt_ucfg_ext_api.h" #include "wlan_hdd_mcc_quota.h" -#include "wlan_dp_public_struct.h" -#include "os_if_dp.h" -#include #ifdef MULTI_CLIENT_LL_SUPPORT #define WLAM_WLM_HOST_DRIVER_PORT_ID 0xFFFFFF @@ -5550,7 +5547,6 @@ static int __hdd_set_mac_address(struct net_device *dev, void *addr) else hdd_update_dynamic_mac(hdd_ctx, &adapter->mac_addr, &mac_addr); - ucfg_dp_update_inf_mac(hdd_ctx->psoc, &adapter->mac_addr, &mac_addr); memcpy(&adapter->mac_addr, psta_mac_addr->sa_data, ETH_ALEN); memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); @@ -7721,11 +7717,6 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, ndev = adapter->dev; - status = ucfg_dp_create_intf(hdd_ctx->psoc, &adapter->mac_addr, - (qdf_netdev_t)adapter->dev); - if (QDF_IS_STATUS_ERROR(status)) - goto err_free_netdev; - if (QDF_P2P_CLIENT_MODE == session_type) adapter->wdev.iftype = NL80211_IFTYPE_P2P_CLIENT; else if (QDF_P2P_DEVICE_MODE == session_type) @@ -7761,7 +7752,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, status = hdd_register_interface(adapter, rtnl_held, params); if (QDF_STATUS_SUCCESS != status) - goto err_destroy_dp_intf; + goto err_free_netdev; /* Stop the Interface TX queue. */ hdd_debug("Disabling queues"); wlan_hdd_netif_queue_control(adapter, @@ -7788,11 +7779,6 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, ndev = adapter->dev; - status = ucfg_dp_create_intf(hdd_ctx->psoc, &adapter->mac_addr, - (qdf_netdev_t)adapter->dev); - if (QDF_IS_STATUS_ERROR(status)) - goto err_free_netdev; - adapter->wdev.iftype = (session_type == QDF_SAP_MODE) ? NL80211_IFTYPE_AP : @@ -7801,7 +7787,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, status = hdd_register_interface(adapter, rtnl_held, params); if (QDF_STATUS_SUCCESS != status) - goto err_destroy_dp_intf; + goto err_free_netdev; hdd_debug("Disabling queues"); wlan_hdd_netif_queue_control(adapter, @@ -7838,16 +7824,11 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, ndev = adapter->dev; - status = ucfg_dp_create_intf(hdd_ctx->psoc, &adapter->mac_addr, - (qdf_netdev_t)adapter->dev); - if (QDF_IS_STATUS_ERROR(status)) - goto err_free_netdev; - adapter->wdev.iftype = NL80211_IFTYPE_STATION; adapter->device_mode = session_type; status = hdd_register_interface(adapter, rtnl_held, params); if (QDF_STATUS_SUCCESS != status) - goto err_destroy_dp_intf; + goto err_free_netdev; /* Stop the Interface TX queue. */ hdd_debug("Disabling queues"); @@ -7925,9 +7906,6 @@ err_cleanup_adapter: adapter = NULL; } -err_destroy_dp_intf: - ucfg_dp_destroy_intf(hdd_ctx->psoc, &adapter->mac_addr); - err_free_netdev: if (ndev) free_netdev(ndev); @@ -7939,9 +7917,6 @@ static void __hdd_close_adapter(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter, bool rtnl_held) { - struct qdf_mac_addr adapter_mac; - - qdf_copy_macaddr(&adapter_mac, &adapter->mac_addr); if (adapter->device_mode == QDF_STA_MODE) hdd_cleanup_conn_info(adapter); qdf_list_destroy(&adapter->blocked_scan_request_q); @@ -7951,7 +7926,6 @@ static void __hdd_close_adapter(struct hdd_context *hdd_ctx, qdf_event_destroy(&adapter->peer_cleanup_done); hdd_adapter_feature_update_work_deinit(adapter); hdd_cleanup_adapter(hdd_ctx, adapter, rtnl_held); - ucfg_dp_destroy_intf(hdd_ctx->psoc, &adapter_mac); } void hdd_close_adapter(struct hdd_context *hdd_ctx, @@ -18029,15 +18003,8 @@ static QDF_STATUS hdd_component_init(void) if (QDF_IS_STATUS_ERROR(status)) goto pkt_capture_deinit; - status = ucfg_dp_init(); - if (QDF_IS_STATUS_ERROR(status)) - goto ftm_time_sync_deinit; - return QDF_STATUS_SUCCESS; -ftm_time_sync_deinit: - ucfg_ftm_time_sync_deinit(); - pkt_capture_deinit: ucfg_pkt_capture_deinit(); dlm_deinit: @@ -18084,7 +18051,6 @@ mlme_global_deinit: static void hdd_component_deinit(void) { /* deinitialize non-converged components */ - ucfg_dp_deinit(); ucfg_ftm_time_sync_deinit(); ucfg_pkt_capture_deinit(); ucfg_dlm_deinit(); @@ -18147,14 +18113,8 @@ QDF_STATUS hdd_component_psoc_open(struct wlan_objmgr_psoc *psoc) if (QDF_IS_STATUS_ERROR(status)) goto err_twt; - status = ucfg_dp_psoc_open(psoc); - if (QDF_IS_STATUS_ERROR(status)) - goto err_dp; - return status; -err_dp: - ucfg_twt_psoc_close(psoc); err_twt: ucfg_nan_psoc_close(psoc); err_nan: @@ -18177,7 +18137,6 @@ err_dlm: void hdd_component_psoc_close(struct wlan_objmgr_psoc *psoc) { - ucfg_dp_psoc_close(psoc); ucfg_twt_psoc_close(psoc); ucfg_nan_psoc_close(psoc); ucfg_tdls_psoc_close(psoc); @@ -19333,7 +19292,8 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx) cfg.enable_self_recovery = self_recovery; hdd_populate_runtime_cfg(hdd_ctx, &cfg); cfg.rx_softirq_max_yield_duration_ns = - ucfg_dp_get_rx_softirq_yield_duration(hdd_ctx->psoc); + cfg_get(hdd_ctx->psoc, + CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS); hif_init_ini_config(scn, &cfg); @@ -19341,6 +19301,53 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx) hif_vote_link_up(scn); } +#ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT +/** + * hdd_update_dp_config_rx_softirq_limits() - Update DP rx softirq limit config + * datapath + * @hdd_ctx: HDD Context + * @params: pointer to cdp_config_params to be updated + * + * Void + */ +static +void hdd_update_dp_config_rx_softirq_limits(struct hdd_context *hdd_ctx, + struct cdp_config_params *params) +{ + params->tx_comp_loop_pkt_limit = cfg_get(hdd_ctx->psoc, + CFG_DP_TX_COMP_LOOP_PKT_LIMIT); + params->rx_reap_loop_pkt_limit = cfg_get(hdd_ctx->psoc, + CFG_DP_RX_REAP_LOOP_PKT_LIMIT); + params->rx_hp_oos_update_limit = cfg_get(hdd_ctx->psoc, + CFG_DP_RX_HP_OOS_UPDATE_LIMIT); +} +#else +static +void hdd_update_dp_config_rx_softirq_limits(struct hdd_context *hdd_ctx, + struct cdp_config_params *params) +{ +} +#endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */ + +#if defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(QCA_LL_PDEV_TX_FLOW_CONTROL) +static void +hdd_update_dp_config_queue_threshold(struct hdd_context *hdd_ctx, + struct cdp_config_params *params) +{ + params->tx_flow_stop_queue_threshold = + cfg_get(hdd_ctx->psoc, CFG_DP_TX_FLOW_STOP_QUEUE_TH); + params->tx_flow_start_queue_offset = + cfg_get(hdd_ctx->psoc, + CFG_DP_TX_FLOW_START_QUEUE_OFFSET); +} +#else +static inline void +hdd_update_dp_config_queue_threshold(struct hdd_context *hdd_ctx, + struct cdp_config_params *params) +{ +} +#endif + /** * hdd_update_dp_config() - Propagate config parameters to Lithium * datapath @@ -19350,16 +19357,40 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx) */ static int hdd_update_dp_config(struct hdd_context *hdd_ctx) { - struct wlan_dp_user_config dp_cfg; + struct cdp_config_params params = {0}; QDF_STATUS status; + void *soc; - dp_cfg.ipa_enable = ucfg_ipa_is_enabled(); - dp_cfg.arp_connectivity_map = CONNECTIVITY_CHECK_SET_ARP; + soc = cds_get_context(QDF_MODULE_ID_SOC); + params.tso_enable = cfg_get(hdd_ctx->psoc, CFG_DP_TSO); + params.lro_enable = cfg_get(hdd_ctx->psoc, CFG_DP_LRO); + hdd_update_dp_config_queue_threshold(hdd_ctx, ¶ms); + params.flow_steering_enable = + cfg_get(hdd_ctx->psoc, CFG_DP_FLOW_STEERING_ENABLED); + params.napi_enable = hdd_ctx->napi_enable; + params.p2p_tcp_udp_checksumoffload = + cfg_get(hdd_ctx->psoc, + CFG_DP_P2P_TCP_UDP_CKSUM_OFFLOAD); + params.nan_tcp_udp_checksumoffload = + cfg_get(hdd_ctx->psoc, + CFG_DP_NAN_TCP_UDP_CKSUM_OFFLOAD); + params.tcp_udp_checksumoffload = + cfg_get(hdd_ctx->psoc, + CFG_DP_TCP_UDP_CKSUM_OFFLOAD); + params.ipa_enable = ucfg_ipa_is_enabled(); + params.gro_enable = cfg_get(hdd_ctx->psoc, CFG_DP_GRO); + params.tx_comp_loop_pkt_limit = cfg_get(hdd_ctx->psoc, + CFG_DP_TX_COMP_LOOP_PKT_LIMIT); + params.rx_reap_loop_pkt_limit = cfg_get(hdd_ctx->psoc, + CFG_DP_RX_REAP_LOOP_PKT_LIMIT); + params.rx_hp_oos_update_limit = cfg_get(hdd_ctx->psoc, + CFG_DP_RX_HP_OOS_UPDATE_LIMIT); + hdd_update_dp_config_rx_softirq_limits(hdd_ctx, ¶ms); - status = ucfg_dp_update_config(hdd_ctx->psoc, &dp_cfg); - if (status != QDF_STATUS_SUCCESS) { - hdd_err("failed DP PSOC configuration update"); - return -EINVAL; + status = cdp_update_config_parameters(soc, ¶ms); + if (status) { + hdd_err("Failed to attach config parameters"); + return status; } return 0;