cdc_eem.c (54ada34b4dfdb864ac602e13ff87581abe517ce9) cdc_eem.c (c3b26fdf1b32f91c7a3bc743384b4a298ab53ad7)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * USB CDC EEM network interface driver
4 * Copyright (C) 2009 Oberthur Technologies
5 * by Omar Laazimani, Olivier Condemine
6 */
7
8#include <linux/module.h>

--- 109 unchanged lines hidden (view full) ---

118 skb->data,
119 skb->len);
120 skb_set_tail_pointer(skb, len);
121 goto done;
122 }
123 }
124
125 skb2 = skb_copy_expand(skb, EEM_HEAD, ETH_FCS_LEN + padlen, flags);
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * USB CDC EEM network interface driver
4 * Copyright (C) 2009 Oberthur Technologies
5 * by Omar Laazimani, Olivier Condemine
6 */
7
8#include <linux/module.h>

--- 109 unchanged lines hidden (view full) ---

118 skb->data,
119 skb->len);
120 skb_set_tail_pointer(skb, len);
121 goto done;
122 }
123 }
124
125 skb2 = skb_copy_expand(skb, EEM_HEAD, ETH_FCS_LEN + padlen, flags);
126 dev_kfree_skb_any(skb);
126 if (!skb2)
127 return NULL;
128
127 if (!skb2)
128 return NULL;
129
129 dev_kfree_skb_any(skb);
130 skb = skb2;
131
132done:
133 /* we don't use the "no Ethernet CRC" option */
134 crc = crc32_le(~0, skb->data, skb->len);
135 crc = ~crc;
136
137 put_unaligned_le32(crc, skb_put(skb, 4));

--- 229 unchanged lines hidden ---
130 skb = skb2;
131
132done:
133 /* we don't use the "no Ethernet CRC" option */
134 crc = crc32_le(~0, skb->data, skb->len);
135 crc = ~crc;
136
137 put_unaligned_le32(crc, skb_put(skb, 4));

--- 229 unchanged lines hidden ---