mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
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:
parent
0fde35d906
commit
2118fe4c44
6 changed files with 87 additions and 16 deletions
|
|
@ -8162,34 +8162,34 @@ static int hdd_config_non_agg_retry(struct hdd_adapter *adapter,
|
|||
const struct nlattr *attr)
|
||||
{
|
||||
uint8_t retry;
|
||||
int param_id;
|
||||
|
||||
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,
|
||||
retry, PDEV_CMD);
|
||||
/* Value less than CFG_AGG_RETRY_MIN has side effect to t-put */
|
||||
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,
|
||||
const struct nlattr *attr)
|
||||
{
|
||||
uint8_t retry;
|
||||
int param_id;
|
||||
|
||||
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 */
|
||||
retry = ((retry > 0) && (retry < CFG_AGG_RETRY_MIN)) ?
|
||||
CFG_AGG_RETRY_MIN : retry;
|
||||
param_id = WMI_PDEV_PARAM_AGG_SW_RETRY_TH;
|
||||
retry = (retry > CFG_AGG_RETRY_MAX) ? CFG_AGG_RETRY_MAX :
|
||||
((retry < CFG_AGG_RETRY_MIN) ? CFG_AGG_RETRY_MIN :
|
||||
retry);
|
||||
hdd_debug("sending Agg Retry Th: %d", retry);
|
||||
|
||||
return wma_cli_set_command(adapter->vdev_id, param_id,
|
||||
retry, PDEV_CMD);
|
||||
return sme_set_vdev_sw_retry(adapter->vdev_id, retry,
|
||||
WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR);
|
||||
}
|
||||
|
||||
static int hdd_config_mgmt_retry(struct hdd_adapter *adapter,
|
||||
|
|
|
|||
|
|
@ -270,12 +270,13 @@ typedef enum {
|
|||
#define WIFI_TDLS_EXTERNAL_CONTROL_SUPPORT BIT(1)
|
||||
#define WIIF_TDLS_OFFCHANNEL_SUPPORT BIT(2)
|
||||
|
||||
#define CFG_NON_AGG_RETRY_MAX (31)
|
||||
#define CFG_AGG_RETRY_MAX (31)
|
||||
#define CFG_NON_AGG_RETRY_MAX (64)
|
||||
#define CFG_AGG_RETRY_MAX (64)
|
||||
#define CFG_CTRL_RETRY_MAX (31)
|
||||
#define CFG_PROPAGATION_DELAY_MAX (63)
|
||||
#define CFG_PROPAGATION_DELAY_BASE (64)
|
||||
#define CFG_AGG_RETRY_MIN (5)
|
||||
#define CFG_NON_AGG_RETRY_MIN (5)
|
||||
|
||||
#define PCL_CHANNEL_SUPPORT_GO BIT(0)
|
||||
#define PCL_CHANNEL_SUPPORT_CLI BIT(1)
|
||||
|
|
|
|||
|
|
@ -4160,6 +4160,19 @@ void sme_chan_to_freq_list(
|
|||
const uint8_t *chan_list,
|
||||
uint32_t chan_list_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
|
||||
* @mac_handle: Opaque handle to the MAC context
|
||||
|
|
|
|||
|
|
@ -16847,6 +16847,21 @@ QDF_STATUS sme_register_bcn_recv_pause_ind_cb(mac_handle_t mac_handle,
|
|||
}
|
||||
#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,
|
||||
uint8_t *ie_data, uint16_t ie_len)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -358,6 +358,19 @@ wma_set_tx_rx_aggr_size_per_ac(WMA_HANDLE wma_handle,
|
|||
struct wlan_mlme_qos *qos_aggr,
|
||||
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
|
||||
* @handle: wma handle
|
||||
|
|
|
|||
|
|
@ -4168,6 +4168,35 @@ static QDF_STATUS wma_set_sw_retry_by_qos(
|
|||
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,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_mlme_qos *qos_aggr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue