qcacld-3.0: HDD changes to incorporate new DP component

HDD changes to incorporate new DP component

Changes were backed out because of association issue
introduced by MLO adapter to DP interface mapping issue
and to avoid any further regression.
Re-introduce changes after performing complete sanity to
vet out any regression which might be introduced by these changes.

Change-Id: I058b9121c8490e9b0906421a35e01c55a1a7c25a
CRs-Fixed: 3198619
This commit is contained in:
Amit Mehta
2022-05-17 00:41:47 -07:00
parent 2b4926c710
commit 95806ea1ee
4 changed files with 55 additions and 83 deletions

View File

@@ -45,6 +45,7 @@
#include "cfg_ftm_time_sync.h" #include "cfg_ftm_time_sync.h"
#include "wlan_pmo_cfg.h" #include "wlan_pmo_cfg.h"
#include "wlan_dp_cfg.h"
#include "hdd_config.h" #include "hdd_config.h"
#include "hdd_dp_cfg.h" #include "hdd_dp_cfg.h"
#include "cfg_legacy_dp.h" #include "cfg_legacy_dp.h"
@@ -59,6 +60,7 @@
CFG_POLICY_MGR_ALL \ CFG_POLICY_MGR_ALL \
CFG_HDD_ALL \ CFG_HDD_ALL \
CFG_HDD_DP_ALL \ CFG_HDD_DP_ALL \
CFG_DP_ALL \
CFG_LEGACY_DP_ALL \ CFG_LEGACY_DP_ALL \
CFG_MLME_ALL \ CFG_MLME_ALL \
CFG_NAN_ALL \ CFG_NAN_ALL \

View File

@@ -113,6 +113,7 @@
#include "wlan_hdd_pre_cac.h" #include "wlan_hdd_pre_cac.h"
#include "wlan_osif_features.h" #include "wlan_osif_features.h"
#include "wlan_pre_cac_ucfg_api.h" #include "wlan_pre_cac_ucfg_api.h"
#include <wlan_dp_ucfg_api.h>
#define ACS_SCAN_EXPIRY_TIMEOUT_S 4 #define ACS_SCAN_EXPIRY_TIMEOUT_S 4
@@ -787,6 +788,7 @@ static int __hdd_hostapd_set_mac_address(struct net_device *dev, void *addr)
} }
hdd_update_dynamic_mac(hdd_ctx, &adapter->mac_addr, &mac_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(&adapter->mac_addr, psta_mac_addr->sa_data, ETH_ALEN);
memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN);
hdd_exit(); hdd_exit();

View File

@@ -233,6 +233,9 @@
#ifdef WLAN_FEATURE_DYNAMIC_RX_AGGREGATION #ifdef WLAN_FEATURE_DYNAMIC_RX_AGGREGATION
#include <net/pkt_cls.h> #include <net/pkt_cls.h>
#endif #endif
#include "wlan_dp_public_struct.h"
#include "os_if_dp.h"
#include <wlan_dp_ucfg_api.h>
#ifdef MULTI_CLIENT_LL_SUPPORT #ifdef MULTI_CLIENT_LL_SUPPORT
#define WLAM_WLM_HOST_DRIVER_PORT_ID 0xFFFFFF #define WLAM_WLM_HOST_DRIVER_PORT_ID 0xFFFFFF
@@ -5598,6 +5601,7 @@ static int __hdd_set_mac_address(struct net_device *dev, void *addr)
else else
hdd_update_dynamic_mac(hdd_ctx, &adapter->mac_addr, &mac_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(&adapter->mac_addr, psta_mac_addr->sa_data, ETH_ALEN);
memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN);
@@ -7765,6 +7769,11 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx,
ndev = adapter->dev; 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) if (QDF_P2P_CLIENT_MODE == session_type)
adapter->wdev.iftype = NL80211_IFTYPE_P2P_CLIENT; adapter->wdev.iftype = NL80211_IFTYPE_P2P_CLIENT;
else if (QDF_P2P_DEVICE_MODE == session_type) else if (QDF_P2P_DEVICE_MODE == session_type)
@@ -7800,7 +7809,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx,
status = hdd_register_interface(adapter, rtnl_held, status = hdd_register_interface(adapter, rtnl_held,
params); params);
if (QDF_STATUS_SUCCESS != status) if (QDF_STATUS_SUCCESS != status)
goto err_free_netdev; goto err_destroy_dp_intf;
/* Stop the Interface TX queue. */ /* Stop the Interface TX queue. */
hdd_debug("Disabling queues"); hdd_debug("Disabling queues");
wlan_hdd_netif_queue_control(adapter, wlan_hdd_netif_queue_control(adapter,
@@ -7827,6 +7836,11 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx,
ndev = adapter->dev; 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 = adapter->wdev.iftype =
(session_type == (session_type ==
QDF_SAP_MODE) ? NL80211_IFTYPE_AP : QDF_SAP_MODE) ? NL80211_IFTYPE_AP :
@@ -7835,7 +7849,7 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx,
status = hdd_register_interface(adapter, rtnl_held, params); status = hdd_register_interface(adapter, rtnl_held, params);
if (QDF_STATUS_SUCCESS != status) if (QDF_STATUS_SUCCESS != status)
goto err_free_netdev; goto err_destroy_dp_intf;
hdd_debug("Disabling queues"); hdd_debug("Disabling queues");
wlan_hdd_netif_queue_control(adapter, wlan_hdd_netif_queue_control(adapter,
@@ -7872,11 +7886,16 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx,
ndev = adapter->dev; 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->wdev.iftype = NL80211_IFTYPE_STATION;
adapter->device_mode = session_type; adapter->device_mode = session_type;
status = hdd_register_interface(adapter, rtnl_held, params); status = hdd_register_interface(adapter, rtnl_held, params);
if (QDF_STATUS_SUCCESS != status) if (QDF_STATUS_SUCCESS != status)
goto err_free_netdev; goto err_destroy_dp_intf;
/* Stop the Interface TX queue. */ /* Stop the Interface TX queue. */
hdd_debug("Disabling queues"); hdd_debug("Disabling queues");
@@ -7953,6 +7972,9 @@ err_cleanup_adapter:
adapter = NULL; adapter = NULL;
} }
err_destroy_dp_intf:
ucfg_dp_destroy_intf(hdd_ctx->psoc, &adapter->mac_addr);
err_free_netdev: err_free_netdev:
if (ndev) if (ndev)
free_netdev(ndev); free_netdev(ndev);
@@ -7964,6 +7986,9 @@ static void __hdd_close_adapter(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter, struct hdd_adapter *adapter,
bool rtnl_held) bool rtnl_held)
{ {
struct qdf_mac_addr adapter_mac;
qdf_copy_macaddr(&adapter_mac, &adapter->mac_addr);
if (adapter->device_mode == QDF_STA_MODE) if (adapter->device_mode == QDF_STA_MODE)
hdd_cleanup_conn_info(adapter); hdd_cleanup_conn_info(adapter);
qdf_list_destroy(&adapter->blocked_scan_request_q); qdf_list_destroy(&adapter->blocked_scan_request_q);
@@ -7973,6 +7998,7 @@ static void __hdd_close_adapter(struct hdd_context *hdd_ctx,
qdf_event_destroy(&adapter->peer_cleanup_done); qdf_event_destroy(&adapter->peer_cleanup_done);
hdd_adapter_feature_update_work_deinit(adapter); hdd_adapter_feature_update_work_deinit(adapter);
hdd_cleanup_adapter(hdd_ctx, adapter, rtnl_held); 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, void hdd_close_adapter(struct hdd_context *hdd_ctx,
@@ -18351,6 +18377,10 @@ static QDF_STATUS hdd_component_init(void)
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
goto pre_cac_deinit; goto pre_cac_deinit;
status = ucfg_dp_init();
if (QDF_IS_STATUS_ERROR(status))
goto pre_cac_deinit;
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
pre_cac_deinit: pre_cac_deinit:
@@ -18401,6 +18431,7 @@ mlme_global_deinit:
static void hdd_component_deinit(void) static void hdd_component_deinit(void)
{ {
/* deinitialize non-converged components */ /* deinitialize non-converged components */
ucfg_dp_deinit();
ucfg_pre_cac_deinit(); ucfg_pre_cac_deinit();
ucfg_ftm_time_sync_deinit(); ucfg_ftm_time_sync_deinit();
ucfg_pkt_capture_deinit(); ucfg_pkt_capture_deinit();
@@ -18468,8 +18499,14 @@ QDF_STATUS hdd_component_psoc_open(struct wlan_objmgr_psoc *psoc)
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
goto err_wifi_pos; goto err_wifi_pos;
status = ucfg_dp_psoc_open(psoc);
if (QDF_IS_STATUS_ERROR(status))
goto err_dp;
return status; return status;
err_dp:
ucfg_wifi_pos_psoc_close(psoc);
err_wifi_pos: err_wifi_pos:
ucfg_twt_psoc_close(psoc); ucfg_twt_psoc_close(psoc);
err_twt: err_twt:
@@ -18494,6 +18531,7 @@ err_dlm:
void hdd_component_psoc_close(struct wlan_objmgr_psoc *psoc) void hdd_component_psoc_close(struct wlan_objmgr_psoc *psoc)
{ {
ucfg_dp_psoc_close(psoc);
ucfg_wifi_pos_psoc_close(psoc); ucfg_wifi_pos_psoc_close(psoc);
ucfg_twt_psoc_close(psoc); ucfg_twt_psoc_close(psoc);
ucfg_nan_psoc_close(psoc); ucfg_nan_psoc_close(psoc);
@@ -19592,8 +19630,7 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx)
cfg.enable_self_recovery = self_recovery; cfg.enable_self_recovery = self_recovery;
hdd_populate_runtime_cfg(hdd_ctx, &cfg); hdd_populate_runtime_cfg(hdd_ctx, &cfg);
cfg.rx_softirq_max_yield_duration_ns = cfg.rx_softirq_max_yield_duration_ns =
cfg_get(hdd_ctx->psoc, ucfg_dp_get_rx_softirq_yield_duration(hdd_ctx->psoc);
CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS);
hif_init_ini_config(scn, &cfg); hif_init_ini_config(scn, &cfg);
@@ -19601,53 +19638,6 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx)
hif_vote_link_up(scn); 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 * hdd_update_dp_config() - Propagate config parameters to Lithium
* datapath * datapath
@@ -19657,40 +19647,16 @@ hdd_update_dp_config_queue_threshold(struct hdd_context *hdd_ctx,
*/ */
static int hdd_update_dp_config(struct hdd_context *hdd_ctx) static int hdd_update_dp_config(struct hdd_context *hdd_ctx)
{ {
struct cdp_config_params params = {0}; struct wlan_dp_user_config dp_cfg;
QDF_STATUS status; QDF_STATUS status;
void *soc;
soc = cds_get_context(QDF_MODULE_ID_SOC); dp_cfg.ipa_enable = ucfg_ipa_is_enabled();
params.tso_enable = cfg_get(hdd_ctx->psoc, CFG_DP_TSO); dp_cfg.arp_connectivity_map = CONNECTIVITY_CHECK_SET_ARP;
params.lro_enable = cfg_get(hdd_ctx->psoc, CFG_DP_LRO);
hdd_update_dp_config_queue_threshold(hdd_ctx, &params);
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, &params);
status = cdp_update_config_parameters(soc, &params); status = ucfg_dp_update_config(hdd_ctx->psoc, &dp_cfg);
if (status) { if (status != QDF_STATUS_SUCCESS) {
hdd_err("Failed to attach config parameters"); hdd_err("failed DP PSOC configuration update");
return status; return -EINVAL;
} }
return 0; return 0;

View File

@@ -759,6 +759,8 @@ int hdd_ndi_set_mode(const char *iface_name)
return -EFAULT; return -EFAULT;
} }
ndi_mac_addr = &random_ndi_mac.bytes[0]; ndi_mac_addr = &random_ndi_mac.bytes[0];
ucfg_dp_update_inf_mac(hdd_ctx->psoc, &adapter->mac_addr,
(struct qdf_mac_addr *)ndi_mac_addr);
hdd_update_dynamic_mac(hdd_ctx, &adapter->mac_addr, hdd_update_dynamic_mac(hdd_ctx, &adapter->mac_addr,
(struct qdf_mac_addr *)ndi_mac_addr); (struct qdf_mac_addr *)ndi_mac_addr);
qdf_mem_copy(&adapter->mac_addr, ndi_mac_addr, ETH_ALEN); qdf_mem_copy(&adapter->mac_addr, ndi_mac_addr, ETH_ALEN);