We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfa626c commit b7eec52Copy full SHA for b7eec52
net/mac802154/tx.c
@@ -84,11 +84,9 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
84
mac802154_monitors_rx(local, skb);
85
86
if (!(local->hw.flags & IEEE802154_HW_OMIT_CKSUM)) {
87
- u16 crc = crc_ccitt(0, skb->data, skb->len);
88
- u8 *data = skb_put(skb, 2);
+ __le16 crc = cpu_to_le16(crc_ccitt(0, skb->data, skb->len));
89
90
- data[0] = crc & 0xff;
91
- data[1] = crc >> 8;
+ memcpy(skb_put(skb, 2), &crc, 2);
92
}
93
94
if (skb_cow_head(skb, local->hw.extra_tx_headroom))
0 commit comments