[PATCH 0/2] caif: Bugfixes

STALE5671d

6 messages, 2 authors, 2011-04-11 · open the first message on its own page

[PATCH 0/2] caif: Bugfixes

From: <hidden>
Date: 2011-04-11 20:11:35

From: Sjur Brændeland <redacted>

Hi Dave,

These two patches applies cleanly to net-2.6 and net-next-2.6.
Please apply as you see apropriate.

The first patch fixes a kernel panic.
The second patch fixes a CAIF protocol bug. This bug caused packet
prioritization to be disabled on the modem, resulting in bad throughput.

Regards,
Sjur

Sjur Brændeland (2):
  caif: Bugfix use for_each_safe when removing list nodes.
  caif: performance bugfix - allow radio stack to prioritize packets.

 net/caif/cfdgml.c |    6 +++++-
 net/caif/cfmuxl.c |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

[PATCH 1/2] caif: Bugfix use for_each_safe when removing list nodes.

From: <hidden>
Date: 2011-04-11 20:11:36

From: Sjur Brændeland <redacted>

Signed-off-by: Sjur Brændeland <redacted>
---
 net/caif/cfmuxl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/caif/cfmuxl.c b/net/caif/cfmuxl.c
index 6bb338d..fc24974 100644
--- a/net/caif/cfmuxl.c
+++ b/net/caif/cfmuxl.c
@@ -205,9 +205,9 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
 				int phyid)
 {
 	struct cfmuxl *muxl = container_obj(layr);
-	struct list_head *node;
+	struct list_head *node, *next;
 	struct cflayer *layer;
-	list_for_each(node, &muxl->srvl_list) {
+	list_for_each_safe(node, next, &muxl->srvl_list) {
 		layer = list_entry(node, struct cflayer, node);
 		if (cfsrvl_phyid_match(layer, phyid))
 			layer->ctrlcmd(layer, ctrl, phyid);
-- 
1.7.0.4

[PATCH 2/2] caif: performance bugfix - allow radio stack to prioritize packets.

From: <hidden>
Date: 2011-04-11 20:11:37

From: Sjur Brændeland <redacted>

    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 <redacted>
---
 net/caif/cfdgml.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/caif/cfdgml.c b/net/caif/cfdgml.c
index a4ce294..0382dec 100644
--- a/net/caif/cfdgml.c
+++ b/net/caif/cfdgml.c
@@ -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
@@ -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);
@@ -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);
-- 
1.7.0.4

Re: [PATCH 1/2] caif: Bugfix use for_each_safe when removing list nodes.

From: David Miller <davem@davemloft.net>
Date: 2011-04-11 20:17:41

From: sjur.brandeland@stericsson.com
Date: Mon, 11 Apr 2011 22:11:29 +0200
From: Sjur Brændeland <redacted>

Signed-off-by: Sjur Brændeland <redacted>
Applied.

Re: [PATCH 2/2] caif: performance bugfix - allow radio stack to prioritize packets.

From: David Miller <davem@davemloft.net>
Date: 2011-04-11 20:17:46

From: sjur.brandeland@stericsson.com
Date: Mon, 11 Apr 2011 22:11:30 +0200
From: Sjur Brændeland <redacted>

    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 <redacted>
Applied.

Re: [PATCH 0/2] caif: Bugfixes

From: David Miller <davem@davemloft.net>
Date: 2011-04-11 20:17:56

From: sjur.brandeland@stericsson.com
Date: Mon, 11 Apr 2011 22:11:28 +0200
These two patches applies cleanly to net-2.6 and net-next-2.6.
Please apply as you see apropriate.
I put them in net-2.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help