|
@@ -1963,6 +1963,67 @@ QDF_STATUS cdp_set_pdev_tx_capture(ol_txrx_soc_handle soc,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * cdp_set_pdev_pcp_tid_map() - set pdev pcp-tid-map
|
|
|
+ * @soc: opaque soc handle
|
|
|
+ * @pdev: data path pdev handle
|
|
|
+ * @pcp: pcp value
|
|
|
+ * @tid: tid value
|
|
|
+ *
|
|
|
+ * This API is used to configure the pcp-to-tid mapping for a pdev.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS_SUCCESS if value set successfully
|
|
|
+ * QDF_STATUS_E_INVAL false if error
|
|
|
+ */
|
|
|
+static inline
|
|
|
+QDF_STATUS cdp_set_pdev_pcp_tid_map(ol_txrx_soc_handle soc,
|
|
|
+ struct cdp_pdev *pdev,
|
|
|
+ uint32_t pcp, uint32_t tid)
|
|
|
+{
|
|
|
+ if (!soc || !soc->ops) {
|
|
|
+ QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ "%s: Invalid Instance", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!soc->ops->cmn_drv_ops ||
|
|
|
+ !soc->ops->cmn_drv_ops->set_pdev_pcp_tid_map)
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ return soc->ops->cmn_drv_ops->set_pdev_pcp_tid_map(pdev, pcp, tid);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * cdp_set_pdev_pcp_tidmap_prty() - set pdev tidmap priority
|
|
|
+ * @soc: opaque soc handle
|
|
|
+ * @pdev: data path pdev handle
|
|
|
+ * @val: priority value
|
|
|
+ *
|
|
|
+ * This API is used to configure the tidmap priority for a pdev.
|
|
|
+ * The tidmap priority decides which mapping, namely DSCP-TID, SVLAN_PCP-TID,
|
|
|
+ * CVLAN_PCP-TID will be used.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS_SUCCESS if value set successfully
|
|
|
+ * QDF_STATUS_E_INVAL false if error
|
|
|
+ */
|
|
|
+static inline
|
|
|
+QDF_STATUS cdp_set_pdev_tidmap_prty(ol_txrx_soc_handle soc,
|
|
|
+ struct cdp_pdev *pdev_handle,
|
|
|
+ uint32_t val)
|
|
|
+{
|
|
|
+ if (!soc || !soc->ops) {
|
|
|
+ QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ "%s: Invalid Instance", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!soc->ops->cmn_drv_ops ||
|
|
|
+ !soc->ops->cmn_drv_ops->set_pdev_tidmap_prty)
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ return soc->ops->cmn_drv_ops->set_pdev_tidmap_prty(pdev_handle, val);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* cdp_get_peer_mac_from_peer_id() - get peer mac addr from peer id
|
|
|
* @soc: opaque soc handle
|
|
@@ -2378,4 +2439,99 @@ cdp_flush_rate_stats_request(struct cdp_soc_t *soc, struct cdp_pdev *pdev)
|
|
|
|
|
|
soc->ops->cmn_drv_ops->txrx_flush_rate_stats_request(soc, pdev);
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * cdp_set_vdev_pcp_tid_map() - set vdev pcp-tid-map
|
|
|
+ * @soc: opaque soc handle
|
|
|
+ * @vdev: data path vdev handle
|
|
|
+ * @pcp: pcp value
|
|
|
+ * @tid: tid value
|
|
|
+ *
|
|
|
+ * This API is used to configure the pcp-to-tid mapping for a pdev.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS_SUCCESS if value set successfully
|
|
|
+ * QDF_STATUS_E_INVAL false if error
|
|
|
+ */
|
|
|
+static inline
|
|
|
+QDF_STATUS cdp_set_vdev_pcp_tid_map(ol_txrx_soc_handle soc,
|
|
|
+ struct cdp_vdev *vdev_handle,
|
|
|
+ uint8_t pcp, uint8_t tid)
|
|
|
+{
|
|
|
+ if (!soc || !soc->ops) {
|
|
|
+ QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ "%s: Invalid Instance", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!soc->ops->cmn_drv_ops ||
|
|
|
+ !soc->ops->cmn_drv_ops->set_vdev_pcp_tid_map)
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ return soc->ops->cmn_drv_ops->set_vdev_pcp_tid_map(vdev_handle,
|
|
|
+ pcp, tid);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * cdp_set_vdev_tidmap_tbl_id() - set vdev tidmap table id
|
|
|
+ *
|
|
|
+ * @soc: opaque soc handle
|
|
|
+ * @vdev: data path vdev handle
|
|
|
+ * @mapid: value of mapid
|
|
|
+ *
|
|
|
+ * This API is used to configure the table-id of the tid-mapping for a vdev.
|
|
|
+ * Table '0' is for using the pdev's pcp-tid mapping and '1' is for using
|
|
|
+ * the vdev's pcp-tid mapping.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS_SUCCESS if value set successfully
|
|
|
+ * QDF_STATUS_E_INVAL false if error
|
|
|
+ */
|
|
|
+static inline
|
|
|
+QDF_STATUS cdp_set_vdev_tidmap_tbl_id(ol_txrx_soc_handle soc,
|
|
|
+ struct cdp_vdev *vdev_handle,
|
|
|
+ uint8_t mapid)
|
|
|
+{
|
|
|
+ if (!soc || !soc->ops) {
|
|
|
+ QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ "%s: Invalid Instance", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!soc->ops->cmn_drv_ops ||
|
|
|
+ !soc->ops->cmn_drv_ops->set_vdev_tidmap_tbl_id)
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ return soc->ops->cmn_drv_ops->set_vdev_tidmap_tbl_id(vdev_handle,
|
|
|
+ mapid);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * cdp_set_vdev_tidmap_prty() - set vdev tidmap priority
|
|
|
+ * @soc: opaque soc handle
|
|
|
+ * @vdev: data path vdev handle
|
|
|
+ * @prio: tidmap priority value
|
|
|
+ *
|
|
|
+ * This API is used to configure the tidmap priority for a vdev.
|
|
|
+ * The tidmap priority decides which mapping, namely DSCP-TID, SVLAN_PCP-TID,
|
|
|
+ * CVLAN_PCP-TID will be used.
|
|
|
+ * The vdev tidmap priority will be used only when the tidmap_tbl_id is '1'.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS_SUCCESS if value set successfully
|
|
|
+ * QDF_STATUS_E_INVAL false if error
|
|
|
+ */
|
|
|
+static inline
|
|
|
+QDF_STATUS cdp_set_vdev_tidmap_prty(ol_txrx_soc_handle soc,
|
|
|
+ struct cdp_vdev *vdev_handle, uint8_t prio)
|
|
|
+{
|
|
|
+ if (!soc || !soc->ops) {
|
|
|
+ QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ "%s: Invalid Instance", __func__);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!soc->ops->cmn_drv_ops ||
|
|
|
+ !soc->ops->cmn_drv_ops->set_vdev_tidmap_prty)
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ return soc->ops->cmn_drv_ops->set_vdev_tidmap_prty(vdev_handle, prio);
|
|
|
+}
|
|
|
#endif /* _CDP_TXRX_CMN_H_ */
|