diff options
author | Sjur Braendeland <sjur.brandeland@stericsson.com> | 2010-06-17 06:55:40 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-20 19:46:06 -0700 |
commit | 2aa40aef9debc77d55cc87a50d335b6fe97fbeb0 (patch) | |
tree | 0dccf47cf6cb861c7efa72601fab9511760c7e74 /net/caif/cfserl.c | |
parent | a7da1f55a826c621251874e7684c234972fc3216 (diff) |
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c index 965c5baace4..a11fbd68a13 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); |