qcacld-3.0: add support to customize dscp-to-up map table

Add support to customize DSCP-to-UP map table and send the
customized map values to FW to update its corresponding
map table.

Change-Id: Ibe9704a90468c898dd2e60fdf83a271152f654ce
CRs-Fixed: 2616247
This commit is contained in:
Vevek Venkatesan
2020-01-28 13:08:51 +05:30
committed by nshrivas
parent 3ea423bf7e
commit 656edfa1f8
10 changed files with 259 additions and 16 deletions

View File

@@ -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
@@ -76,6 +76,7 @@ struct wlan_fwol_callbacks {
* @get_elna_bypass: get eLNA bypass
* @reg_evt_handler: register event handler
* @unreg_evt_handler: unregister event handler
* @send_dscp_up_map_to_fw: send dscp-to-up map values to FW
*/
struct wlan_fwol_tx_ops {
#ifdef WLAN_FEATURE_ELNA
@@ -88,6 +89,11 @@ struct wlan_fwol_tx_ops {
void *arg);
QDF_STATUS (*unreg_evt_handler)(struct wlan_objmgr_psoc *psoc,
void *arg);
#ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
QDF_STATUS (*send_dscp_up_map_to_fw)(
struct wlan_objmgr_psoc *psoc,
uint32_t *dscp_to_up_map);
#endif
};
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-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
@@ -543,6 +543,27 @@ QDF_STATUS ucfg_fwol_get_elna_bypass(struct wlan_objmgr_vdev *vdev,
struct get_elna_bypass_response *response),
void *context);
#endif /* WLAN_FEATURE_ELNA */
#ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
/**
* ucfg_fwol_send_dscp_up_map_to_fw() - send dscp_up map to FW
* @vdev: vdev handle
* @dscp_to_up_map: DSCP to UP map array
*
* Return: QDF_STATUS_SUCCESS on success
*/
QDF_STATUS ucfg_fwol_send_dscp_up_map_to_fw(
struct wlan_objmgr_vdev *vdev,
uint32_t *dscp_to_up_map);
#else
static inline
QDF_STATUS ucfg_fwol_send_dscp_up_map_to_fw(
struct wlan_objmgr_vdev *vdev,
uint32_t *dscp_to_up_map)
{
return QDF_STATUS_SUCCESS;
}
#endif
#else
static inline QDF_STATUS ucfg_fwol_psoc_open(struct wlan_objmgr_psoc *psoc)
{

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-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
@@ -896,3 +896,34 @@ QDF_STATUS ucfg_fwol_get_elna_bypass(struct wlan_objmgr_vdev *vdev,
return status;
}
#endif /* WLAN_FEATURE_ELNA */
#ifdef WLAN_SEND_DSCP_UP_MAP_TO_FW
QDF_STATUS ucfg_fwol_send_dscp_up_map_to_fw(struct wlan_objmgr_vdev *vdev,
uint32_t *dscp_to_up_map)
{
QDF_STATUS status;
struct wlan_objmgr_psoc *psoc;
struct wlan_fwol_psoc_obj *fwol_obj;
struct wlan_fwol_tx_ops *tx_ops;
psoc = wlan_vdev_get_psoc(vdev);
if (!psoc) {
fwol_err("NULL pointer for psoc");
return QDF_STATUS_E_INVAL;
}
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL Obj");
return QDF_STATUS_E_INVAL;
}
tx_ops = &fwol_obj->tx_ops;
if (tx_ops && tx_ops->send_dscp_up_map_to_fw)
status = tx_ops->send_dscp_up_map_to_fw(psoc, dscp_to_up_map);
else
status = QDF_STATUS_E_IO;
return status;
}
#endif /* WLAN_SEND_DSCP_UP_MAP_TO_FW */