From 447648128ec22e294604674ffe1064aa3ec3b767 Mon Sep 17 00:00:00 2001 From: Dmitry Tarnyagin Date: Thu, 12 Apr 2012 08:27:24 +0000 Subject: caif: set traffic class for caif packets Set traffic class for CAIF packets, based on socket priority, CAIF protocol type, or type of message. Traffic class mapping for different packet types: - control: TC_PRIO_CONTROL; - flow control: TC_PRIO_CONTROL; - at: TC_PRIO_CONTROL; - rfm: TC_PRIO_INTERACTIVE_BULK; - other sockets: equals to socket's TC; - network data: no change. Signed-off-by: Dmitry Tarnyagin Signed-off-by: David S. Miller --- include/net/caif/cfpkt.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/net/caif') diff --git a/include/net/caif/cfpkt.h b/include/net/caif/cfpkt.h index 6bd200a4754a..83a89ba3005b 100644 --- a/include/net/caif/cfpkt.h +++ b/include/net/caif/cfpkt.h @@ -188,11 +188,18 @@ struct cfpkt *cfpkt_fromnative(enum caif_direction dir, void *nativepkt); */ void *cfpkt_tonative(struct cfpkt *pkt); - /* * Returns packet information for a packet. * pkt Packet to get info from; * @return Packet information */ struct caif_payload_info *cfpkt_info(struct cfpkt *pkt); + +/** cfpkt_set_prio - set priority for a CAIF packet. + * + * @pkt: The CAIF packet to be adjusted. + * @prio: one of TC_PRIO_ constants. + */ +void cfpkt_set_prio(struct cfpkt *pkt, int prio); + #endif /* CFPKT_H_ */ -- cgit v1.2.3-59-g8ed1b