qcacmn: Add change to send custom AMPDU/AMSDU aggr size

Add change to support sending AMPDU/AMSDU custom aggregation
size to FW using converged MLME and target_if framework.

Change-Id: Icf665e3bf30c5ef5903342264e89776611c7774a
CRs-Fixed: 2430278
This commit is contained in:
Naga 2019-04-05 16:18:43 +05:30 • committed by nshrivas
commit 613a74a6cf
6 changed files with 69 additions and 5 deletions

View file

@ -481,3 +481,47 @@ QDF_STATUS vdev_mgr_multiple_restart_send(struct wlan_objmgr_pdev *pdev,
}
qdf_export_symbol(vdev_mgr_multiple_restart_send);
static QDF_STATUS vdev_mgr_set_custom_aggr_size_param_update(
struct vdev_mlme_obj *mlme_obj,
struct set_custom_aggr_size_params *param,
bool is_amsdu)
{
struct wlan_objmgr_vdev *vdev;
vdev = mlme_obj->vdev;
if (!vdev) {
mlme_err("VDEV is NULL");
return QDF_STATUS_E_INVAL;
}
param->aggr_type = is_amsdu ? WLAN_MLME_CUSTOM_AGGR_TYPE_AMSDU
: WLAN_MLME_CUSTOM_AGGR_TYPE_AMPDU;
/*
* We are only setting TX params, therefore
* we are disabling rx_aggr_size
*/
param->rx_aggr_size_disable = true;
param->tx_aggr_size = is_amsdu ? mlme_obj->mgmt.generic.amsdu
: mlme_obj->mgmt.generic.ampdu;
param->vdev_id = wlan_vdev_get_id(vdev);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS vdev_mgr_set_custom_aggr_size_send(
struct vdev_mlme_obj *vdev_mlme,
bool is_amsdu)
{
QDF_STATUS status;
struct set_custom_aggr_size_params param = {0};
status = vdev_mgr_set_custom_aggr_size_param_update(vdev_mlme,
&param, is_amsdu);
if (QDF_IS_STATUS_ERROR(status)) {
mlme_err("Param Update Error: %d", status);
return status;
}
return tgt_vdev_mgr_set_custom_aggr_size_send(vdev_mlme, &param);
}

View file

@ -145,14 +145,12 @@ QDF_STATUS vdev_mgr_sifs_trigger_send(
* vdev_mgr_set_custom_aggr_size_cmd_send() – MLME API to send custom aggr
* size
* @mlme_obj: pointer to vdev_mlme_obj
* @val: aggregate size value
* @is_amsdu: boolean to indicate value corresponds to amsdu/ampdu
*
* Return: QDF_STATUS - Success or Failure
*/
QDF_STATUS vdev_mgr_set_custom_aggr_size_send(
struct vdev_mlme_obj *mlme_obj,
uint32_t val, bool is_amsdu);
struct vdev_mlme_obj *mlme_obj, bool is_amsdu);
/**
* vdev_mgr_onfig_ratemask_cmd_send() – MLME API to send ratemask

View file

@ -94,6 +94,18 @@ enum wlan_mlme_host_start_event_param {
WLAN_MLME_HOST_VDEV_RESTART_RESP_EVENT,
};
/**
* enum wlan_mlme_custom_aggr_type: custon aggregate type
* @WLAN_MLME_CUSTOM_AGGR_TYPE_AMPDU: A-MPDU aggregation
* @WLAN_MLME_CUSTOM_AGGR_TYPE_AMSDU: A-MSDU aggregation
* @WLAN_MLME_CUSTOM_AGGR_TYPE_MAX: Max type
*/
enum wlan_mlme_custom_aggr_type {
WLAN_MLME_CUSTOM_AGGR_TYPE_AMPDU = 0,
WLAN_MLME_CUSTOM_AGGR_TYPE_AMSDU = 1,
WLAN_MLME_CUSTOM_AGGR_TYPE_MAX,
};
/**
* struct sta_ps_params - sta ps cmd parameter
* @vdev_id: vdev id

View file

@ -59,7 +59,9 @@ enum wlan_mlme_cfg_id {
WLAN_MLME_CFG_TX_PWR_LIMIT,
WLAN_MLME_CFG_TX_POWER,
WLAN_MLME_CFG_AMPDU,
WLAN_MLME_CFG_AMPDU_SIZE,
WLAN_MLME_CFG_AMSDU,
WLAN_MLME_CFG_AMSDU_SIZE,
WLAN_MLME_CFG_SSID,
WLAN_MLME_CFG_SSID_LEN,
WLAN_MLME_CFG_OP_MODE,

View file

@ -201,11 +201,17 @@ wlan_util_vdev_mlme_set_param(struct vdev_mlme_obj *vdev_mlme,
mlme_cfg.value = (mlme_cfg.value << 8) + 0xFF;
is_wmi_cmd = 1;
break;
case WLAN_MLME_CFG_AMPDU_SIZE:
mlme_mgmt->generic.ampdu = mlme_cfg.value;
break;
case WLAN_MLME_CFG_AMSDU:
mlme_mgmt->generic.amsdu = mlme_cfg.value;
mlme_cfg.value = (mlme_cfg.value << 8) + 0xFF;
is_wmi_cmd = 1;
break;
case WLAN_MLME_CFG_AMSDU_SIZE:
mlme_mgmt->generic.amsdu = mlme_cfg.value;
break;
case WLAN_MLME_CFG_BMISS_FIRST_BCNT:
inactivity_params->bmiss_first_bcnt = mlme_cfg.value;
break;

View file

@ -3041,17 +3041,19 @@ struct set_custom_aggr_size_params {
};
#endif
#ifndef CMN_VDEV_MGR_TGT_IF_ENABLE
/**
* enum wmi_host_custom_aggr_type_t: custon aggregate type
* enum wmi_host_custom_aggr_type: custon aggregate type
* @WMI_HOST_CUSTOM_AGGR_TYPE_AMPDU: A-MPDU aggregation
* @WMI_HOST_CUSTOM_AGGR_TYPE_AMSDU: A-MSDU aggregation
* @WMI_HOST_CUSTOM_AGGR_TYPE_MAX: Max type
*/
enum wmi_host_custom_aggr_type_t {
enum wmi_host_custom_aggr_type {
WMI_HOST_CUSTOM_AGGR_TYPE_AMPDU = 0,
WMI_HOST_CUSTOM_AGGR_TYPE_AMSDU = 1,
WMI_HOST_CUSTOM_AGGR_TYPE_MAX,
};
#endif
/*
* msduq_update_params - MSDUQ update param structure