diff options
author | Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | 2012-04-12 04:27:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-13 11:37:36 -0400 |
commit | 447648128ec22e294604674ffe1064aa3ec3b767 (patch) | |
tree | 1dfb671203f989a8612704674bbe59c78cf27109 /include | |
parent | e65ac4d54546b7d7514a9e8be1484c758f2b7ba3 (diff) |
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 <dmitry.tarnyagin@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/caif/cfpkt.h | 9 |
1 files changed, 8 insertions, 1 deletions
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); | |||
188 | */ | 188 | */ |
189 | void *cfpkt_tonative(struct cfpkt *pkt); | 189 | void *cfpkt_tonative(struct cfpkt *pkt); |
190 | 190 | ||
191 | |||
192 | /* | 191 | /* |
193 | * Returns packet information for a packet. | 192 | * Returns packet information for a packet. |
194 | * pkt Packet to get info from; | 193 | * pkt Packet to get info from; |
195 | * @return Packet information | 194 | * @return Packet information |
196 | */ | 195 | */ |
197 | struct caif_payload_info *cfpkt_info(struct cfpkt *pkt); | 196 | struct caif_payload_info *cfpkt_info(struct cfpkt *pkt); |
197 | |||
198 | /** cfpkt_set_prio - set priority for a CAIF packet. | ||
199 | * | ||
200 | * @pkt: The CAIF packet to be adjusted. | ||
201 | * @prio: one of TC_PRIO_ constants. | ||
202 | */ | ||
203 | void cfpkt_set_prio(struct cfpkt *pkt, int prio); | ||
204 | |||
198 | #endif /* CFPKT_H_ */ | 205 | #endif /* CFPKT_H_ */ |