aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>2016-12-01 20:51:07 -0500
committerDavid S. Miller <davem@davemloft.net>2016-12-03 15:49:16 -0500
commitfe211cd8d850c3f9ced08f8e88d6fdaeb8a2af8a (patch)
tree364c90b6a13f8763696841671f75b553fe5a0162
parenta52a8a4d98f82478d8ef0d121115b514a7f72f85 (diff)
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>
-rw-r--r--drivers/staging/wilc1000/linux_mon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 242f82f4d24f..f328d75de0d1 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -111,7 +111,7 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)
111 } 111 }
112 112
113 skb->dev = wilc_wfi_mon; 113 skb->dev = wilc_wfi_mon;
114 skb_set_mac_header(skb, 0); 114 skb_reset_mac_header(skb);
115 skb->ip_summed = CHECKSUM_UNNECESSARY; 115 skb->ip_summed = CHECKSUM_UNNECESSARY;
116 skb->pkt_type = PACKET_OTHERHOST; 116 skb->pkt_type = PACKET_OTHERHOST;
117 skb->protocol = htons(ETH_P_802_2); 117 skb->protocol = htons(ETH_P_802_2);
@@ -215,7 +215,7 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
215 cb_hdr->tx_flags = 0x0004; 215 cb_hdr->tx_flags = 0x0004;
216 216
217 skb2->dev = wilc_wfi_mon; 217 skb2->dev = wilc_wfi_mon;
218 skb_set_mac_header(skb2, 0); 218 skb_reset_mac_header(skb2);
219 skb2->ip_summed = CHECKSUM_UNNECESSARY; 219 skb2->ip_summed = CHECKSUM_UNNECESSARY;
220 skb2->pkt_type = PACKET_OTHERHOST; 220 skb2->pkt_type = PACKET_OTHERHOST;
221 skb2->protocol = htons(ETH_P_802_2); 221 skb2->protocol = htons(ETH_P_802_2);