diff options
author | Zhang Shengju <zhangshengju@cmss.chinamobile.com> | 2016-03-03 02:16:57 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-05 04:45:13 +0100 |
commit | 3ef523aeeee88130e5de10adac719dbd6fa266e5 (patch) | |
tree | b209c79368a94aeb3694f2ff4158288156fae9ba /net/wireless | |
parent | mac80211: use reset to set header pointer (diff) | |
download | linux-3ef523aeeee88130e5de10adac719dbd6fa266e5.tar.xz linux-3ef523aeeee88130e5de10adac719dbd6fa266e5.zip |
wireless: 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>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index c7f6820bb258..9f440a9de63b 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -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); |