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 /net/caif/cfpkt_skbuff.c | |
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 'net/caif/cfpkt_skbuff.c')
-rw-r--r-- | net/caif/cfpkt_skbuff.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c index e335ba859b97..863dedd91bb6 100644 --- a/net/caif/cfpkt_skbuff.c +++ b/net/caif/cfpkt_skbuff.c | |||
@@ -381,6 +381,7 @@ struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos) | |||
381 | memcpy(skb2->data, split, len2nd); | 381 | memcpy(skb2->data, split, len2nd); |
382 | skb2->tail += len2nd; | 382 | skb2->tail += len2nd; |
383 | skb2->len += len2nd; | 383 | skb2->len += len2nd; |
384 | skb2->priority = skb->priority; | ||
384 | return skb_to_pkt(skb2); | 385 | return skb_to_pkt(skb2); |
385 | } | 386 | } |
386 | 387 | ||
@@ -394,3 +395,9 @@ struct caif_payload_info *cfpkt_info(struct cfpkt *pkt) | |||
394 | return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb; | 395 | return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb; |
395 | } | 396 | } |
396 | EXPORT_SYMBOL(cfpkt_info); | 397 | EXPORT_SYMBOL(cfpkt_info); |
398 | |||
399 | void cfpkt_set_prio(struct cfpkt *pkt, int prio) | ||
400 | { | ||
401 | pkt_to_skb(pkt)->priority = prio; | ||
402 | } | ||
403 | EXPORT_SYMBOL(cfpkt_set_prio); | ||