root/drivers/net/dsa/sja1105/sja1105_tas.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. sja1105_setup_tc_taprio
  2. sja1105_tas_setup
  3. sja1105_tas_teardown

   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 /* Copyright (c) 2019, Vladimir Oltean <olteanv@gmail.com>
   3  */
   4 #ifndef _SJA1105_TAS_H
   5 #define _SJA1105_TAS_H
   6 
   7 #include <net/pkt_sched.h>
   8 
   9 #if IS_ENABLED(CONFIG_NET_DSA_SJA1105_TAS)
  10 
  11 struct sja1105_tas_data {
  12         struct tc_taprio_qopt_offload *offload[SJA1105_NUM_PORTS];
  13 };
  14 
  15 int sja1105_setup_tc_taprio(struct dsa_switch *ds, int port,
  16                             struct tc_taprio_qopt_offload *admin);
  17 
  18 void sja1105_tas_setup(struct dsa_switch *ds);
  19 
  20 void sja1105_tas_teardown(struct dsa_switch *ds);
  21 
  22 #else
  23 
  24 /* C doesn't allow empty structures, bah! */
  25 struct sja1105_tas_data {
  26         u8 dummy;
  27 };
  28 
  29 static inline int sja1105_setup_tc_taprio(struct dsa_switch *ds, int port,
  30                                           struct tc_taprio_qopt_offload *admin)
  31 {
  32         return -EOPNOTSUPP;
  33 }
  34 
  35 static inline void sja1105_tas_setup(struct dsa_switch *ds) { }
  36 
  37 static inline void sja1105_tas_teardown(struct dsa_switch *ds) { }
  38 
  39 #endif /* IS_ENABLED(CONFIG_NET_DSA_SJA1105_TAS) */
  40 
  41 #endif /* _SJA1105_TAS_H */

/* [<][>][^][v][top][bottom][index][help] */