Skip to content

Commit

Permalink
staging: wilc1000: use reset to set mac header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang Shengju authored and David S. Miller committed Dec 3, 2016
1 parent a52a8a4 commit fe211cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/wilc1000/linux_mon.c
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)
}

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

skb2->dev = wilc_wfi_mon;
skb_set_mac_header(skb2, 0);
skb_reset_mac_header(skb2);
skb2->ip_summed = CHECKSUM_UNNECESSARY;
skb2->pkt_type = PACKET_OTHERHOST;
skb2->protocol = htons(ETH_P_802_2);

0 comments on commit fe211cd

Please sign in to comment.