wireless: use reset to set mac header
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Thu, 3 Mar 2016 01:16:57 +0000 (01:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Mar 2016 03:45:13 +0000 (22:45 -0500)
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>
net/wireless/util.c

index c7f6820bb25816346e35cd9935abed06446eafae..9f440a9de63b486e5fd565533fa01975621abbbb 100644 (file)
@@ -636,7 +636,7 @@ int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
        /* Update skb pointers to various headers since this modified frame
         * is going to go through Linux networking code that may potentially
         * need things like pointer to IP header. */
-       skb_set_mac_header(skb, 0);
+       skb_reset_mac_header(skb);
        skb_set_network_header(skb, nh_pos);
        skb_set_transport_header(skb, h_pos);
 
This page took 0.027398 seconds and 5 git commands to generate.