diff --git a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index 464d43915280..2aff4dfdcf71 100644 --- a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -1494,6 +1494,18 @@ struct policy_mgr_hdd_cbacks { struct ch_params *ch_params); }; +/** + * struct policy_mgr_conc_cbacks - lim Callbacks to be invoked + * from policy manager + * @connection_info_update: check and update params based on STA/SAP + * concurrency.such as EDCA params and RTS threshold. + * If updated, it will also send the updated parameters + * to FW. + */ + +struct policy_mgr_conc_cbacks { + void (*connection_info_update)(void); +}; /** * struct policy_mgr_tdls_cbacks - TDLS Callbacks to be invoked @@ -2397,6 +2409,21 @@ QDF_STATUS policy_mgr_register_hdd_cb(struct wlan_objmgr_psoc *psoc, */ QDF_STATUS policy_mgr_deregister_hdd_cb(struct wlan_objmgr_psoc *psoc); +/** + * policy_mgr_register_conc_cb() - register Lim callbacks + * @psoc: PSOC object information + * @hdd_cbacks: function pointers from lim + * + * API, allows Lim to register callbacks to be invoked by policy + * mgr + * + * Return: SUCCESS, + * Failure (if registration fails) + */ + +QDF_STATUS policy_mgr_register_conc_cb(struct wlan_objmgr_psoc *psoc, + struct policy_mgr_conc_cbacks *conc_cbacks); + /** * policy_mgr_register_tdls_cb() - register TDLS callbacks * @psoc: PSOC object information diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c index 37abaf7c499d..10d1fe879a1d 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c @@ -631,6 +631,9 @@ void policy_mgr_update_conc_list(struct wlan_objmgr_psoc *psoc, if (pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb) pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb(mcc_mode); } + + if (pm_ctx->conc_cbacks.connection_info_update) + pm_ctx->conc_cbacks.connection_info_update(); } /** diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index efde1ae38709..1aa8938b4f3b 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -2199,6 +2199,9 @@ QDF_STATUS policy_mgr_decr_connection_count(struct wlan_objmgr_psoc *psoc, sizeof(*pm_conc_connection_list)); qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); + if (pm_ctx->conc_cbacks.connection_info_update) + pm_ctx->conc_cbacks.connection_info_update(); + return QDF_STATUS_SUCCESS; } diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h index 047a784fca6a..999d7aefd8fc 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h @@ -296,6 +296,8 @@ struct policy_mgr_cfg { * interaction with Policy Manager * @cdp_cbacks: callbacks to be registered by SME for * interaction with Policy Manager + * @conc_cbacks: callbacks to be registered by lim for + * interaction with Policy Manager * @sap_mandatory_channels: The user preferred master list on * which SAP can be brought up. This * mandatory channel freq list would be as per @@ -342,6 +344,7 @@ struct policy_mgr_psoc_priv_obj { struct policy_mgr_tdls_cbacks tdls_cbacks; struct policy_mgr_cdp_cbacks cdp_cbacks; struct policy_mgr_dp_cbacks dp_cbacks; + struct policy_mgr_conc_cbacks conc_cbacks; uint32_t sap_mandatory_channels[NUM_CHANNELS]; uint32_t sap_mandatory_channels_len; bool do_sap_unsafe_ch_check; diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c index a1e69228c228..76d12c80f741 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c @@ -637,6 +637,22 @@ QDF_STATUS policy_mgr_psoc_disable(struct wlan_objmgr_psoc *psoc) return status; } +QDF_STATUS policy_mgr_register_conc_cb(struct wlan_objmgr_psoc *psoc, + struct policy_mgr_conc_cbacks *conc_cbacks) +{ + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("Invalid Context"); + return QDF_STATUS_E_FAILURE; + } + + pm_ctx->conc_cbacks.connection_info_update = + conc_cbacks->connection_info_update; + return QDF_STATUS_SUCCESS; +} + QDF_STATUS policy_mgr_register_sme_cb(struct wlan_objmgr_psoc *psoc, struct policy_mgr_sme_cbacks *sme_cbacks) { diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index eba5582c64c0..b8bdf6dd0cc2 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -83,6 +83,7 @@ #include "wlan_roam_debug.h" #include "wlan_hdd_twt.h" +#include "wma_api.h" /* These are needed to recognize WPA and RSN suite types */ #define HDD_WPA_OUI_SIZE 4 @@ -2042,6 +2043,14 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, /* Clear saved connection information in HDD */ hdd_conn_remove_connect_info(sta_ctx); + + /* Setting the RTS profile to original value */ + if (sme_cli_set_command(adapter->vdev_id, WMI_VDEV_PARAM_ENABLE_RTSCTS, + cfg_get(hdd_ctx->psoc, + CFG_ENABLE_FW_RTS_PROFILE), + VDEV_CMD)) + hdd_debug("Failed to set RTS_PROFILE"); + /* * eConnectionState_Connecting state mean that connection is in * progress so no need to set state to eConnectionState_NotConnected diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index c08210e45ea3..c19dae1aeb99 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -1485,6 +1485,13 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter) hdd_err("WLAN_AP_DISCONNECT event failed"); } + /* Setting the RTS profile to original value */ + if (sme_cli_set_command(adapter->vdev_id, WMI_VDEV_PARAM_ENABLE_RTSCTS, + cfg_get(hdd_ctx->psoc, + CFG_ENABLE_FW_RTS_PROFILE), + VDEV_CMD)) + hdd_debug("Failed to set RTS_PROFILE"); + return status; } diff --git a/core/mac/src/include/dph_global.h b/core/mac/src/include/dph_global.h index 572b07962c34..77a676467243 100644 --- a/core/mac/src/include/dph_global.h +++ b/core/mac/src/include/dph_global.h @@ -55,6 +55,8 @@ typedef struct sDphQosParams { uint8_t addtsPresent; tSirAddtsReqInfo addts; tSirMacQosCapabilityStaIE capability; + /*AP EDCA params, extracted from assoc resp*/ + tSirMacEdcaParamSetIE peer_edca_params; } tDphQosParams; /** diff --git a/core/mac/src/pe/include/sch_api.h b/core/mac/src/pe/include/sch_api.h index decd90d9aad1..1761b67b3108 100644 --- a/core/mac/src/pe/include/sch_api.h +++ b/core/mac/src/pe/include/sch_api.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2011-2015, 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2015, 2017-2019, 2021 The Linux Foundation. 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 @@ -44,6 +45,9 @@ void sch_set_default_edca_params(struct mac_context *mac, struct pe_session *pe_ /* update only local qos params */ void sch_qos_update_local(struct mac_context *mac, struct pe_session *pe_session); +/* update the edca profile parameters based on STA-SAP concurrency */ +void sch_qos_concurrency_update(void); + /* update the edca profile parameters */ void sch_edca_profile_update(struct mac_context *mac, struct pe_session *pe_session); diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index f8ac2bae23be..35ededa25452 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -749,6 +749,19 @@ static QDF_STATUS lim_unregister_sap_bcn_callback(struct mac_context *mac_ctx) return status; } +static void lim_register_policy_mgr_callback(struct wlan_objmgr_psoc *psoc) +{ + struct policy_mgr_conc_cbacks conc_cbacks; + + qdf_mem_zero(&conc_cbacks, sizeof(conc_cbacks)); + conc_cbacks.connection_info_update = lim_send_conc_params_update; + + if (QDF_STATUS_SUCCESS != policy_mgr_register_conc_cb(psoc, + &conc_cbacks)) { + pe_err("failed to register policy manager callbacks"); + } +} + static int pe_hang_event_notifier_call(struct notifier_block *block, unsigned long state, void *data) @@ -862,6 +875,8 @@ QDF_STATUS pe_open(struct mac_context *mac, struct cds_config_info *cds_cfg) lim_nan_register_callbacks(mac); p2p_register_callbacks(mac); lim_register_sap_bcn_callback(mac); + if (mac->mlme_cfg->edca_params.enable_edca_params) + lim_register_policy_mgr_callback(mac->psoc); if (!QDF_IS_STATUS_SUCCESS( cds_shutdown_notifier_register(pe_shutdown_notifier_cb, mac))) { diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c index a68b5a599652..641a237b9dd3 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c @@ -222,6 +222,10 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx, if (assoc_rsp->edcaPresent) { QDF_STATUS status; + qdf_mem_copy(&sta_ds->qos.peer_edca_params, + &assoc_rsp->edca, + sizeof(assoc_rsp->edca)); + status = sch_beacon_edca_process(mac_ctx, &assoc_rsp->edca, session_entry); @@ -242,6 +246,10 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx, if (session_entry->limWmeEnabled && assoc_rsp->wmeEdcaPresent) { QDF_STATUS status; + qdf_mem_copy(&sta_ds->qos.peer_edca_params, + &assoc_rsp->edca, + sizeof(assoc_rsp->edca)); + status = sch_beacon_edca_process(mac_ctx, &assoc_rsp->edca, session_entry); pe_debug("WME Edca set update based on AssocRsp: status %d", diff --git a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c index 6f95ed93c6d6..d7c6344fe455 100644 --- a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2021 The Linux Foundation. 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 @@ -244,6 +244,9 @@ lim_process_probe_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_Packet_info session_entry) != QDF_STATUS_SUCCESS) { pe_err("EDCA param process error"); } else if (sta_ds) { + qdf_mem_copy(&sta_ds->qos.peer_edca_params, + &probe_rsp->edcaParams, + sizeof(probe_rsp->edcaParams)); /* * If needed, downgrade the * EDCA parameters @@ -255,6 +258,7 @@ lim_process_probe_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_Packet_info lim_send_edca_params(mac_ctx, session_entry->gLimEdcaParamsActive, session_entry->vdev_id, false); + sch_qos_concurrency_update(); } else { pe_err("SelfEntry missing in Hash"); } diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index eb12074e23b9..120109406371 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -5180,6 +5180,260 @@ void lim_set_vht_caps(struct mac_context *p_mac, struct pe_session *p_session_en } } +/* + * Firmware will send RTS for every frame and also will disable SIFS bursting + * if value 0x11 is sent for RTS profile. + */ +#define A_EDCA_SCC_RTS_PROFILE_VALUE 0x11 +#define MAX_NUMBER_OF_SINGLE_PORT_CONC_CONNECTIONS 2 + +static void lim_update_sta_edca_params(struct mac_context *mac, + struct pe_session *sta_session) +{ + uint8_t i; + + for (i = QCA_WLAN_AC_BE; i < QCA_WLAN_AC_ALL; i++) { + sta_session->gLimEdcaParamsActive[i] = + sta_session->gLimEdcaParams[i]; + } + lim_send_edca_params(mac, + sta_session->gLimEdcaParamsActive, + sta_session->vdev_id, false); +} + +/** + * lim_check_conc_and_send_edca() - Function to check and update EDCA params + * and RTS profile based on STA/SAP + * concurrency. If updated, it will also send + * the updated parameters to FW. It will update + * EDCA params and RTS profile such that: + * 1) For STA and SAP concurrency, send STA's AP EDCA params to fw. + * Also, for SAP or P2P Go, update the value in Broadcast EDCA params + * as well so that it should be broadcasted to other stations connected + * to that BSS. Also, update the RTS profile value to 0x11 for which + * FW will send RTS for every frame and will also disable SIFS + * bursting. + * + * 2) For standalone STA (can even happen after SAP/P2P Go + * disconnects), if the parameters are updated, reset them to original + * parameters and send them to FW. Also, update the RTS profile + * value to which it was set before. + * + * 3) For standalone SAP (can even happen after STA disconnects), + * if the parameters are updated, reset them to original + * parameters and send them to FW and reset the Broadcast EDCA params + * as well so that it should be broadcasted to other stations connected + * to that BSS Also, update the RTS profile value to which it was set + * before. + * + * This update is needed because throughput drop was seen because of + * inconsistency in the EDCA params used in STA-SAP or STA-P2P_GO concurrency. + * + * Return: void + */ + +static void lim_check_conc_and_send_edca(struct mac_context *mac, + struct pe_session *sta_session, + struct pe_session *sap_session) +{ + bool params_update_required = false; + uint8_t i; + tpDphHashNode sta_ds = NULL; + QDF_STATUS status; + uint16_t assoc_id; + + if (sta_session && sap_session && + (sta_session->curr_op_freq == + sap_session->curr_op_freq)) { + /* RTS profile update to FW */ + wma_cli_set_command(sap_session->vdev_id, + WMI_VDEV_PARAM_ENABLE_RTSCTS, + A_EDCA_SCC_RTS_PROFILE_VALUE, + VDEV_CMD); + wma_cli_set_command(sta_session->vdev_id, + WMI_VDEV_PARAM_ENABLE_RTSCTS, + A_EDCA_SCC_RTS_PROFILE_VALUE, + VDEV_CMD); + + sta_ds = dph_lookup_hash_entry(mac, + sta_session->bssId, + &assoc_id, + &sta_session->dph.dphHashTable); + + if (!sta_ds) { + pe_debug("No STA DS entry found for " QDF_MAC_ADDR_FMT, + QDF_MAC_ADDR_REF(sta_session->bssId)); + return; + } + + if (!sta_ds->qos.peer_edca_params.length) { + pe_debug("No sta_ds edca_params present"); + return; + } + + /* + * Here what we do is disable A-EDCA by sending the edca params of + * connected AP which we got as part of assoc resp So as these EDCA + * params are updated per mac , its fine to send for SAP which will + * be used for STA as well on the same channel. No need to send for + * both SAP and STA. + */ + + sap_session->gLimEdcaParamsBC[QCA_WLAN_AC_BE] = + sta_ds->qos.peer_edca_params.acbe; + sap_session->gLimEdcaParamsBC[QCA_WLAN_AC_BK] = + sta_ds->qos.peer_edca_params.acbk; + sap_session->gLimEdcaParamsBC[QCA_WLAN_AC_VI] = + sta_ds->qos.peer_edca_params.acvi; + sap_session->gLimEdcaParamsBC[QCA_WLAN_AC_VO] = + sta_ds->qos.peer_edca_params.acvo; + + sap_session->gLimEdcaParamsActive[QCA_WLAN_AC_BE] = + sta_ds->qos.peer_edca_params.acbe; + sap_session->gLimEdcaParamsActive[QCA_WLAN_AC_BK] = + sta_ds->qos.peer_edca_params.acbk; + sap_session->gLimEdcaParamsActive[QCA_WLAN_AC_VI] = + sta_ds->qos.peer_edca_params.acvi; + sap_session->gLimEdcaParamsActive[QCA_WLAN_AC_VO] = + sta_ds->qos.peer_edca_params.acvo; + + for (i = QCA_WLAN_AC_BE; i < QCA_WLAN_AC_ALL; i++) { + sta_session->gLimEdcaParamsActive[i] = + sap_session->gLimEdcaParamsActive[i]; + } + /* For AP, the bssID is stored in LIM Global context. */ + lim_send_edca_params(mac, sap_session->gLimEdcaParamsActive, + sap_session->vdev_id, false); + + sap_session->gLimEdcaParamSetCount++; + status = sch_set_fixed_beacon_fields(mac, sap_session); + if (QDF_IS_STATUS_ERROR(status)) + pe_debug("Unable to set beacon fields!"); + + } else if (!sap_session && sta_session) { + /* + * Enable A-EDCA for standalone STA. The original EDCA parameters are + * stored in gLimEdcaParams (computed by sch_beacon_edca_process()), + * if active parameters are not equal that means they have been updated + * because of conncurrency and are need to be restored now + */ + + wma_cli_set_command(sta_session->vdev_id, + WMI_VDEV_PARAM_ENABLE_RTSCTS, + cfg_get(mac->psoc, + CFG_ENABLE_FW_RTS_PROFILE), + VDEV_CMD); + for (i = QCA_WLAN_AC_BE; i < QCA_WLAN_AC_ALL; i++) { + if (qdf_mem_cmp(&sta_session->gLimEdcaParamsActive[i], + &sta_session->gLimEdcaParams[i], + sizeof(tSirMacEdcaParamRecord))) { + pe_debug("local sta EDCA params are not equal to Active EDCA params, hence update required"); + params_update_required = true; + break; + } + } + + if (params_update_required) { + lim_update_sta_edca_params(mac, + sta_session); + } + } else { + /* + * For STA+SAP/GO DBS, STA+SAP/GO MCC or standalone SAP/GO + */ + + wma_cli_set_command(sap_session->vdev_id, + WMI_VDEV_PARAM_ENABLE_RTSCTS, + cfg_get(mac->psoc, + CFG_ENABLE_FW_RTS_PROFILE), + VDEV_CMD); + if (sta_session) + wma_cli_set_command(sta_session->vdev_id, + WMI_VDEV_PARAM_ENABLE_RTSCTS, + cfg_get(mac->psoc, + CFG_ENABLE_FW_RTS_PROFILE), + VDEV_CMD); + + for (i = QCA_WLAN_AC_BE; i < QCA_WLAN_AC_ALL; i++) { + if (qdf_mem_cmp(&sap_session->gLimEdcaParamsActive[i], + &sap_session->gLimEdcaParams[i], + sizeof(tSirMacEdcaParamRecord))) { + pe_debug("local sap EDCA params are not equal to Active EDCA params, hence update required"); + params_update_required = true; + break; + } + } + + if (params_update_required) { + for (i = QCA_WLAN_AC_BE; i < QCA_WLAN_AC_ALL; i++) { + sap_session->gLimEdcaParamsActive[i] = + sap_session->gLimEdcaParams[i]; + } + lim_send_edca_params(mac, + sap_session->gLimEdcaParamsActive, + sap_session->vdev_id, false); + sch_qos_update_broadcast(mac, sap_session); + + /* + * In case of mcc, where cb can come from scc to mcc swtich where we + * need to restore the default parameters + */ + if (sta_session) { + lim_update_sta_edca_params(mac, + sta_session); + } + } + } +} + +void lim_send_conc_params_update(void) +{ + struct pe_session *sta_session = NULL; + struct pe_session *sap_session = NULL; + uint8_t i; + struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE); + + if (!mac->mlme_cfg->edca_params.enable_edca_params || + (policy_mgr_get_connection_count(mac->psoc) > + MAX_NUMBER_OF_SINGLE_PORT_CONC_CONNECTIONS)) { + pe_debug("A-EDCA not enabled or max number of connections: %d", + policy_mgr_get_connection_count(mac->psoc)); + return; + } + + for (i = 0; i < mac->lim.maxBssId; i++) { + /* + * Finding whether STA or Go session exists + */ + if (sta_session && sap_session) + break; + + if ((mac->lim.gpSession[i].valid) && + (mac->lim.gpSession[i].limSystemRole == + eLIM_STA_ROLE)) { + sta_session = &mac->lim.gpSession[i]; + continue; + } + if ((mac->lim.gpSession[i].valid) && + ((mac->lim.gpSession[i].limSystemRole == eLIM_AP_ROLE) || + (mac->lim.gpSession[i].limSystemRole == + eLIM_P2P_DEVICE_GO))) { + sap_session = &mac->lim.gpSession[i]; + continue; + } + } + + if (!(sta_session || sap_session)) { + pe_debug("No sta or sap or P2P go session"); + return; + } + + pe_debug("Valid STA session: %d Valid SAP session: %d", + (sta_session ? sta_session->valid : 0), + (sap_session ? sap_session->valid : 0)); + lim_check_conc_and_send_edca(mac, sta_session, sap_session); +} + /** * lim_validate_received_frame_a1_addr() - To validate received frame's A1 addr * @mac_ctx: pointer to mac context diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index 9cabe1372570..7ebf92fbaae6 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -2218,4 +2218,14 @@ void lim_process_tpe_ie_from_beacon(struct mac_context *mac, struct pe_session *session, struct bss_description *bss_desc, bool *has_tpe_updated); + +/** + * lim_send_conc_params_update() - Function to check and update params based on + * STA/SAP concurrency.such as EDCA params + * and RTS profile. If updated, it will also + * also send the updated parameters to FW. + * + * Return: void + */ +void lim_send_conc_params_update(void); #endif /* __LIM_UTILS_H */ diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 2e4481e2f9a3..8147797b630a 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -383,6 +383,9 @@ sch_bcn_process_sta(struct mac_context *mac_ctx, (bcn->edcaPresent && session->limQosEnabled)) { if (bcn->edcaParams.qosInfo.count != session->gLimEdcaParamSetCount) { + qdf_mem_copy(&sta->qos.peer_edca_params, + &bcn->edcaParams, + sizeof(bcn->edcaParams)); status = sch_beacon_edca_process(mac_ctx, &bcn->edcaParams, session); @@ -395,6 +398,7 @@ sch_bcn_process_sta(struct mac_context *mac_ctx, lim_send_edca_params(mac_ctx, session->gLimEdcaParamsActive, session->vdev_id, false); + sch_qos_concurrency_update(); } else { pe_err("Self Entry missing in Hash Table"); } diff --git a/core/mac/src/pe/sch/sch_message.c b/core/mac/src/pe/sch/sch_message.c index be4d107d5d0e..8ddd2469598f 100644 --- a/core/mac/src/pe/sch/sch_message.c +++ b/core/mac/src/pe/sch/sch_message.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 The Linux Foundation. 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 @@ -27,6 +27,7 @@ #include "sch_api.h" #include "wlan_mlme_api.h" #include +#include "lim_utils.h" /* / Minimum beacon interval allowed (in Kus) */ #define SCH_BEACON_INTERVAL_MIN 10 @@ -484,6 +485,19 @@ get_wmm_local_params(struct mac_context *mac_ctx, return QDF_STATUS_SUCCESS; } +/** + * sch_qos_concurrency_update() - This function updates the local and + * broadcast based on STA and SAP + * concurrency. It also updates the + * edcaParamSetCount, if Broadcast EDCA params are updated based on Concurrency. + * + * Return none + */ +void sch_qos_concurrency_update(void) +{ + lim_send_conc_params_update(); +} + /** * sch_edca_profile_update() - This function updates the local and broadcast * EDCA params in the gLimEdcaParams structure. It also updates the @@ -498,6 +512,7 @@ void sch_edca_profile_update(struct mac_context *mac, struct pe_session *pe_sess if (LIM_IS_AP_ROLE(pe_session)) { sch_qos_update_local(mac, pe_session); sch_qos_update_broadcast(mac, pe_session); + sch_qos_concurrency_update(); } }