Lines Matching refs:dscp
272 int ksz_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp) in ksz_port_get_dscp_prio() argument
293 dscp); in ksz_port_get_dscp_prio()
299 reg += dscp / per_reg; in ksz_port_get_dscp_prio()
304 shift = (dscp % per_reg) * (8 / per_reg); in ksz_port_get_dscp_prio()
320 static int ksz_set_global_dscp_entry(struct ksz_device *dev, u8 dscp, u8 ipm) in ksz_set_global_dscp_entry() argument
327 shift = (dscp % per_reg) * (8 / per_reg); in ksz_set_global_dscp_entry()
329 return ksz_rmw8(dev, reg + (dscp / per_reg), mask << shift, in ksz_set_global_dscp_entry()
344 int ret, dscp; in ksz_init_global_dscp_map() local
358 for (dscp = 0; dscp < DSCP_MAX; dscp++) { in ksz_init_global_dscp_map()
365 ipm = ietf_dscp_to_ieee8021q_tt(dscp); in ksz_init_global_dscp_map()
371 tt = ietf_dscp_to_ieee8021q_tt(dscp); in ksz_init_global_dscp_map()
381 ret = ksz_set_global_dscp_entry(dev, dscp, ipm); in ksz_init_global_dscp_map()
397 int ksz_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio) in ksz_port_add_dscp_prio() argument
404 return ksz_set_global_dscp_entry(dev, dscp, prio); in ksz_port_add_dscp_prio()
417 int ksz_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio) in ksz_port_del_dscp_prio() argument
422 if (ksz_port_get_dscp_prio(ds, port, dscp) != prio) in ksz_port_del_dscp_prio()
434 return ksz_set_global_dscp_entry(dev, dscp, ipm); in ksz_port_del_dscp_prio()