summaryrefslogtreecommitdiff
path: root/net/caif/cfserl.c
diff options
context:
space:
mode:
authorSjur Braendeland <sjur.brandeland@stericsson.com>2010-06-17 10:55:40 +0400
committerDavid S. Miller <davem@davemloft.net>2010-06-21 06:46:06 +0400
commit2aa40aef9debc77d55cc87a50d335b6fe97fbeb0 (patch)
tree0dccf47cf6cb861c7efa72601fab9511760c7e74 /net/caif/cfserl.c
parenta7da1f55a826c621251874e7684c234972fc3216 (diff)
downloadlinux-2aa40aef9debc77d55cc87a50d335b6fe97fbeb0.tar.xz
caif: Use link layer MTU instead of fixed MTU
Previously CAIF supported maximum transfer size of ~4050. The transfer size is now calculated dynamically based on the link layers mtu size. Signed-off-by: Sjur Braendeland@stericsson.com Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/cfserl.c')
-rw-r--r--net/caif/cfserl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c
index 965c5baace40..a11fbd68a13d 100644
--- a/net/caif/cfserl.c
+++ b/net/caif/cfserl.c
@@ -14,7 +14,8 @@
#define container_obj(layr) ((struct cfserl *) layr)
#define CFSERL_STX 0x02
-#define CAIF_MINIUM_PACKET_SIZE 4
+#define SERIAL_MINIUM_PACKET_SIZE 4
+#define SERIAL_MAX_FRAMESIZE 4096
struct cfserl {
struct cflayer layer;
struct cfpkt *incomplete_frm;
@@ -119,8 +120,8 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt)
/*
* Frame error handling
*/
- if (expectlen < CAIF_MINIUM_PACKET_SIZE
- || expectlen > CAIF_MAX_FRAMESIZE) {
+ if (expectlen < SERIAL_MINIUM_PACKET_SIZE
+ || expectlen > SERIAL_MAX_FRAMESIZE) {
if (!layr->usestx) {
if (pkt != NULL)
cfpkt_destroy(pkt);