qcacmn: add support to send dscp-to-up map to FW
Add support to send DSCP-to-UP map table values to FW over WMI cmd to update its corresponding map table. Change-Id: I92c1464881282ead00714d0b115cffd34dc9ba1f CRs-Fixed: 2617045
This commit is contained in:

committed by
nshrivas

parent
9195497a5f
commit
f6c3329e23
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -65,4 +65,26 @@ wmi_extract_get_elna_bypass_resp(struct wmi_unified *wmi_handle, void *resp_buf,
|
||||
struct get_elna_bypass_response *resp);
|
||||
#endif /* WLAN_FEATURE_ELNA */
|
||||
|
||||
#ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
|
||||
/**
|
||||
* wmi_unified_send_dscp_tip_map_cmd() - Send dscp-to-tid map values cmd
|
||||
* @wmi_handle: wmi handle
|
||||
* @dscp_to_tid_map: array of dscp_tid map values
|
||||
*
|
||||
* Send dscp-to-tid map values to FW.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified *wmi_handle,
|
||||
uint32_t *dscp_to_tid_map);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified *wmi_handle,
|
||||
uint32_t *dscp_to_tid_map)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */
|
||||
|
||||
#endif /* _WMI_UNIFIED_FWOL_API_H_ */
|
||||
|
@@ -2137,6 +2137,11 @@ QDF_STATUS (*extract_get_elna_bypass_resp)(wmi_unified_t wmi_handle,
|
||||
struct get_elna_bypass_response *resp);
|
||||
#endif /* WLAN_FEATURE_ELNA */
|
||||
|
||||
#ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
|
||||
QDF_STATUS (*send_dscp_tid_map_cmd)(wmi_unified_t wmi_handle,
|
||||
uint32_t *dscp_to_tid_map);
|
||||
#endif
|
||||
|
||||
QDF_STATUS (*send_pdev_get_pn_cmd)(wmi_unified_t wmi_handle,
|
||||
struct peer_request_pn_param *pn_params);
|
||||
QDF_STATUS (*extract_get_pn_data)(wmi_unified_t wmi_handle,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -58,3 +58,16 @@ wmi_extract_get_elna_bypass_resp(struct wmi_unified *wmi_handle, void *resp_buf,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_ELNA */
|
||||
|
||||
#ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
|
||||
QDF_STATUS
|
||||
wmi_unified_send_dscp_tip_map_cmd(struct wmi_unified *wmi_handle,
|
||||
uint32_t *dscp_to_tid_map)
|
||||
{
|
||||
if (wmi_handle->ops->send_dscp_tid_map_cmd)
|
||||
return wmi_handle->ops->send_dscp_tid_map_cmd(wmi_handle,
|
||||
dscp_to_tid_map);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -152,9 +152,66 @@ static void wmi_fwol_attach_elna_tlv(struct wmi_ops *ops)
|
||||
}
|
||||
#endif /* WLAN_FEATURE_ELNA */
|
||||
|
||||
#ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
|
||||
/**
|
||||
* send_dscp_tid_map_cmd_tlv() - send dscp to tid map cmd to fw
|
||||
* @wmi_handle: wmi handle
|
||||
* @dscp_to_tid_map: array of dscp to tid map values
|
||||
*
|
||||
* Send WMI_PDEV_SET_DSCP_TID_MAP_CMDID to fw.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS
|
||||
send_dscp_tid_map_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
uint32_t *dscp_to_tid_map)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
wmi_pdev_set_dscp_tid_map_cmd_fixed_param *cmd;
|
||||
wmi_buf_t buf;
|
||||
uint16_t len = sizeof(*cmd);
|
||||
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf) {
|
||||
WMI_LOGE("%s: Failed to allocate wmi buffer", __func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
cmd = (wmi_pdev_set_dscp_tid_map_cmd_fixed_param *)wmi_buf_data(buf);
|
||||
WMITLV_SET_HDR(
|
||||
&cmd->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_pdev_set_dscp_tid_map_cmd_fixed_param));
|
||||
cmd->reserved0 = WMI_PDEV_ID_SOC;
|
||||
qdf_mem_copy(&cmd->dscp_to_tid_map, dscp_to_tid_map,
|
||||
sizeof(uint32_t) * WMI_DSCP_MAP_MAX);
|
||||
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
|
||||
if (status) {
|
||||
WMI_LOGE("Failed to send dscp_up_map_to_fw %d", status);
|
||||
wmi_buf_free(buf);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void wmi_fwol_attach_dscp_tid_tlv(struct wmi_ops *ops)
|
||||
{
|
||||
ops->send_dscp_tid_map_cmd = send_dscp_tid_map_cmd_tlv;
|
||||
}
|
||||
#else
|
||||
static void wmi_fwol_attach_dscp_tid_tlv(struct wmi_ops *ops)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */
|
||||
|
||||
void wmi_fwol_attach_tlv(wmi_unified_t wmi_handle)
|
||||
{
|
||||
struct wmi_ops *ops = wmi_handle->ops;
|
||||
|
||||
wmi_fwol_attach_elna_tlv(ops);
|
||||
wmi_fwol_attach_dscp_tid_tlv(ops);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user