qcacmn: Add wmi APIs for multi rx reorder queue setup
Add wmi APIs for multi rx reorder queue setup to save setup time. Change-Id: I5a4c89b88b4ba076d1883edc44b075fbceca27eb CRs-Fixed: 3659035
This commit is contained in:

committed by
Ravindra Konda

parent
6dc43655d9
commit
7f2e70fcec
@@ -3755,6 +3755,18 @@ QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct rx_reorder_queue_setup_params *param);
|
||||
|
||||
/**
|
||||
* wmi_unified_peer_multi_rx_reorder_queue_setup_send() - send
|
||||
* multi rx reorder queue setup command to fw
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: Multi rx reorder queue setup parameters
|
||||
*
|
||||
* Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_peer_multi_rx_reorder_queue_setup_send(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct multi_rx_reorder_queue_setup_params *param);
|
||||
|
||||
/**
|
||||
* wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
|
||||
* remove command to fw
|
||||
|
@@ -4336,7 +4336,39 @@ struct rx_reorder_queue_setup_params {
|
||||
uint16_t queue_no;
|
||||
uint8_t ba_window_size_valid;
|
||||
uint16_t ba_window_size;
|
||||
};
|
||||
|
||||
#define WMI_MAX_TIDS 17 /* This should be kept the same as (C)DP_MAX_TIDS */
|
||||
|
||||
/**
|
||||
* struct rx_reorder_queue_params_list - Specific params for each tid
|
||||
* @hw_qdesc_paddr: 64 bits of queue desc address
|
||||
* @queue_no: 16-bit number assigned by host for queue
|
||||
* @ba_window_size: BA window size
|
||||
* @ba_window_size_valid: BA window size validity flag
|
||||
*/
|
||||
struct rx_reorder_queue_params_list {
|
||||
qdf_dma_addr_t hw_qdesc_paddr;
|
||||
uint16_t queue_no;
|
||||
uint16_t ba_window_size;
|
||||
uint8_t ba_window_size_valid;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct multi_rx_reorder_queue_setup_params - Multi reorder
|
||||
* queue setup params
|
||||
* @queue_params_list: An array for recording the specific params for each tid.
|
||||
* @peer_macaddr: Peer mac address
|
||||
* @tid_bitmap: A group of TIDs to be set at a time
|
||||
* @tid_num: The number of TIDs to be set
|
||||
* @vdev_id: vdev id
|
||||
*/
|
||||
struct multi_rx_reorder_queue_setup_params {
|
||||
struct rx_reorder_queue_params_list queue_params_list[WMI_MAX_TIDS];
|
||||
uint8_t *peer_macaddr;
|
||||
uint32_t tid_bitmap;
|
||||
uint8_t tid_num;
|
||||
uint16_t vdev_id;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -6484,6 +6516,7 @@ typedef enum {
|
||||
#ifdef WLAN_FEATURE_LL_LT_SAP
|
||||
wmi_service_xpan_support,
|
||||
#endif
|
||||
wmi_service_multiple_reorder_queue_setup_support,
|
||||
wmi_services_max,
|
||||
} wmi_conv_service_ids;
|
||||
#define WMI_SERVICE_UNAVAILABLE 0xFFFF
|
||||
|
@@ -2251,6 +2251,9 @@ QDF_STATUS (*send_action_oui_cmd)(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS (*send_peer_rx_reorder_queue_setup_cmd)(wmi_unified_t wmi_handle,
|
||||
struct rx_reorder_queue_setup_params *param);
|
||||
|
||||
QDF_STATUS (*send_peer_multi_rx_reorder_queue_setup_cmd)(wmi_unified_t wmi_hdl,
|
||||
struct multi_rx_reorder_queue_setup_params *param);
|
||||
|
||||
QDF_STATUS (*send_peer_rx_reorder_queue_remove_cmd)(wmi_unified_t wmi_handle,
|
||||
struct rx_reorder_queue_remove_params *param);
|
||||
|
||||
|
@@ -251,6 +251,18 @@ QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_unified_peer_multi_rx_reorder_queue_setup_send(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct multi_rx_reorder_queue_setup_params *param)
|
||||
{
|
||||
if (wmi_handle->ops->send_peer_multi_rx_reorder_queue_setup_cmd)
|
||||
return wmi_handle->ops->
|
||||
send_peer_multi_rx_reorder_queue_setup_cmd(
|
||||
wmi_handle, param);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct rx_reorder_queue_remove_params *param)
|
||||
|
@@ -2021,6 +2021,93 @@ QDF_STATUS send_peer_rx_reorder_queue_setup_cmd_tlv(wmi_unified_t wmi,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_peer_multi_rx_reorder_queue_setup_cmd_tlv() - Send multi rx reorder
|
||||
* setup cmd to fw.
|
||||
* @wmi: wmi handle
|
||||
* @param: Multi rx reorder queue setup parameters
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
static
|
||||
QDF_STATUS send_peer_multi_rx_reorder_queue_setup_cmd_tlv(wmi_unified_t wmi,
|
||||
struct multi_rx_reorder_queue_setup_params *param)
|
||||
{
|
||||
wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param *cmd;
|
||||
wmi_buf_t buf;
|
||||
uint8_t *buf_ptr;
|
||||
wmi_peer_per_reorder_q_setup_params_t *q_params;
|
||||
struct rx_reorder_queue_params_list *param_ptr;
|
||||
int tid;
|
||||
int32_t len;
|
||||
|
||||
len = sizeof(wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param) +
|
||||
WMI_TLV_HDR_SIZE +
|
||||
sizeof(wmi_peer_per_reorder_q_setup_params_t) * param->tid_num;
|
||||
|
||||
buf = wmi_buf_alloc(wmi, len);
|
||||
if (!buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
||||
cmd = (wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param *)
|
||||
wmi_buf_data(buf);
|
||||
|
||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param));
|
||||
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(param->peer_macaddr, &cmd->peer_macaddr);
|
||||
cmd->vdev_id = param->vdev_id;
|
||||
|
||||
buf_ptr +=
|
||||
sizeof(wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param);
|
||||
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
||||
sizeof(wmi_peer_per_reorder_q_setup_params_t) *
|
||||
param->tid_num);
|
||||
|
||||
q_params = (wmi_peer_per_reorder_q_setup_params_t *)(buf_ptr +
|
||||
WMI_TLV_HDR_SIZE);
|
||||
|
||||
for (tid = 0; tid < WMI_MAX_TIDS; tid++) {
|
||||
if (!(BIT(tid) & param->tid_bitmap))
|
||||
continue;
|
||||
|
||||
WMITLV_SET_HDR(q_params,
|
||||
WMITLV_TAG_STRUC_wmi_peer_per_reorder_q_setup_params_t,
|
||||
WMITLV_GET_STRUCT_TLVLEN(
|
||||
wmi_peer_per_reorder_q_setup_params_t));
|
||||
|
||||
param_ptr = ¶m->queue_params_list[tid];
|
||||
q_params->tid = tid;
|
||||
q_params->queue_ptr_lo = param_ptr->hw_qdesc_paddr & 0xffffffff;
|
||||
q_params->queue_ptr_hi =
|
||||
(uint64_t)param_ptr->hw_qdesc_paddr >> 32;
|
||||
q_params->queue_no = param_ptr->queue_no;
|
||||
q_params->ba_window_size_valid =
|
||||
param_ptr->ba_window_size_valid;
|
||||
q_params->ba_window_size = param_ptr->ba_window_size;
|
||||
q_params++;
|
||||
}
|
||||
|
||||
wmi_mtrace(WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
|
||||
cmd->vdev_id, 0);
|
||||
if (wmi_unified_cmd_send(wmi, buf, len,
|
||||
WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID)) {
|
||||
wmi_err("Send WMI_PEER_MULTILE_REORDER_QUEUE_SETUP_CMDID fail");
|
||||
wmi_buf_free(buf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
wmi_debug("peer_mac "QDF_MAC_ADDR_FMT" vdev_id %d, bitmap 0x%x, num %d",
|
||||
QDF_MAC_ADDR_REF(param->peer_macaddr),
|
||||
param->vdev_id, param->tid_bitmap, param->tid_num);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_peer_rx_reorder_queue_remove_cmd_tlv() - send rx reorder remove
|
||||
* command to fw
|
||||
@@ -21362,6 +21449,8 @@ struct wmi_ops tlv_ops = {
|
||||
.send_peer_delete_all_cmd = send_peer_delete_all_cmd_tlv,
|
||||
.send_peer_rx_reorder_queue_setup_cmd =
|
||||
send_peer_rx_reorder_queue_setup_cmd_tlv,
|
||||
.send_peer_multi_rx_reorder_queue_setup_cmd =
|
||||
send_peer_multi_rx_reorder_queue_setup_cmd_tlv,
|
||||
.send_peer_rx_reorder_queue_remove_cmd =
|
||||
send_peer_rx_reorder_queue_remove_cmd_tlv,
|
||||
.send_pdev_utf_cmd = send_pdev_utf_cmd_tlv,
|
||||
@@ -22990,6 +23079,8 @@ static void populate_tlv_service(uint32_t *wmi_service)
|
||||
#ifdef WLAN_FEATURE_LL_LT_SAP
|
||||
wmi_service[wmi_service_xpan_support] = WMI_SERVICE_XPAN_SUPPORT;
|
||||
#endif
|
||||
wmi_service[wmi_service_multiple_reorder_queue_setup_support] =
|
||||
WMI_SERVICE_MULTIPLE_REORDER_QUEUE_SETUP_SUPPORT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user