@@ -310,6 +310,17 @@ int ksz_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp)
310310 return (data >> shift ) & mask ;
311311}
312312
313+ /**
314+ * ksz_set_global_dscp_entry - Sets the global DSCP-to-priority mapping entry
315+ * @dev: Pointer to the KSZ switch device structure
316+ * @dscp: DSCP value for which to set the priority
317+ * @ipm: Priority value to set
318+ *
319+ * This function sets the global DSCP-to-priority mapping entry for the
320+ * specified DSCP value.
321+ *
322+ * Return: 0 on success, or a negative error code on failure.
323+ */
313324static int ksz_set_global_dscp_entry (struct ksz_device * dev , u8 dscp , u8 ipm )
314325{
315326 int reg , per_reg , shift ;
@@ -377,6 +388,16 @@ static int ksz_init_global_dscp_map(struct ksz_device *dev)
377388 return 0 ;
378389}
379390
391+ /**
392+ * ksz_port_add_dscp_prio - Adds a DSCP-to-priority mapping entry for a port on
393+ * a KSZ switch.
394+ * @ds: Pointer to the DSA switch structure
395+ * @port: Port number for which to add the DSCP-to-priority mapping entry
396+ * @dscp: DSCP value for which to add the priority
397+ * @prio: Priority value to set
398+ *
399+ * Return: 0 on success, or a negative error code on failure
400+ */
380401int ksz_port_add_dscp_prio (struct dsa_switch * ds , int port , u8 dscp , u8 prio )
381402{
382403 struct ksz_device * dev = ds -> priv ;
@@ -387,6 +408,16 @@ int ksz_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
387408 return ksz_set_global_dscp_entry (dev , dscp , prio );
388409}
389410
411+ /**
412+ * ksz_port_del_dscp_prio - Deletes a DSCP-to-priority mapping entry for a port
413+ * on a KSZ switch.
414+ * @ds: Pointer to the DSA switch structure
415+ * @port: Port number for which to delete the DSCP-to-priority mapping entry
416+ * @dscp: DSCP value for which to delete the priority
417+ * @prio: Priority value to delete
418+ *
419+ * Return: 0 on success, or a negative error code on failure
420+ */
390421int ksz_port_del_dscp_prio (struct dsa_switch * ds , int port , u8 dscp , u8 prio )
391422{
392423 struct ksz_device * dev = ds -> priv ;
0 commit comments