mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacmn: Add support to override tid value
Add support to configure a specific tid for unicast packets derived from multicast packets. Set the user provided tid value when both multicast enhancement and tid_override_en flag is set. Change-Id: I770166a37c920a7e642c6649f918456846fb5f90 Acked-by: Shashikala Prabhu <pshashik@codeaurora.org> CRs-Fixed: 2342717
This commit is contained in:
parent
db0d42384f
commit
8f6703be71
5 changed files with 91 additions and 0 deletions
|
|
@ -1380,6 +1380,56 @@ static inline void cdp_set_pdev_dscp_tid_map(ol_txrx_soc_handle soc,
|
|||
map_id, tos, tid);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_hmmc_tid_override_en(): Function to enable hmmc tid override.
|
||||
* @soc : soc handle
|
||||
* @pdev: pdev handle
|
||||
* @val: hmmc-dscp flag value
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void cdp_hmmc_tid_override_en(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev, bool val)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->hmmc_tid_override_en)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->hmmc_tid_override_en(pdev, val);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_set_hmmc_tid_val(): Function to set hmmc tid value.
|
||||
* @soc : soc handle
|
||||
* @pdev: pdev handle
|
||||
* @tid: tid value
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void cdp_set_hmmc_tid_val(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev, uint8_t tid)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->set_hmmc_tid_val)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->set_hmmc_tid_val(pdev, tid);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_flush_cache_rx_queue() - flush cache rx queue frame
|
||||
*
|
||||
|
|
|
|||
|
|
@ -319,6 +319,8 @@ struct cdp_cmn_ops {
|
|||
void (*flush_cache_rx_queue)(void);
|
||||
void (*set_pdev_dscp_tid_map)(struct cdp_pdev *pdev, uint8_t map_id,
|
||||
uint8_t tos, uint8_t tid);
|
||||
void (*hmmc_tid_override_en)(struct cdp_pdev *pdev, bool val);
|
||||
void (*set_hmmc_tid_val)(struct cdp_pdev *pdev, uint8_t tid);
|
||||
|
||||
QDF_STATUS (*txrx_stats_request)(struct cdp_vdev *vdev,
|
||||
struct cdp_txrx_stats_req *req);
|
||||
|
|
|
|||
|
|
@ -7498,6 +7498,36 @@ static void dp_set_pdev_dscp_tid_map_wifi3(struct cdp_pdev *pdev_handle,
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_hmmc_tid_override_en_wifi3(): Function to enable hmmc tid override.
|
||||
* @pdev_handle: pdev handle
|
||||
* @val: hmmc-dscp flag value
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void dp_hmmc_tid_override_en_wifi3(struct cdp_pdev *pdev_handle,
|
||||
bool val)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
|
||||
pdev->hmmc_tid_override_en = val;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_set_hmmc_tid_val_wifi3(): Function to set hmmc tid value.
|
||||
* @pdev_handle: pdev handle
|
||||
* @tid: tid value
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void dp_set_hmmc_tid_val_wifi3(struct cdp_pdev *pdev_handle,
|
||||
uint8_t tid)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
|
||||
pdev->hmmc_tid = tid;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_fw_stats_process(): Process TxRX FW stats request
|
||||
* @vdev_handle: DP VDEV handle
|
||||
|
|
@ -8313,6 +8343,8 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||
/* TODO: get API's for dscp-tid need to be added*/
|
||||
.set_vdev_dscp_tid_map = dp_set_vdev_dscp_tid_map_wifi3,
|
||||
.set_pdev_dscp_tid_map = dp_set_pdev_dscp_tid_map_wifi3,
|
||||
.hmmc_tid_override_en = dp_hmmc_tid_override_en_wifi3,
|
||||
.set_hmmc_tid_val = dp_set_hmmc_tid_val_wifi3,
|
||||
.txrx_get_total_per = dp_get_total_per,
|
||||
.txrx_stats_request = dp_txrx_stats_request,
|
||||
.txrx_set_monitor_mode = dp_vdev_set_monitor_mode,
|
||||
|
|
|
|||
|
|
@ -3835,6 +3835,10 @@ dp_tx_me_send_convert_ucast(struct cdp_vdev *vdev_handle, qdf_nbuf_t nbuf,
|
|||
msdu_info.num_seg = new_mac_cnt;
|
||||
msdu_info.frm_type = dp_tx_frm_me;
|
||||
|
||||
if (qdf_unlikely(vdev->mcast_enhancement_en > 0) &&
|
||||
qdf_unlikely(pdev->hmmc_tid_override_en))
|
||||
msdu_info.tid = pdev->hmmc_tid;
|
||||
|
||||
DP_STATS_INC(vdev, tx_i.mcast_en.ucast, new_mac_cnt);
|
||||
dp_tx_send_msdu_multiple(vdev, nbuf, &msdu_info);
|
||||
|
||||
|
|
|
|||
|
|
@ -1207,6 +1207,9 @@ struct dp_pdev {
|
|||
qdf_dma_mem_context(memctx);
|
||||
} me_buf;
|
||||
|
||||
bool hmmc_tid_override_en;
|
||||
uint8_t hmmc_tid;
|
||||
|
||||
/* Number of VAPs with mcast enhancement enabled */
|
||||
qdf_atomic_t mc_num_vap_attached;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue