|
@@ -7918,6 +7918,71 @@ QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * wma_set_tx_rx_aggregation_size() - sets tx rx aggregation sizes
|
|
|
+ * @tx_rx_aggregation_size: aggregation size parameters
|
|
|
+ *
|
|
|
+ * This function sets tx rx aggregation sizes
|
|
|
+ *
|
|
|
+ * Return: VOS_STATUS_SUCCESS on success, error number otherwise
|
|
|
+ */
|
|
|
+QDF_STATUS wma_set_tx_rx_aggregation_size(
|
|
|
+ struct sir_set_tx_rx_aggregation_size *tx_rx_aggregation_size)
|
|
|
+{
|
|
|
+ tp_wma_handle wma_handle;
|
|
|
+ wmi_vdev_set_custom_aggr_size_cmd_fixed_param *cmd;
|
|
|
+ int32_t len;
|
|
|
+ wmi_buf_t buf;
|
|
|
+ u_int8_t *buf_ptr;
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
|
|
+
|
|
|
+ if (!tx_rx_aggregation_size) {
|
|
|
+ WMA_LOGE("%s: invalid pointer", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!wma_handle) {
|
|
|
+ WMA_LOGE("%s: WMA context is invald!", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ len = sizeof(*cmd);
|
|
|
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
|
|
|
+
|
|
|
+ if (!buf) {
|
|
|
+ WMA_LOGE("%s: Failed allocate wmi buffer", __func__);
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
+ }
|
|
|
+
|
|
|
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
|
|
|
+ cmd = (wmi_vdev_set_custom_aggr_size_cmd_fixed_param *) buf_ptr;
|
|
|
+
|
|
|
+ WMITLV_SET_HDR(&cmd->tlv_header,
|
|
|
+ WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param,
|
|
|
+ WMITLV_GET_STRUCT_TLVLEN(
|
|
|
+ wmi_vdev_set_custom_aggr_size_cmd_fixed_param));
|
|
|
+
|
|
|
+ cmd->vdev_id = tx_rx_aggregation_size->vdev_id;
|
|
|
+ cmd->tx_aggr_size = tx_rx_aggregation_size->tx_aggregation_size;
|
|
|
+ cmd->rx_aggr_size = tx_rx_aggregation_size->rx_aggregation_size;
|
|
|
+
|
|
|
+ WMA_LOGI("tx aggr: %d rx aggr: %d vdev: %d",
|
|
|
+ cmd->tx_aggr_size, cmd->rx_aggr_size, cmd->vdev_id);
|
|
|
+
|
|
|
+ ret = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len,
|
|
|
+ WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
|
|
|
+ if (ret) {
|
|
|
+ WMA_LOGE("%s: Failed to send aggregation size command",
|
|
|
+ __func__);
|
|
|
+ wmi_buf_free(buf);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* wma_p2p_lo_start() - P2P listen offload start
|
|
|
* @params: p2p listen offload parameters
|