Merge tag 'asoc-fix-v5.19-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / drivers / net / ethernet / ti / am65-cpsw-qos.h
CommitLineData
8127224c
IK
1/* SPDX-License-Identifier: GPL-2.0 */
2/* Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
3 */
4
5#ifndef AM65_CPSW_QOS_H_
6#define AM65_CPSW_QOS_H_
7
8#include <linux/netdevice.h>
9#include <net/pkt_sched.h>
10
11struct am65_cpsw_est {
12 int buf;
13 /* has to be the last one */
14 struct tc_taprio_qopt_offload taprio;
15};
16
5ec836be
GS
17struct am65_cpsw_ale_ratelimit {
18 unsigned long cookie;
19 u64 rate_packet_ps;
20};
21
8127224c
IK
22struct am65_cpsw_qos {
23 struct am65_cpsw_est *est_admin;
24 struct am65_cpsw_est *est_oper;
25 ktime_t link_down_time;
26 int link_speed;
5ec836be
GS
27
28 struct am65_cpsw_ale_ratelimit ale_bc_ratelimit;
29 struct am65_cpsw_ale_ratelimit ale_mc_ratelimit;
8127224c
IK
30};
31
32int am65_cpsw_qos_ndo_setup_tc(struct net_device *ndev, enum tc_setup_type type,
33 void *type_data);
34void am65_cpsw_qos_link_up(struct net_device *ndev, int link_speed);
35void am65_cpsw_qos_link_down(struct net_device *ndev);
36
37#endif /* AM65_CPSW_QOS_H_ */