Commit b7eec52b authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

mac802154: tx: cleanup crc calculation

Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent cfa626cb
...@@ -84,11 +84,9 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb) ...@@ -84,11 +84,9 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
mac802154_monitors_rx(local, skb); mac802154_monitors_rx(local, skb);
if (!(local->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { if (!(local->hw.flags & IEEE802154_HW_OMIT_CKSUM)) {
u16 crc = crc_ccitt(0, skb->data, skb->len); __le16 crc = cpu_to_le16(crc_ccitt(0, skb->data, skb->len));
u8 *data = skb_put(skb, 2);
data[0] = crc & 0xff; memcpy(skb_put(skb, 2), &crc, 2);
data[1] = crc >> 8;
} }
if (skb_cow_head(skb, local->hw.extra_tx_headroom)) if (skb_cow_head(skb, local->hw.extra_tx_headroom))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment