Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Zhang Shengju and committed by
David S. Miller
fe211cd8 a52a8a4d

+2 -2
+2 -2
drivers/staging/wilc1000/linux_mon.c
··· 111 111 } 112 112 113 113 skb->dev = wilc_wfi_mon; 114 - skb_set_mac_header(skb, 0); 114 + skb_reset_mac_header(skb); 115 115 skb->ip_summed = CHECKSUM_UNNECESSARY; 116 116 skb->pkt_type = PACKET_OTHERHOST; 117 117 skb->protocol = htons(ETH_P_802_2); ··· 215 215 cb_hdr->tx_flags = 0x0004; 216 216 217 217 skb2->dev = wilc_wfi_mon; 218 - skb_set_mac_header(skb2, 0); 218 + skb_reset_mac_header(skb2); 219 219 skb2->ip_summed = CHECKSUM_UNNECESSARY; 220 220 skb2->pkt_type = PACKET_OTHERHOST; 221 221 skb2->protocol = htons(ETH_P_802_2);