qcacld-3.0: Vendor cmd to set SW retry threshold value

The following vendor cmd can be used to set the
sw retry threshold per vdev for all AC:

Aggresive:     QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY
Non-Aggresive: QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY

Change-Id: I49d88ae1f3f6142d8a420fd92f6f40bf3aad03e6
CRs-Fixed: 2945913
This commit is contained in:
Utkarsh Bhatnagar
2021-05-18 03:26:11 +05:30
committed by Madan Koyyalamudi
parent 277b7678bf
commit d86ace0aea
6 changed files with 87 additions and 16 deletions

View File

@@ -8267,34 +8267,34 @@ static int hdd_config_non_agg_retry(struct hdd_adapter *adapter,
const struct nlattr *attr) const struct nlattr *attr)
{ {
uint8_t retry; uint8_t retry;
int param_id;
retry = nla_get_u8(attr); retry = nla_get_u8(attr);
retry = retry > CFG_NON_AGG_RETRY_MAX ?
CFG_NON_AGG_RETRY_MAX : retry;
param_id = WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH;
return wma_cli_set_command(adapter->vdev_id, param_id, /* Value less than CFG_AGG_RETRY_MIN has side effect to t-put */
retry, PDEV_CMD); retry = (retry > CFG_NON_AGG_RETRY_MAX) ? CFG_NON_AGG_RETRY_MAX :
((retry < CFG_NON_AGG_RETRY_MIN) ? CFG_NON_AGG_RETRY_MIN :
retry);
hdd_debug("sending Non-Agg Retry Th: %d", retry);
return sme_set_vdev_sw_retry(adapter->vdev_id, retry,
WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR);
} }
static int hdd_config_agg_retry(struct hdd_adapter *adapter, static int hdd_config_agg_retry(struct hdd_adapter *adapter,
const struct nlattr *attr) const struct nlattr *attr)
{ {
uint8_t retry; uint8_t retry;
int param_id;
retry = nla_get_u8(attr); retry = nla_get_u8(attr);
retry = retry > CFG_AGG_RETRY_MAX ?
CFG_AGG_RETRY_MAX : retry;
/* Value less than CFG_AGG_RETRY_MIN has side effect to t-put */ /* Value less than CFG_AGG_RETRY_MIN has side effect to t-put */
retry = ((retry > 0) && (retry < CFG_AGG_RETRY_MIN)) ? retry = (retry > CFG_AGG_RETRY_MAX) ? CFG_AGG_RETRY_MAX :
CFG_AGG_RETRY_MIN : retry; ((retry < CFG_AGG_RETRY_MIN) ? CFG_AGG_RETRY_MIN :
param_id = WMI_PDEV_PARAM_AGG_SW_RETRY_TH; retry);
hdd_debug("sending Agg Retry Th: %d", retry);
return wma_cli_set_command(adapter->vdev_id, param_id, return sme_set_vdev_sw_retry(adapter->vdev_id, retry,
retry, PDEV_CMD); WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR);
} }
static int hdd_config_mgmt_retry(struct hdd_adapter *adapter, static int hdd_config_mgmt_retry(struct hdd_adapter *adapter,

View File

@@ -270,12 +270,13 @@ typedef enum {
#define WIFI_TDLS_EXTERNAL_CONTROL_SUPPORT BIT(1) #define WIFI_TDLS_EXTERNAL_CONTROL_SUPPORT BIT(1)
#define WIIF_TDLS_OFFCHANNEL_SUPPORT BIT(2) #define WIIF_TDLS_OFFCHANNEL_SUPPORT BIT(2)
#define CFG_NON_AGG_RETRY_MAX (31) #define CFG_NON_AGG_RETRY_MAX (64)
#define CFG_AGG_RETRY_MAX (31) #define CFG_AGG_RETRY_MAX (64)
#define CFG_CTRL_RETRY_MAX (31) #define CFG_CTRL_RETRY_MAX (31)
#define CFG_PROPAGATION_DELAY_MAX (63) #define CFG_PROPAGATION_DELAY_MAX (63)
#define CFG_PROPAGATION_DELAY_BASE (64) #define CFG_PROPAGATION_DELAY_BASE (64)
#define CFG_AGG_RETRY_MIN (5) #define CFG_AGG_RETRY_MIN (5)
#define CFG_NON_AGG_RETRY_MIN (5)
#define CFG_NO_SUPPORT_UL_MUMIMO (0) #define CFG_NO_SUPPORT_UL_MUMIMO (0)
#define CFG_FULL_BW_SUPPORT_UL_MUMIMO (1) #define CFG_FULL_BW_SUPPORT_UL_MUMIMO (1)

View File

@@ -4259,6 +4259,19 @@ QDF_STATUS sme_register_bcn_recv_pause_ind_cb(mac_handle_t mac_handle,
QDF_STATUS sme_set_disconnect_ies(mac_handle_t mac_handle, uint8_t vdev_id, QDF_STATUS sme_set_disconnect_ies(mac_handle_t mac_handle, uint8_t vdev_id,
uint8_t *ie_data, uint16_t ie_len); uint8_t *ie_data, uint16_t ie_len);
/**
* sme_set_vdev_sw_retry() - set sw retry threshold per vdev
* @vdev_id: vdev id
* @sw_retry_count: sw retry number
* @retry_type: SW vdev retry type
*
* This function calls WMA api to send the sw retry threshold per vdev.
*
* Return: QDF_STATUS.
*/
QDF_STATUS sme_set_vdev_sw_retry(uint8_t vdev_id, uint8_t sw_retry_count,
wmi_vdev_custom_sw_retry_type_t sw_retry_type);
/** /**
* sme_set_roam_config_enable() - Cache roam config status in SME * sme_set_roam_config_enable() - Cache roam config status in SME
* @mac_handle: Opaque handle to the MAC context * @mac_handle: Opaque handle to the MAC context

View File

@@ -16255,6 +16255,21 @@ QDF_STATUS sme_register_bcn_recv_pause_ind_cb(mac_handle_t mac_handle,
} }
#endif #endif
QDF_STATUS sme_set_vdev_sw_retry(uint8_t vdev_id, uint8_t sw_retry_count,
wmi_vdev_custom_sw_retry_type_t sw_retry_type)
{
QDF_STATUS status;
status = wma_set_vdev_sw_retry_th(vdev_id, sw_retry_count,
sw_retry_type);
if (QDF_IS_STATUS_ERROR(status)) {
sme_err("Failed to set retry count for vdev: %d", vdev_id);
return status;
}
return QDF_STATUS_SUCCESS;
}
QDF_STATUS sme_set_disconnect_ies(mac_handle_t mac_handle, uint8_t vdev_id, QDF_STATUS sme_set_disconnect_ies(mac_handle_t mac_handle, uint8_t vdev_id,
uint8_t *ie_data, uint16_t ie_len) uint8_t *ie_data, uint16_t ie_len)
{ {

View File

@@ -358,6 +358,19 @@ wma_set_tx_rx_aggr_size_per_ac(WMA_HANDLE wma_handle,
struct wlan_mlme_qos *qos_aggr, struct wlan_mlme_qos *qos_aggr,
wmi_vdev_custom_aggr_type_t aggr_type); wmi_vdev_custom_aggr_type_t aggr_type);
/**
* wma_set_sw_retry_threshold() - set sw retry threshold per vdev
* @vdev_id: vdev id
* @sw_retry_count: sw retry number
* @retry_type: SW vdev retry type
*
* This function sends WMI command to set the sw retry threshold per vdev.
*
* Return: QDF_STATUS.
*/
QDF_STATUS wma_set_vdev_sw_retry_th(uint8_t vdev_id, uint8_t sw_retry_count,
wmi_vdev_custom_sw_retry_type_t retry_type);
/** /**
* wma_set_sw_retry_threshold_per_ac() - set sw retry threshold per AC for tx * wma_set_sw_retry_threshold_per_ac() - set sw retry threshold per AC for tx
* @handle: wma handle * @handle: wma handle

View File

@@ -4237,6 +4237,35 @@ static QDF_STATUS wma_set_sw_retry_by_qos(
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
QDF_STATUS wma_set_vdev_sw_retry_th(uint8_t vdev_id, uint8_t sw_retry_count,
wmi_vdev_custom_sw_retry_type_t retry_type)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
tp_wma_handle wma_handle;
uint32_t queue_num;
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
if (!wma_handle)
return QDF_STATUS_E_FAILURE;
for (queue_num = 0; queue_num < WMI_AC_MAX; queue_num++) {
if (sw_retry_count == 0)
continue;
status = wma_set_sw_retry_by_qos(wma_handle,
vdev_id,
retry_type,
queue_num,
sw_retry_count);
if (QDF_IS_STATUS_ERROR(status))
return status;
}
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wma_set_sw_retry_threshold_per_ac(WMA_HANDLE handle, QDF_STATUS wma_set_sw_retry_threshold_per_ac(WMA_HANDLE handle,
uint8_t vdev_id, uint8_t vdev_id,
struct wlan_mlme_qos *qos_aggr) struct wlan_mlme_qos *qos_aggr)