diff options
Diffstat (limited to 'net/caif/cffrml.c')
-rw-r--r-- | net/caif/cffrml.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/caif/cffrml.c b/net/caif/cffrml.c index f39921171d0d..d3ca87bf23b7 100644 --- a/net/caif/cffrml.c +++ b/net/caif/cffrml.c | |||
@@ -136,20 +136,21 @@ static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
136 | 136 | ||
137 | static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt) | 137 | static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt) |
138 | { | 138 | { |
139 | int tmp; | ||
140 | u16 chks; | 139 | u16 chks; |
141 | u16 len; | 140 | u16 len; |
141 | __le16 data; | ||
142 | |||
142 | struct cffrml *this = container_obj(layr); | 143 | struct cffrml *this = container_obj(layr); |
143 | if (this->dofcs) { | 144 | if (this->dofcs) { |
144 | chks = cfpkt_iterate(pkt, cffrml_checksum, 0xffff); | 145 | chks = cfpkt_iterate(pkt, cffrml_checksum, 0xffff); |
145 | tmp = cpu_to_le16(chks); | 146 | data = cpu_to_le16(chks); |
146 | cfpkt_add_trail(pkt, &tmp, 2); | 147 | cfpkt_add_trail(pkt, &data, 2); |
147 | } else { | 148 | } else { |
148 | cfpkt_pad_trail(pkt, 2); | 149 | cfpkt_pad_trail(pkt, 2); |
149 | } | 150 | } |
150 | len = cfpkt_getlen(pkt); | 151 | len = cfpkt_getlen(pkt); |
151 | tmp = cpu_to_le16(len); | 152 | data = cpu_to_le16(len); |
152 | cfpkt_add_head(pkt, &tmp, 2); | 153 | cfpkt_add_head(pkt, &data, 2); |
153 | cfpkt_info(pkt)->hdr_len += 2; | 154 | cfpkt_info(pkt)->hdr_len += 2; |
154 | if (cfpkt_erroneous(pkt)) { | 155 | if (cfpkt_erroneous(pkt)) { |
155 | pr_err("Packet is erroneous!\n"); | 156 | pr_err("Packet is erroneous!\n"); |