diff options
| author | Deepak Dhamdhere <ddhamdhe@codeaurora.org> | 2016-08-28 02:56:51 -0700 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-20 11:49:22 -0800 |
| commit | 1276878dc26565c9152f97b5c1540c8b2c796871 (patch) | |
| tree | 0a98aea68e573d47e7d463b3d2bddb3d56293169 | |
| parent | 87c53e692949bfd43ab0a8ab7ff4b2ccf70a61b6 (diff) | |
qcacld-3.0: Add .ini configuration for max number of AMSDU
qcacld-2.0 to qcacld-3.0 propagation
Host driver can send number of max AMSDUs in transmit frames.
Added a call to process_wma_set_command() similar to CLI
command processing for GEN_VDEV_PARAM_AMSDU during device
initialization.
Changed name of the field from isAmsduSupportInAMPDU to max_amsdu_num
in several places. Existing SME and LIM code passes this parameter
to WMA, but it is not used there. It may be useful if AMSDU setting
is changed to per-vdev basis in future.
WCNSS_qcom_cfg.ini changes:
Removed - "gAmsduSupportInAMPDU"
Added - Name = "gMaxAmsduNum", Min = 0, Max = 3, Default = 1
Actual function call to ol_txrx_aggr_cfg() send the parameters to
firmware is commented out because it is not implemented in firmware.
Change-Id: I2dfdd8c8c4a8807596ff28eee192ef66ac425653
CRs-Fixed: 871686
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 26 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 17 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 11 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_wext.c | 3 | ||||
| -rw-r--r-- | core/mac/inc/sir_api.h | 2 | ||||
| -rw-r--r-- | core/mac/inc/sir_mac_prot_def.h | 3 | ||||
| -rw-r--r-- | core/mac/src/pe/include/lim_session.h | 4 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_assoc_utils.c | 5 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_mlm_host_roam.c | 5 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_mlm_req_messages.c | 5 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_sme_req_messages.c | 5 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_utils.c | 6 | ||||
| -rw-r--r-- | core/sme/inc/csr_api.h | 2 | ||||
| -rw-r--r-- | core/sme/inc/csr_internal.h | 2 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 10 | ||||
| -rw-r--r-- | core/wma/inc/wma_if.h | 4 | ||||
| -rw-r--r-- | core/wma/src/wma_main.c | 21 |
17 files changed, 91 insertions, 40 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 46c26e51c0ea..6068d2f7995b 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -4062,10 +4062,26 @@ typedef enum { #define CFG_PNO_SLOW_SCAN_MULTIPLIER_MAX (30) #endif -#define CFG_AMSDU_SUPPORT_IN_AMPDU_NAME "gAmsduSupportInAMPDU" -#define CFG_AMSDU_SUPPORT_IN_AMPDU_MIN (0) -#define CFG_AMSDU_SUPPORT_IN_AMPDU_MAX (1) -#define CFG_AMSDU_SUPPORT_IN_AMPDU_DEFAULT (0) /* disabled */ +/* + * <ini> + * gMaxAmsduNum - Max number of MSDU's in aggregate + * @Min: 0 + * @Max: 3 + * @Default: 1 + * gMaxAmsduNum is the number of MSDU's transmitted in the 11n aggregate + * frame. Setting it to a value larger than 1 enables transmit aggregation. + * It is a PHY parameter that applies to all vdev's in firmware. + * + * Supported Feature: 11n aggregation + * + * Usage: Internal + * + * </ini> + */ +#define CFG_MAX_AMSDU_NUM_NAME "gMaxAmsduNum" +#define CFG_MAX_AMSDU_NUM_MIN (0) +#define CFG_MAX_AMSDU_NUM_MAX (3) +#define CFG_MAX_AMSDU_NUM_DEFAULT (1) /* It enables IP, TCP and UDP checksum offload in hardware * and also advertise same to network stack. @@ -7158,7 +7174,7 @@ struct hdd_config { uint32_t configPNOScanTimerRepeatValue; uint32_t pno_slow_scan_multiplier; #endif - uint8_t isAmsduSupportInAMPDU; + uint8_t max_amsdu_num; uint8_t nSelect5GHzMargin; uint8_t isCoalesingInIBSSAllowed; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index d81720bfb674..8eafa31900d5 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -2550,12 +2550,12 @@ REG_TABLE_ENTRY g_registry_table[] = { CFG_PNO_SLOW_SCAN_MULTIPLIER_MIN, CFG_PNO_SLOW_SCAN_MULTIPLIER_MAX), #endif - REG_VARIABLE(CFG_AMSDU_SUPPORT_IN_AMPDU_NAME, WLAN_PARAM_Integer, - struct hdd_config, isAmsduSupportInAMPDU, + REG_VARIABLE(CFG_MAX_AMSDU_NUM_NAME , WLAN_PARAM_Integer, + struct hdd_config, max_amsdu_num, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_AMSDU_SUPPORT_IN_AMPDU_DEFAULT, - CFG_AMSDU_SUPPORT_IN_AMPDU_MIN, - CFG_AMSDU_SUPPORT_IN_AMPDU_MAX), + CFG_MAX_AMSDU_NUM_DEFAULT, + CFG_MAX_AMSDU_NUM_MIN, + CFG_MAX_AMSDU_NUM_MAX), REG_VARIABLE(CFG_STRICT_5GHZ_PREF_BY_MARGIN, WLAN_PARAM_Integer, struct hdd_config, nSelect5GHzMargin, @@ -5322,8 +5322,8 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) pHddCtx->config->goKeepAlivePeriod); hdd_info("Name = [gApKeepAlivePeriod]Value = [%u]", pHddCtx->config->apKeepAlivePeriod); - hdd_info("Name = [gAmsduSupportInAMPDU] Value = [%u] ", - pHddCtx->config->isAmsduSupportInAMPDU); + hdd_info("Name = [max_amsdu_num] Value = [%u] ", + pHddCtx->config->max_amsdu_num); hdd_info("Name = [nSelect5GHzMargin] Value = [%u] ", pHddCtx->config->nSelect5GHzMargin); hdd_info("Name = [gCoalesingInIBSS] Value = [%u] ", @@ -7093,8 +7093,7 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) smeConfig->csrConfig.cc_switch_mode = pConfig->WlanMccToSccSwitchMode; #endif - smeConfig->csrConfig.isAmsduSupportInAMPDU = - pConfig->isAmsduSupportInAMPDU; + smeConfig->csrConfig.max_amsdu_num = pConfig->max_amsdu_num; smeConfig->csrConfig.nSelect5GHzMargin = pConfig->nSelect5GHzMargin; smeConfig->csrConfig.isCoalesingInIBSSAllowed = diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e1e512491a79..14154f6ca151 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3126,6 +3126,17 @@ int hdd_set_fw_params(hdd_adapter_t *adapter) hdd_err("FAILED TO SET RTSCTS Profile ret:%d", ret); goto error; } + + hdd_info("SET AMSDU num %d", hdd_ctx->config->max_amsdu_num); + + ret = wma_cli_set_command(adapter->sessionId, + GEN_VDEV_PARAM_AMSDU, + hdd_ctx->config->max_amsdu_num, + GEN_CMD); + if (ret != 0) { + hdd_err("GEN_VDEV_PARAM_AMSDU set failed %d", ret); + goto error; + } } hdd_set_fw_log_params(hdd_ctx, adapter); diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index d4271216f9ba..c87e83562df7 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -6528,6 +6528,9 @@ static int __iw_setint_getnone(struct net_device *dev, ret = wma_cli_set_command(pAdapter->sessionId, GEN_VDEV_PARAM_AMSDU, set_value, GEN_CMD); + /* Update the stored ini value */ + if (!ret) + hdd_ctx->config->max_amsdu_num = set_value; break; } diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 30e1bce43623..10807799d9f3 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1189,7 +1189,7 @@ typedef struct sSirSmeJoinReq { uint8_t htSmps; bool send_smps_action; - uint8_t isAmsduSupportInAMPDU; + uint8_t max_amsdu_num; tAniBool isWMEenabled; tAniBool isQosEnabled; tAniBool isOSENConnection; diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h index 81bffdc04d19..238b433bca8c 100644 --- a/core/mac/inc/sir_mac_prot_def.h +++ b/core/mac/inc/sir_mac_prot_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1671,6 +1671,7 @@ typedef enum eHTCapability { eHT_PSMP, eHT_DSSS_CCK_MODE_40MHZ, eHT_MAX_AMSDU_LENGTH, + eHT_MAX_AMSDU_NUM, eHT_RX_STBC, eHT_TX_STBC, eHT_SHORT_GI_40MHZ, diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index 7b76ba563e82..a7c3bd71cc72 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -358,7 +358,7 @@ typedef struct sPESession /* Added to Support BT-AMP */ #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM int8_t rssi; #endif - uint8_t isAmsduSupportInAMPDU; + uint8_t max_amsdu_num; uint8_t isCoalesingInIBSSAllowed; tSirHTConfig htConfig; diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index f1f573b282d1..cc0afbc9ea10 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -2776,6 +2776,9 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta, pAddStaParams->maxAmsduSize = lim_get_ht_capability(pMac, eHT_MAX_AMSDU_LENGTH, psessionEntry); + pAddStaParams->max_amsdu_num = + lim_get_ht_capability(pMac, eHT_MAX_AMSDU_NUM, + psessionEntry); pAddStaParams->fDsssCckMode40Mhz = lim_get_ht_capability(pMac, eHT_DSSS_CCK_MODE_40MHZ, psessionEntry); diff --git a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c index 00e22ecef258..383d99506000 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c +++ b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -523,6 +523,9 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac, pAddStaParams->maxAmsduSize = lim_get_ht_capability(pMac, eHT_MAX_AMSDU_LENGTH, psessionEntry); + pAddStaParams->max_amsdu_num = + lim_get_ht_capability(pMac, eHT_MAX_AMSDU_NUM, + psessionEntry); pAddStaParams->fDsssCckMode40Mhz = lim_get_ht_capability(pMac, eHT_DSSS_CCK_MODE_40MHZ, psessionEntry); diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index 7cf6c5eef08e..0a0038392bf4 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -412,6 +412,9 @@ static void mlm_add_sta(tpAniSirGlobal mac_ctx, tpAddStaParams sta_param, sta_param->maxAmsduSize = lim_get_ht_capability(mac_ctx, eHT_MAX_AMSDU_LENGTH, session_entry); + sta_param->max_amsdu_num = + lim_get_ht_capability(mac_ctx, eHT_MAX_AMSDU_NUM, + session_entry); sta_param->fDsssCckMode40Mhz = lim_get_ht_capability(mac_ctx, eHT_DSSS_CCK_MODE_40MHZ, session_entry); diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 84404945d550..d1c2b5fb1cff 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1606,8 +1606,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) FL("SessionId:%d New session created"), session_id); } - session->isAmsduSupportInAMPDU = - sme_join_req->isAmsduSupportInAMPDU; + session->max_amsdu_num = sme_join_req->max_amsdu_num; /* * Store Session related parameters diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 34a4eff050fa..026d7b51e616 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -2938,6 +2938,10 @@ uint8_t lim_get_ht_capability(tpAniSirGlobal pMac, retVal = (uint8_t) macHTCapabilityInfo.maximalAMSDUsize; break; + case eHT_MAX_AMSDU_NUM: + retVal = (uint8_t) psessionEntry->max_amsdu_num; + break; + case eHT_RX_STBC: retVal = (uint8_t) psessionEntry->htConfig.ht_rx_stbc; break; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index cc29ac78b3e0..9c7462ae46b3 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1246,7 +1246,7 @@ typedef struct tagCsrConfigParam { uint8_t scanCfgAgingTime; uint8_t enableTxLdpc; uint8_t enableRxLDPC; - uint8_t isAmsduSupportInAMPDU; + uint8_t max_amsdu_num; uint8_t nSelect5GHzMargin; uint8_t isCoalesingInIBSSAllowed; #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index 86d25ba06b21..23c8dd41fe42 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -619,7 +619,7 @@ typedef struct tagCsrConfig { * Enable/Disable heartbeat offload */ bool enableHeartBeatOffload; - uint8_t isAmsduSupportInAMPDU; + uint8_t max_amsdu_num; uint8_t nSelect5GHzMargin; uint8_t isCoalesingInIBSSAllowed; #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 1cbafe40ddaf..85ab487ff898 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2482,8 +2482,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pMac->roam.configParam.rxLdpcEnable = pParam->enableRxLDPC; pMac->roam.configParam.ignore_peer_erp_info = pParam->ignore_peer_erp_info; - pMac->roam.configParam.isAmsduSupportInAMPDU = - pParam->isAmsduSupportInAMPDU; + pMac->roam.configParam.max_amsdu_num = + pParam->max_amsdu_num; pMac->roam.configParam.nSelect5GHzMargin = pParam->nSelect5GHzMargin; pMac->roam.configParam.isCoalesingInIBSSAllowed = @@ -2733,7 +2733,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) #endif pParam->enableTxLdpc = cfg_params->txLdpcEnable; pParam->enableRxLDPC = cfg_params->rxLdpcEnable; - pParam->isAmsduSupportInAMPDU = cfg_params->isAmsduSupportInAMPDU; + pParam->max_amsdu_num = cfg_params->max_amsdu_num; pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin; pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed; pParam->allowDFSChannelRoam = cfg_params->allowDFSChannelRoam; @@ -14368,8 +14368,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, csr_join_req->send_smps_action = pMac->roam.configParam.send_smps_action; - csr_join_req->isAmsduSupportInAMPDU = - (uint8_t) pMac->roam.configParam.isAmsduSupportInAMPDU; + csr_join_req->max_amsdu_num = + (uint8_t) pMac->roam.configParam.max_amsdu_num; if (pMac->roam.roamSession[sessionId].fWMMConnection) csr_join_req->isWMEenabled = true; diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h index 632d429885f9..5dc73dd03f1b 100644 --- a/core/wma/inc/wma_if.h +++ b/core/wma/inc/wma_if.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -227,6 +227,7 @@ typedef struct sAniProbeRspStruct { * @atimIePresent: Peer Atim Info * @peerAtimWindowLength: peer ATIM Window length * @nss: Return the number of spatial streams supported + * @max_amsdu_num: Maximum number of MSDUs in a tx aggregate frame * * This structure contains parameter required for * add sta request of upper layer. @@ -325,6 +326,7 @@ typedef struct { uint32_t peerAtimWindowLength; uint8_t nonRoamReassoc; uint32_t nss; + uint8_t max_amsdu_num; } tAddStaParams, *tpAddStaParams; /** diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 51b464994178..e4986ea7f97f 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -969,13 +969,20 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma, privcmd->param_value; break; case GEN_VDEV_PARAM_AMSDU: - ret = ol_txrx_aggr_cfg(vdev, 0, privcmd->param_value); - if (ret) - WMA_LOGE("ol_txrx_aggr_cfg set amsdu failed ret %d", - ret); - else - intr[privcmd->param_vdev_id].config. - amsdu = privcmd->param_value; + /* + * Firmware currently does not support set operation + * for AMSDU. It may cause crash if the configuration + * is sent to firmware. + * Firmware enhancement will advertise a service bit + * to enable AMSDU configuration through WMI. Then + * add the WMI command to configure AMSDU parameter. + * For the older chipset that does not advertise the + * service bit, enable the following legacy code: + * ol_txrx_aggr_cfg(vdev, 0, privcmd->param_value); + * intr[privcmd->param_vdev_id].config.amsdu = + * privcmd->param_value; + */ + WMA_LOGE("SET GEN_VDEV_PARAM_AMSDU command is currently not supported"); break; case GEN_PARAM_CRASH_INJECT: if (QDF_GLOBAL_FTM_MODE == cds_get_conparam()) |
