Skip to content

Commit fe211cd

Browse files
Zhang Shengjudavem330
authored andcommitted
staging: wilc1000: use reset to set mac header
Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a52a8a4 commit fe211cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/wilc1000/linux_mon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)
111111
}
112112

113113
skb->dev = wilc_wfi_mon;
114-
skb_set_mac_header(skb, 0);
114+
skb_reset_mac_header(skb);
115115
skb->ip_summed = CHECKSUM_UNNECESSARY;
116116
skb->pkt_type = PACKET_OTHERHOST;
117117
skb->protocol = htons(ETH_P_802_2);
@@ -215,7 +215,7 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
215215
cb_hdr->tx_flags = 0x0004;
216216

217217
skb2->dev = wilc_wfi_mon;
218-
skb_set_mac_header(skb2, 0);
218+
skb_reset_mac_header(skb2);
219219
skb2->ip_summed = CHECKSUM_UNNECESSARY;
220220
skb2->pkt_type = PACKET_OTHERHOST;
221221
skb2->protocol = htons(ETH_P_802_2);

0 commit comments

Comments
 (0)