Skip to content

Commit

Permalink
caif: performance bugfix - allow radio stack to prioritize packets.
Browse files Browse the repository at this point in the history
    In the CAIF Payload message the Packet Type indication must be set to
    UNCLASSIFIED in order to allow packet prioritization in the modem's
    network stack. Otherwise TCP-Ack is not prioritized in the modems
    transmit queue.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sjur Brændeland authored and David S. Miller committed Apr 11, 2011
1 parent 0c184ed commit 4a9f65f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/caif/cfdgml.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <net/caif/cfsrvl.h>
#include <net/caif/cfpkt.h>


#define container_obj(layr) ((struct cfsrvl *) layr)

#define DGM_CMD_BIT 0x80
Expand Down Expand Up @@ -83,6 +84,7 @@ static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt)

static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt)
{
u8 packet_type;
u32 zero = 0;
struct caif_payload_info *info;
struct cfsrvl *service = container_obj(layr);
Expand All @@ -94,7 +96,9 @@ static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt)
if (cfpkt_getlen(pkt) > DGM_MTU)
return -EMSGSIZE;

cfpkt_add_head(pkt, &zero, 4);
cfpkt_add_head(pkt, &zero, 3);
packet_type = 0x08; /* B9 set - UNCLASSIFIED */
cfpkt_add_head(pkt, &packet_type, 1);

/* Add info for MUX-layer to route the packet out. */
info = cfpkt_info(pkt);
Expand Down

0 comments on commit 4a9f65f

Please sign in to comment.