caif: Bad assert triggering false positive.
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>
Tue, 6 Dec 2011 12:15:42 +0000 (12:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Dec 2011 22:21:47 +0000 (17:21 -0500)
Fix bad assert on fragment size triggering false positive.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/cfrfml.c

index 81660f8..6dc75d4 100644 (file)
@@ -190,7 +190,7 @@ out:
 
 static int cfrfml_transmit_segment(struct cfrfml *rfml, struct cfpkt *pkt)
 {
-       caif_assert(cfpkt_getlen(pkt) < rfml->fragment_size);
+       caif_assert(cfpkt_getlen(pkt) < rfml->fragment_size + RFM_HEAD_SIZE);
 
        /* Add info for MUX-layer to route the packet out. */
        cfpkt_info(pkt)->channel_id = rfml->serv.layer.id;