qcacld-3.0: Remove dependency of gEnable2x2 with HtSMPS
As per FW, value of gEnable2x2 and gEnableHtSMPS are independent. Remove dependency of INI "gEnable2x2: used to enables/ disables VHT Tx/Rx MCS values for 2x2" and INI "gEnableHtSMPS : used to enable SM Power Save". Initialize ht_cap_info.mimo_power_save bit as per INI "gHtSMPS: used to set default SM Power Save Antenna mode" Update SMPS HT cap as per FW capability WMI_HT_CAP_DYNAMIC_SMPS and ini gHtSMPS. Change-Id: I79ad8f060adb550c738c58259fa65f073ad9b42d CRs-Fixed: 3771123
This commit is contained in:
@@ -1712,6 +1712,7 @@ static void mlme_init_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
cfg_get(psoc, CFG_SHORT_GI_20MHZ);
|
||||
u1.ht_cap_info.short_gi_40_mhz =
|
||||
cfg_get(psoc, CFG_SHORT_GI_40MHZ);
|
||||
u1.ht_cap_info.mimo_power_save = cfg_get(psoc, CFG_HT_SMPS_MODE);
|
||||
ht_caps->ht_cap_info = u1.ht_cap_info;
|
||||
|
||||
/* HT Capapabilties - AMPDU Params */
|
||||
|
@@ -6004,30 +6004,7 @@ static bool hdd_is_supported_chain_mask_1x1(struct hdd_context *hdd_ctx)
|
||||
|
||||
QDF_STATUS hdd_update_smps_antenna_mode(struct hdd_context *hdd_ctx, int mode)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint8_t smps_mode;
|
||||
uint8_t smps_enable;
|
||||
mac_handle_t mac_handle;
|
||||
|
||||
/* Update SME SMPS config */
|
||||
if (HDD_ANTENNA_MODE_1X1 == mode) {
|
||||
smps_enable = true;
|
||||
smps_mode = HDD_SMPS_MODE_STATIC;
|
||||
} else {
|
||||
smps_enable = false;
|
||||
smps_mode = HDD_SMPS_MODE_DISABLED;
|
||||
}
|
||||
|
||||
hdd_debug("Update SME SMPS enable: %d mode: %d",
|
||||
smps_enable, smps_mode);
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
status = sme_update_mimo_power_save(mac_handle, smps_enable,
|
||||
smps_mode, false);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
hdd_err("Update SMPS config failed enable: %d mode: %d status: %d",
|
||||
smps_enable, smps_mode, status);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
||||
|
||||
hdd_ctx->current_antenna_mode = mode;
|
||||
/*
|
||||
|
@@ -2186,6 +2186,15 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
|
||||
if (ht_cap_info.short_gi_40_mhz && !cfg->ht_sgi_40)
|
||||
ht_cap_info.short_gi_40_mhz = cfg->ht_sgi_40;
|
||||
|
||||
hdd_debug("gHtSMPS ini: %d, dynamic_smps fw cap: %d",
|
||||
ht_cap_info.mimo_power_save, cfg->dynamic_smps);
|
||||
if (ht_cap_info.mimo_power_save == HDD_SMPS_MODE_DYNAMIC) {
|
||||
if (cfg->dynamic_smps)
|
||||
ht_cap_info.mimo_power_save = HDD_SMPS_MODE_DYNAMIC;
|
||||
else
|
||||
ht_cap_info.mimo_power_save = HDD_SMPS_MODE_DISABLED;
|
||||
}
|
||||
|
||||
hdd_ctx->num_rf_chains = cfg->num_rf_chains;
|
||||
hdd_ctx->ht_tx_stbc_supported = cfg->ht_tx_stbc;
|
||||
|
||||
|
@@ -1957,10 +1957,6 @@ QDF_STATUS sme_reset_tsfcb(mac_handle_t mac_handle);
|
||||
QDF_STATUS sme_set_tsf_gpio(mac_handle_t mac_handle, uint32_t pinvalue);
|
||||
#endif
|
||||
|
||||
QDF_STATUS sme_update_mimo_power_save(mac_handle_t mac_handle,
|
||||
uint8_t is_ht_smps_enabled,
|
||||
uint8_t ht_smps_mode,
|
||||
bool send_smps_action);
|
||||
#ifdef WLAN_BCN_RECV_FEATURE
|
||||
/**
|
||||
* sme_handle_bcn_recv_start() - Enable fw to start sending
|
||||
|
@@ -12279,37 +12279,6 @@ QDF_STATUS sme_ht40_stop_obss_scan(mac_handle_t mac_handle, uint32_t vdev_id)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_update_mimo_power_save() - Update MIMO power save
|
||||
* configuration
|
||||
* @mac_handle: The handle returned by macOpen
|
||||
* @is_ht_smps_enabled: enable/disable ht smps
|
||||
* @ht_smps_mode: smps mode disabled/static/dynamic
|
||||
* @send_smps_action: flag to send smps force mode command
|
||||
* to FW
|
||||
*
|
||||
* Return: QDF_STATUS if SME update mimo power save
|
||||
* configuration success else failure status
|
||||
*/
|
||||
QDF_STATUS sme_update_mimo_power_save(mac_handle_t mac_handle,
|
||||
uint8_t is_ht_smps_enabled,
|
||||
uint8_t ht_smps_mode,
|
||||
bool send_smps_action)
|
||||
{
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
|
||||
sme_debug("SMPS enable: %d mode: %d send action: %d",
|
||||
is_ht_smps_enabled, ht_smps_mode,
|
||||
send_smps_action);
|
||||
mac_ctx->mlme_cfg->ht_caps.enable_smps =
|
||||
is_ht_smps_enabled;
|
||||
mac_ctx->mlme_cfg->ht_caps.smps = ht_smps_mode;
|
||||
mac_ctx->roam.configParam.send_smps_action =
|
||||
send_smps_action;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_BCN_RECV_FEATURE
|
||||
QDF_STATUS sme_handle_bcn_recv_start(mac_handle_t mac_handle,
|
||||
uint32_t vdev_id, uint32_t nth_value,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -131,6 +131,7 @@ struct wma_tgt_services {
|
||||
* @ht_sgi_20: ht sgi 20
|
||||
* @ht_sgi_40: ht sgi 40
|
||||
* @num_rf_chains: num of rf chains
|
||||
* @dynamic_smps: Dynamic MIMO powersave
|
||||
*/
|
||||
struct wma_tgt_ht_cap {
|
||||
uint32_t mpdu_density;
|
||||
@@ -140,6 +141,7 @@ struct wma_tgt_ht_cap {
|
||||
bool ht_sgi_20;
|
||||
bool ht_sgi_40;
|
||||
uint32_t num_rf_chains;
|
||||
bool dynamic_smps;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -5550,16 +5550,18 @@ wma_update_target_ht_cap(struct target_psoc_info *tgt_hdl,
|
||||
|
||||
cfg->ht_sgi_40 = !!(ht_cap_info & WMI_HT_CAP_HT40_SGI);
|
||||
|
||||
cfg->dynamic_smps = !!(ht_cap_info & WMI_HT_CAP_DYNAMIC_SMPS);
|
||||
|
||||
/* RF chains */
|
||||
cfg->num_rf_chains = target_if_get_num_rf_chains(tgt_hdl);
|
||||
|
||||
wma_nofl_debug("ht_cap_info - %x ht_rx_stbc - %d, ht_tx_stbc - %d\n"
|
||||
"mpdu_density - %d ht_rx_ldpc - %d ht_sgi_20 - %d\n"
|
||||
"ht_sgi_40 - %d num_rf_chains - %d",
|
||||
"ht_sgi_40 - %d num_rf_chains - %d dynamic_smps - %d",
|
||||
ht_cap_info,
|
||||
cfg->ht_rx_stbc, cfg->ht_tx_stbc, cfg->mpdu_density,
|
||||
cfg->ht_rx_ldpc, cfg->ht_sgi_20, cfg->ht_sgi_40,
|
||||
cfg->num_rf_chains);
|
||||
cfg->num_rf_chains, cfg->dynamic_smps);
|
||||
|
||||
}
|
||||
|
||||
@@ -5694,6 +5696,7 @@ static void wma_derive_ext_ht_cap(
|
||||
ht_cap->ht_rx_ldpc = (!!(value & WMI_HT_CAP_RX_LDPC));
|
||||
ht_cap->ht_sgi_20 = (!!(value & WMI_HT_CAP_HT20_SGI));
|
||||
ht_cap->ht_sgi_40 = (!!(value & WMI_HT_CAP_HT40_SGI));
|
||||
ht_cap->dynamic_smps = (!!(value & WMI_HT_CAP_DYNAMIC_SMPS));
|
||||
ht_cap->num_rf_chains =
|
||||
QDF_MAX(wma_get_num_of_setbits_from_bitmask(tx_chain),
|
||||
wma_get_num_of_setbits_from_bitmask(rx_chain));
|
||||
@@ -5710,6 +5713,9 @@ static void wma_derive_ext_ht_cap(
|
||||
(!!(value & WMI_HT_CAP_HT20_SGI)));
|
||||
ht_cap->ht_sgi_40 = QDF_MIN(ht_cap->ht_sgi_40,
|
||||
(!!(value & WMI_HT_CAP_HT40_SGI)));
|
||||
ht_cap->dynamic_smps = QDF_MIN(ht_cap->dynamic_smps,
|
||||
(!!(value & WMI_HT_CAP_DYNAMIC_SMPS)));
|
||||
|
||||
ht_cap->num_rf_chains =
|
||||
QDF_MAX(ht_cap->num_rf_chains,
|
||||
QDF_MAX(wma_get_num_of_setbits_from_bitmask(
|
||||
@@ -5781,11 +5787,11 @@ static void wma_update_target_ext_ht_cap(struct target_psoc_info *tgt_hdl,
|
||||
|
||||
wma_nofl_debug("[ext ht cap] ht_rx_stbc - %d, ht_tx_stbc - %d\n"
|
||||
"mpdu_density - %d ht_rx_ldpc - %d ht_sgi_20 - %d\n"
|
||||
"ht_sgi_40 - %d num_rf_chains - %d",
|
||||
"ht_sgi_40 - %d num_rf_chains - %d dynamic_smps - %d",
|
||||
ht_cap->ht_rx_stbc, ht_cap->ht_tx_stbc,
|
||||
ht_cap->mpdu_density, ht_cap->ht_rx_ldpc,
|
||||
ht_cap->ht_sgi_20, ht_cap->ht_sgi_40,
|
||||
ht_cap->num_rf_chains);
|
||||
ht_cap->num_rf_chains, ht_cap->dynamic_smps);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user