diff options
| author | CNSS_WLAN Service <cnssbldsw@qualcomm.com> | 2018-04-19 11:43:31 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-19 11:43:31 -0700 |
| commit | 9d89fa6d2ff4a2a29369fb5a1a8801d6e2e07dcc (patch) | |
| tree | 97f1941e014db3adf8f82a88c0759a8b3be03048 | |
| parent | 4ae9f2bf9a3c281886fd62648dc2e64bb03378e0 (diff) | |
| parent | 7be0294c44b0bd71d46a1a8aa469fdcb4128b312 (diff) | |
Merge "qcacld-2.0: Config number of TX sw retry per AC" into wlan-cld2.driver.lnx.1.0
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg.h | 201 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg.c | 73 | ||||
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 26 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 16 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 117 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 10 | ||||
| -rw-r--r-- | CORE/SME/inc/csrApi.h | 8 | ||||
| -rw-r--r-- | CORE/SME/inc/csrInternal.h | 10 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 48 | ||||
| -rw-r--r-- | CORE/WDA/inc/legacy/halMsgApi.h | 8 |
10 files changed, 516 insertions, 1 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index f9fb2c40839b..1a6d05fb5815 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -4152,6 +4152,199 @@ FG_BTC_BT_INTERVAL_PAGE_P2P_STA_DEFAULT #define CFG_RX_AGGREGATION_SIZE_DEFAULT (64) /* + * <ini> + * g_tx_aggr_retry_be - Configure Tx aggregation retry for BE + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_aggr_retry_be gives an option to configure Tx aggregation + * retry for BE. This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_AGGR_SW_RETRY_BE "g_tx_aggr_retry_be" +#define CFG_TX_AGGR_SW_RETRY_BE_MIN (0) +#define CFG_TX_AGGR_SW_RETRY_BE_MAX (16) +#define CFG_TX_AGGR_SW_RETRY_BE_DEFAULT (0) + +/* + * <ini> + * g_tx_aggr_retry_bk - Configure Tx aggregation retry for BK + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_aggr_retry_bk gives an option to configure Tx aggregation + * retry for BK. This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_AGGR_SW_RETRY_BK "g_tx_aggr_retry_bk" +#define CFG_TX_AGGR_SW_RETRY_BK_MIN (0) +#define CFG_TX_AGGR_SW_RETRY_BK_MAX (16) +#define CFG_TX_AGGR_SW_RETRY_BK_DEFAULT (0) + +/* + * <ini> + * g_tx_aggr_retry_vi - Configure Tx aggregation retry for VI + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_aggr_retry_vi gives an option to configure Tx aggregation + * retry for VI. This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_AGGR_SW_RETRY_VI "g_tx_aggr_retry_vi" +#define CFG_TX_AGGR_SW_RETRY_VI_MIN (0) +#define CFG_TX_AGGR_SW_RETRY_VI_MAX (16) +#define CFG_TX_AGGR_SW_RETRY_VI_DEFAULT (0) + +/* + * <ini> + * g_tx_aggr_retry_vo - Configure Tx aggregation retry for VO + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_aggr_retry_vo gives an option to configure Tx aggregation + * retry for VO. This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_AGGR_SW_RETRY_VO "g_tx_aggr_retry_vo" +#define CFG_TX_AGGR_SW_RETRY_VO_MIN (0) +#define CFG_TX_AGGR_SW_RETRY_VO_MAX (16) +#define CFG_TX_AGGR_SW_RETRY_VO_DEFAULT (0) + +/* + * <ini> + * g_tx_non_aggr_retry_be - Configure Tx non-aggregation retry for BE + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_non_aggr_retry_be gives an option to configure Tx + * non-aggregation sw retry for BE. + * This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_NON_AGGR_SW_RETRY_BE "g_tx_non_aggr_retry_be" +#define CFG_TX_NON_AGGR_SW_RETRY_BE_MIN (0) +#define CFG_TX_NON_AGGR_SW_RETRY_BE_MAX (16) +#define CFG_TX_NON_AGGR_SW_RETRY_BE_DEFAULT (0) + +/* + * <ini> + * g_tx_non_aggr_retry_bk - Configure Tx non-aggregation retry for BK + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_non_aggr_retry_bk gives an option to configure Tx non-aggregation + * retry for BK. This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_NON_AGGR_SW_RETRY_BK "g_tx_non_aggr_retry_bk" +#define CFG_TX_NON_AGGR_SW_RETRY_BK_MIN (0) +#define CFG_TX_NON_AGGR_SW_RETRY_BK_MAX (16) +#define CFG_TX_NON_AGGR_SW_RETRY_BK_DEFAULT (0) + +/* + * <ini> + * g_tx_non_aggr_retry_vi - Configure Tx non-aggregation retry for VI + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_non_aggr_retry_vi gives an option to configure Tx non aggregation + * retry for VI. This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_NON_AGGR_SW_RETRY_VI "g_tx_non_aggr_retry_vi" +#define CFG_TX_NON_AGGR_SW_RETRY_VI_MIN (0) +#define CFG_TX_NON_AGGR_SW_RETRY_VI_MAX (16) +#define CFG_TX_NON_AGGR_SW_RETRY_VI_DEFAULT (0) + +/* + * <ini> + * g_tx_non_aggr_retry_vo - Configure Tx aggregation retry for VO + * @Min: 0 + * @Max: 16 + * @Default: 0 + * + * g_tx_non_aggr_retry_vo gives an option to configure Tx non-aggregation + * retry for VO. This can be useful in debugging throughput issues. + * + * Related: None + * + * Supported Feature: STA & SAP + * + * Usage: Internal/External + * + * </ini> + */ + +#define CFG_TX_NON_AGGR_SW_RETRY_VO "g_tx_non_aggr_retry_vo" +#define CFG_TX_NON_AGGR_SW_RETRY_VO_MIN (0) +#define CFG_TX_NON_AGGR_SW_RETRY_VO_MAX (16) +#define CFG_TX_NON_AGGR_SW_RETRY_VO_DEFAULT (0) + +/* * fine timing measurement capability information * * <----- fine_time_meas_cap (in bits) -----> @@ -5928,6 +6121,14 @@ struct hdd_config { bool g_use_otpmac; uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; + uint32_t tx_aggr_sw_retry_threshhold_be; + uint32_t tx_aggr_sw_retry_threshhold_bk; + uint32_t tx_aggr_sw_retry_threshhold_vi; + uint32_t tx_aggr_sw_retry_threshhold_vo; + uint32_t tx_non_aggr_sw_retry_threshhold_be; + uint32_t tx_non_aggr_sw_retry_threshhold_bk; + uint32_t tx_non_aggr_sw_retry_threshhold_vi; + uint32_t tx_non_aggr_sw_retry_threshhold_vo; bool bug_report_for_scan_results; bool enable_edca_params; uint32_t edca_vo_cwmin; diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index e252f04c7070..54c2fd75aae9 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -4804,6 +4804,63 @@ REG_TABLE_ENTRY g_registry_table[] = CFG_RX_AGGREGATION_SIZE_DEFAULT, CFG_RX_AGGREGATION_SIZE_MIN, CFG_RX_AGGREGATION_SIZE_MAX), + + REG_VARIABLE(CFG_TX_AGGR_SW_RETRY_BE, WLAN_PARAM_Integer, + hdd_config_t, tx_aggr_sw_retry_threshhold_be, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_AGGR_SW_RETRY_BE_DEFAULT, + CFG_TX_AGGR_SW_RETRY_BE_MIN, + CFG_TX_AGGR_SW_RETRY_BE_MAX), + + REG_VARIABLE(CFG_TX_AGGR_SW_RETRY_BK, WLAN_PARAM_Integer, + hdd_config_t, tx_aggr_sw_retry_threshhold_bk, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_AGGR_SW_RETRY_BK_DEFAULT, + CFG_TX_AGGR_SW_RETRY_BK_MIN, + CFG_TX_AGGR_SW_RETRY_BK_MAX), + + REG_VARIABLE(CFG_TX_AGGR_SW_RETRY_VI, WLAN_PARAM_Integer, + hdd_config_t, tx_aggr_sw_retry_threshhold_vi, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_AGGR_SW_RETRY_VI_DEFAULT, + CFG_TX_AGGR_SW_RETRY_VI_MIN, + CFG_TX_AGGR_SW_RETRY_VI_MAX), + + REG_VARIABLE(CFG_TX_AGGR_SW_RETRY_VO, WLAN_PARAM_Integer, + hdd_config_t, tx_aggr_sw_retry_threshhold_vo, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_AGGR_SW_RETRY_VO_DEFAULT, + CFG_TX_AGGR_SW_RETRY_VO_MIN, + CFG_TX_AGGR_SW_RETRY_VO_MAX), + + REG_VARIABLE(CFG_TX_NON_AGGR_SW_RETRY_BE, WLAN_PARAM_Integer, + hdd_config_t, tx_non_aggr_sw_retry_threshhold_be, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_BE_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_BE_MIN, + CFG_TX_NON_AGGR_SW_RETRY_BE_MAX), + + REG_VARIABLE(CFG_TX_NON_AGGR_SW_RETRY_BK, WLAN_PARAM_Integer, + hdd_config_t, tx_non_aggr_sw_retry_threshhold_bk, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_BK_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_BK_MIN, + CFG_TX_NON_AGGR_SW_RETRY_BK_MAX), + + REG_VARIABLE(CFG_TX_NON_AGGR_SW_RETRY_VI, WLAN_PARAM_Integer, + hdd_config_t, tx_non_aggr_sw_retry_threshhold_vi, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_VI_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_VI_MIN, + CFG_TX_NON_AGGR_SW_RETRY_VI_MAX), + + REG_VARIABLE(CFG_TX_NON_AGGR_SW_RETRY_VO, WLAN_PARAM_Integer, + hdd_config_t, tx_non_aggr_sw_retry_threshhold_vo, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_VO_DEFAULT, + CFG_TX_NON_AGGR_SW_RETRY_VO_MIN, + CFG_TX_NON_AGGR_SW_RETRY_VO_MAX), + REG_VARIABLE(CFG_CREATE_BUG_REPORT_FOR_SCAN, WLAN_PARAM_Integer, hdd_config_t, bug_report_for_scan_results, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -8282,6 +8339,22 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx ) pHddCtx->cfg_ini->tx_aggregation_size; smeConfig->csrConfig.rx_aggregation_size = pHddCtx->cfg_ini->rx_aggregation_size; + smeConfig->csrConfig.tx_aggr_sw_retry_threshhold_be = + pHddCtx->cfg_ini->tx_aggr_sw_retry_threshhold_be; + smeConfig->csrConfig.tx_aggr_sw_retry_threshhold_bk = + pHddCtx->cfg_ini->tx_aggr_sw_retry_threshhold_bk; + smeConfig->csrConfig.tx_aggr_sw_retry_threshhold_vi = + pHddCtx->cfg_ini->tx_aggr_sw_retry_threshhold_vi; + smeConfig->csrConfig.tx_aggr_sw_retry_threshhold_vo = + pHddCtx->cfg_ini->tx_aggr_sw_retry_threshhold_vo; + smeConfig->csrConfig.tx_non_aggr_sw_retry_threshhold_be = + pHddCtx->cfg_ini->tx_non_aggr_sw_retry_threshhold_be; + smeConfig->csrConfig.tx_non_aggr_sw_retry_threshhold_bk = + pHddCtx->cfg_ini->tx_non_aggr_sw_retry_threshhold_bk; + smeConfig->csrConfig.tx_non_aggr_sw_retry_threshhold_vi = + pHddCtx->cfg_ini->tx_non_aggr_sw_retry_threshhold_vi; + smeConfig->csrConfig.tx_non_aggr_sw_retry_threshhold_vo = + pHddCtx->cfg_ini->tx_non_aggr_sw_retry_threshhold_vo; smeConfig->csrConfig.enable_edca_params = pHddCtx->cfg_ini->enable_edca_params; diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 24564ef25c84..abaab4134f15 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -3666,6 +3666,14 @@ typedef struct sSirSmeAddStaSelfReq uint8_t nss_5g; uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; + uint32_t tx_aggr_sw_retry_threshhold_be; + uint32_t tx_aggr_sw_retry_threshhold_bk; + uint32_t tx_aggr_sw_retry_threshhold_vi; + uint32_t tx_aggr_sw_retry_threshhold_vo; + uint32_t tx_non_aggr_sw_retry_threshhold_be; + uint32_t tx_non_aggr_sw_retry_threshhold_bk; + uint32_t tx_non_aggr_sw_retry_threshhold_vi; + uint32_t tx_non_aggr_sw_retry_threshhold_vo; }tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq; typedef struct sSirSmeDelStaSelfReq @@ -8462,6 +8470,24 @@ struct sir_set_tx_rx_aggregation_size { }; /** + * struct sir_set_tx_sw_retry_threshhold - set sw retry threshhold + * @vdev_id: vdev id of the session + * @retry_type: non-aggregation or aggregation + * @tx_sw_retry_threshhold_be: sw retry threshhold for BE + * @tx_sw_retry_threshhold_bk: sw retry threshhold for BK + * @tx_sw_retry_threshhold_vi: sw retry threshhold for VI + * @tx_sw_retry_threshhold_vo: sw retry threshhold for VO + */ +struct sir_set_tx_sw_retry_threshhold { + uint8_t vdev_id; + uint8_t retry_type; + uint32_t tx_sw_retry_threshhold_be; + uint32_t tx_sw_retry_threshhold_bk; + uint32_t tx_sw_retry_threshhold_vi; + uint32_t tx_sw_retry_threshhold_vo; +}; + +/** * struct sme_update_access_policy_vendor_ie - update vendor ie and access * policy * @msg_type: message id diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 10f886d9fdec..2f3ee4672122 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -5493,6 +5493,22 @@ __limProcessSmeAddStaSelfReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) pAddStaSelfParams->nss_5g = pSmeReq->nss_5g; pAddStaSelfParams->tx_aggregation_size = pSmeReq->tx_aggregation_size; pAddStaSelfParams->rx_aggregation_size = pSmeReq->rx_aggregation_size; + pAddStaSelfParams->tx_aggr_sw_retry_threshhold_be = + pSmeReq->tx_aggr_sw_retry_threshhold_be; + pAddStaSelfParams->tx_aggr_sw_retry_threshhold_bk = + pSmeReq->tx_aggr_sw_retry_threshhold_bk; + pAddStaSelfParams->tx_aggr_sw_retry_threshhold_vi = + pSmeReq->tx_aggr_sw_retry_threshhold_vi; + pAddStaSelfParams->tx_aggr_sw_retry_threshhold_vo = + pSmeReq->tx_aggr_sw_retry_threshhold_vo; + pAddStaSelfParams->tx_non_aggr_sw_retry_threshhold_be = + pSmeReq->tx_non_aggr_sw_retry_threshhold_be; + pAddStaSelfParams->tx_non_aggr_sw_retry_threshhold_bk = + pSmeReq->tx_non_aggr_sw_retry_threshhold_bk; + pAddStaSelfParams->tx_non_aggr_sw_retry_threshhold_vi = + pSmeReq->tx_non_aggr_sw_retry_threshhold_vi; + pAddStaSelfParams->tx_non_aggr_sw_retry_threshhold_vo = + pSmeReq->tx_non_aggr_sw_retry_threshhold_vo; msg.type = SIR_HAL_ADD_STA_SELF_REQ; msg.reserved = 0; diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 3e9004db4d8d..ccbb1bedbc4d 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -10870,6 +10870,7 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle, tSirMacHTCapabilityInfo *phtCapInfo; u_int8_t vdev_id; struct sir_set_tx_rx_aggregation_size tx_rx_aggregation_size; + struct sir_set_tx_sw_retry_threshhold tx_sw_retry_threshhold; if (NULL == mac) { WMA_LOGE("%s: Failed to get mac",__func__); @@ -10958,6 +10959,36 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle, if (status != VOS_STATUS_SUCCESS) WMA_LOGE("failed to set aggregation sizes(err=%d)", status); + tx_sw_retry_threshhold.tx_sw_retry_threshhold_be = + self_sta_req->tx_aggr_sw_retry_threshhold_be; + tx_sw_retry_threshhold.tx_sw_retry_threshhold_bk = + self_sta_req->tx_aggr_sw_retry_threshhold_bk; + tx_sw_retry_threshhold.tx_sw_retry_threshhold_vi = + self_sta_req->tx_aggr_sw_retry_threshhold_vi; + tx_sw_retry_threshhold.tx_sw_retry_threshhold_vo = + self_sta_req->tx_aggr_sw_retry_threshhold_vo; + tx_sw_retry_threshhold.vdev_id = self_sta_req->sessionId; + tx_sw_retry_threshhold.retry_type = WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR; + + status = wma_set_sw_retry_threshhold(&tx_sw_retry_threshhold); + if (status != VOS_STATUS_SUCCESS) + WMA_LOGE("failed to set aggregation retry threshhold(err=%d)", status); + + tx_sw_retry_threshhold.tx_sw_retry_threshhold_be = + self_sta_req->tx_non_aggr_sw_retry_threshhold_be; + tx_sw_retry_threshhold.tx_sw_retry_threshhold_bk = + self_sta_req->tx_non_aggr_sw_retry_threshhold_bk; + tx_sw_retry_threshhold.tx_sw_retry_threshhold_vi = + self_sta_req->tx_non_aggr_sw_retry_threshhold_vi; + tx_sw_retry_threshhold.tx_sw_retry_threshhold_vo = + self_sta_req->tx_non_aggr_sw_retry_threshhold_vo; + tx_sw_retry_threshhold.vdev_id = self_sta_req->sessionId; + tx_sw_retry_threshhold.retry_type = WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR; + + status = wma_set_sw_retry_threshhold(&tx_sw_retry_threshhold); + if (status != VOS_STATUS_SUCCESS) + WMA_LOGE("failed to set non aggregation retry threshhold(err=%d)", status); + switch (self_sta_req->type) { case WMI_VDEV_TYPE_STA: if(wlan_cfgGetInt(mac, WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD, @@ -33172,6 +33203,92 @@ VOS_STATUS wma_set_tx_rx_aggregation_size } /** + * wma_set_sw_retry_threshhold() - set sw retry threshhold per AC for tx + * @tx_sw_retry_threshhold: value needs to set to firmware + * + * This function sends WMI command to set the sw retry threshhold per AC + * for Tx. + * + * Return: VOS_STATUS_SUCCESS on success, error number otherwise + */ +VOS_STATUS wma_set_sw_retry_threshhold( + struct sir_set_tx_sw_retry_threshhold *tx_sw_retry_threshhold) +{ + tp_wma_handle wma_handle; + wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param *cmd; + int32_t len; + wmi_buf_t buf; + u_int8_t *buf_ptr; + int ret; + int queue_num; + uint32_t tx_retry[WMI_AC_MAX]; + + wma_handle = vos_get_context(VOS_MODULE_ID_WDA, + vos_get_global_context(VOS_MODULE_ID_WDA, NULL)); + + if (!tx_sw_retry_threshhold) { + WMA_LOGE("%s: invalid pointer", __func__); + return VOS_STATUS_E_INVAL; + } + + if (!wma_handle) { + WMA_LOGE("%s: WMA context is invald!", __func__); + return VOS_STATUS_E_INVAL; + } + + tx_retry[0] = + tx_sw_retry_threshhold->tx_sw_retry_threshhold_be; + tx_retry[1] = + tx_sw_retry_threshhold->tx_sw_retry_threshhold_bk; + tx_retry[2] = + tx_sw_retry_threshhold->tx_sw_retry_threshhold_vi; + tx_retry[3] = + tx_sw_retry_threshhold->tx_sw_retry_threshhold_vo; + + for (queue_num = 0; queue_num < WMI_AC_MAX; queue_num++) { + if (tx_retry[queue_num] == 0) + continue; + + len = sizeof(*cmd); + buf = wmi_buf_alloc(wma_handle->wmi_handle, len); + + if (!buf) { + WMA_LOGE("%s: Failed allocate wmi buffer", __func__); + return VOS_STATUS_E_NOMEM; + } + + buf_ptr = (u_int8_t *)wmi_buf_data(buf); + cmd = + (wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param *)buf_ptr; + + WMITLV_SET_HDR(&cmd->tlv_header, + WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param, + WMITLV_GET_STRUCT_TLVLEN( + wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param)); + + cmd->vdev_id = tx_sw_retry_threshhold->vdev_id; + cmd->ac_type = queue_num; + cmd->sw_retry_type = tx_sw_retry_threshhold->retry_type; + cmd->sw_retry_th = tx_retry[queue_num]; + + WMA_LOGD("queue: %d type: %d threadhold: %d vdev: %d", + queue_num, cmd->sw_retry_type, + cmd->sw_retry_th, cmd->vdev_id); + + ret = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len, + WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID); + if (ret) { + WMA_LOGE("%s: Failed to send retry threashhold command", + __func__); + wmi_buf_free(buf); + return VOS_STATUS_E_FAILURE; + } + } + + return VOS_STATUS_SUCCESS; +} + +/** * wma_set_powersave_config() - update power save config in wma * @val: new power save value * @vdev_id: vdev id diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 2e1910df7756..157c2265d4ee 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -644,6 +644,14 @@ struct wma_txrx_node { uint8_t nss_5g; uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; + uint32_t tx_aggr_sw_retry_threshhold_be; + uint32_t tx_aggr_sw_retry_threshhold_bk; + uint32_t tx_aggr_sw_retry_threshhold_vi; + uint32_t tx_aggr_sw_retry_threshhold_vo; + uint32_t tx_non_aggr_sw_retry_threshhold_be; + uint32_t tx_non_aggr_sw_retry_threshhold_bk; + uint32_t tx_non_aggr_sw_retry_threshhold_vi; + uint32_t tx_non_aggr_sw_retry_threshhold_vo; uint8_t wep_default_key_idx; bool is_vdev_valid; @@ -1843,6 +1851,8 @@ uint32_t wma_get_vht_ch_width(void); VOS_STATUS wma_get_wakelock_stats(struct sir_wake_lock_stats *wake_lock_stats); VOS_STATUS wma_set_tx_rx_aggregation_size (struct sir_set_tx_rx_aggregation_size *tx_rx_aggregation_size); +VOS_STATUS wma_set_sw_retry_threshhold + (struct sir_set_tx_sw_retry_threshhold *tx_sw_retry_threshhold); VOS_STATUS wma_set_powersave_config(uint8_t vdev_id, uint8_t val); /** diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index 6327daef9e28..a39abff69ee7 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -1388,6 +1388,14 @@ typedef struct tagCsrConfigParam bool enable_fatal_event; uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; + uint32_t tx_aggr_sw_retry_threshhold_be; + uint32_t tx_aggr_sw_retry_threshhold_bk; + uint32_t tx_aggr_sw_retry_threshhold_vi; + uint32_t tx_aggr_sw_retry_threshhold_vo; + uint32_t tx_non_aggr_sw_retry_threshhold_be; + uint32_t tx_non_aggr_sw_retry_threshhold_bk; + uint32_t tx_non_aggr_sw_retry_threshhold_vi; + uint32_t tx_non_aggr_sw_retry_threshhold_vo; bool enable_edca_params; uint32_t edca_vo_cwmin; uint32_t edca_vi_cwmin; diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h index 8ac1883f2207..33d5d8c20731 100644 --- a/CORE/SME/inc/csrInternal.h +++ b/CORE/SME/inc/csrInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -714,6 +714,14 @@ typedef struct tagCsrConfig bool enable_fatal_event; uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; + uint32_t tx_aggr_sw_retry_threshhold_be; + uint32_t tx_aggr_sw_retry_threshhold_bk; + uint32_t tx_aggr_sw_retry_threshhold_vi; + uint32_t tx_aggr_sw_retry_threshhold_vo; + uint32_t tx_non_aggr_sw_retry_threshhold_be; + uint32_t tx_non_aggr_sw_retry_threshhold_bk; + uint32_t tx_non_aggr_sw_retry_threshhold_vi; + uint32_t tx_non_aggr_sw_retry_threshhold_vo; bool enable_edca_params; uint32_t edca_vo_cwmin; uint32_t edca_vi_cwmin; diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index bfaadaffccc6..25bbb977eb9e 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -2111,6 +2111,22 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa pParam->tx_aggregation_size; pMac->roam.configParam.rx_aggregation_size = pParam->rx_aggregation_size; + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_be = + pParam->tx_aggr_sw_retry_threshhold_be; + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_bk = + pParam->tx_aggr_sw_retry_threshhold_bk; + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_vi = + pParam->tx_aggr_sw_retry_threshhold_vi; + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_vo = + pParam->tx_aggr_sw_retry_threshhold_vo; + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_be = + pParam->tx_non_aggr_sw_retry_threshhold_be; + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_bk = + pParam->tx_non_aggr_sw_retry_threshhold_bk; + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_vi = + pParam->tx_non_aggr_sw_retry_threshhold_vi; + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_vo = + pParam->tx_non_aggr_sw_retry_threshhold_vo; pMac->roam.configParam.gStaLocalEDCAEnable = pParam->gStaLocalEDCAEnable; @@ -2342,6 +2358,22 @@ eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pMac->roam.configParam.tx_aggregation_size; pParam->rx_aggregation_size = pMac->roam.configParam.rx_aggregation_size; + pParam->tx_aggr_sw_retry_threshhold_be = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_be; + pParam->tx_aggr_sw_retry_threshhold_bk = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_bk; + pParam->tx_aggr_sw_retry_threshhold_vi = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_vi; + pParam->tx_aggr_sw_retry_threshhold_vo = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_vo; + pParam->tx_non_aggr_sw_retry_threshhold_be = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_be; + pParam->tx_non_aggr_sw_retry_threshhold_bk = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_bk; + pParam->tx_non_aggr_sw_retry_threshhold_vi = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_vi; + pParam->tx_non_aggr_sw_retry_threshhold_vo = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_vo; status = eHAL_STATUS_SUCCESS; } return (status); @@ -16316,6 +16348,22 @@ eHalStatus csrSendMBAddSelfStaReqMsg( tpAniSirGlobal pMac, pMsg->nss_5g = nss_5g; pMsg->tx_aggregation_size = pMac->roam.configParam.tx_aggregation_size; pMsg->rx_aggregation_size = pMac->roam.configParam.rx_aggregation_size; + pMsg->tx_aggr_sw_retry_threshhold_be = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_be; + pMsg->tx_aggr_sw_retry_threshhold_bk = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_bk; + pMsg->tx_aggr_sw_retry_threshhold_vi = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_vi; + pMsg->tx_aggr_sw_retry_threshhold_vo = + pMac->roam.configParam.tx_aggr_sw_retry_threshhold_vo; + pMsg->tx_non_aggr_sw_retry_threshhold_be = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_be; + pMsg->tx_non_aggr_sw_retry_threshhold_bk = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_bk; + pMsg->tx_non_aggr_sw_retry_threshhold_vi = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_vi; + pMsg->tx_non_aggr_sw_retry_threshhold_vo = + pMac->roam.configParam.tx_non_aggr_sw_retry_threshhold_vo; smsLog( pMac, LOG1, FL("selfMac="MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pMsg->selfMacAddr)); status = palSendMBMessage(pMac->hHdd, pMsg); diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h index 3de568bd1de8..8cb47207c839 100644 --- a/CORE/WDA/inc/legacy/halMsgApi.h +++ b/CORE/WDA/inc/legacy/halMsgApi.h @@ -1314,6 +1314,14 @@ typedef struct sAddStaSelfParams uint8_t nss_5g; uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; + uint32_t tx_aggr_sw_retry_threshhold_be; + uint32_t tx_aggr_sw_retry_threshhold_bk; + uint32_t tx_aggr_sw_retry_threshhold_vi; + uint32_t tx_aggr_sw_retry_threshhold_vo; + uint32_t tx_non_aggr_sw_retry_threshhold_be; + uint32_t tx_non_aggr_sw_retry_threshhold_bk; + uint32_t tx_non_aggr_sw_retry_threshhold_vi; + uint32_t tx_non_aggr_sw_retry_threshhold_vo; }tAddStaSelfParams, *tpAddStaSelfParams; /** |
