summaryrefslogtreecommitdiff
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>2016-03-03 01:16:56 (GMT)
committerDavid S. Miller <davem@davemloft.net>2016-03-05 03:45:13 (GMT)
commitd57a544d71092a81c2064ff242009a38e7b1a631 (patch)
tree766d611834e1081f0430015a686de5d07bee4c62 /net/mac80211/tx.c
parent6b163a85478b27748bad219fe3ead7ac87217265 (diff)
downloadlinux-d57a544d71092a81c2064ff242009a38e7b1a631.tar.xz
mac80211: use reset to set header pointer
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/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3a7475f..62ad532 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2458,7 +2458,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
/* 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);
@@ -3973,9 +3973,9 @@ void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
{
int ac = ieee802_1d_to_ac[tid & 7];
- skb_set_mac_header(skb, 0);
- skb_set_network_header(skb, 0);
- skb_set_transport_header(skb, 0);
+ skb_reset_mac_header(skb);
+ skb_reset_network_header(skb);
+ skb_reset_transport_header(skb);
skb_set_queue_mapping(skb, ac);
skb->priority = tid;