diff options
author | Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | 2012-04-12 08:27:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-13 11:37:36 -0400 |
commit | 447648128ec22e294604674ffe1064aa3ec3b767 (patch) | |
tree | 1dfb671203f989a8612704674bbe59c78cf27109 /net/caif/cfsrvl.c | |
parent | e65ac4d54546b7d7514a9e8be1484c758f2b7ba3 (diff) | |
download | lwn-447648128ec22e294604674ffe1064aa3ec3b767.tar.gz lwn-447648128ec22e294604674ffe1064aa3ec3b767.zip |
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/cfsrvl.c')
-rw-r--r-- | net/caif/cfsrvl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/caif/cfsrvl.c b/net/caif/cfsrvl.c index 4aa33d4496b6..dd485f6128e8 100644 --- a/net/caif/cfsrvl.c +++ b/net/caif/cfsrvl.c @@ -11,6 +11,7 @@ #include <linux/errno.h> #include <linux/slab.h> #include <linux/module.h> +#include <linux/pkt_sched.h> #include <net/caif/caif_layer.h> #include <net/caif/cfsrvl.h> #include <net/caif/cfpkt.h> @@ -120,6 +121,7 @@ static int cfservl_modemcmd(struct cflayer *layr, enum caif_modemcmd ctrl) info->channel_id = service->layer.id; info->hdr_len = 1; info->dev_info = &service->dev_info; + cfpkt_set_prio(pkt, TC_PRIO_CONTROL); return layr->dn->transmit(layr->dn, pkt); } case CAIF_MODEMCMD_FLOW_OFF_REQ: @@ -140,6 +142,7 @@ static int cfservl_modemcmd(struct cflayer *layr, enum caif_modemcmd ctrl) info->channel_id = service->layer.id; info->hdr_len = 1; info->dev_info = &service->dev_info; + cfpkt_set_prio(pkt, TC_PRIO_CONTROL); return layr->dn->transmit(layr->dn, pkt); } default: |