Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00a1f0a9 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'reset_mac_header'



Zhang Shengju says:

====================
use reset to set header pointers

This patch series replace set function with reset when offset is zero.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 94f7153e 3ef523ae
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1460,7 +1460,7 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request,
	reply->dev = dev;
	reply->dev = dev;
	skb_reserve(reply, LL_RESERVED_SPACE(request->dev));
	skb_reserve(reply, LL_RESERVED_SPACE(request->dev));
	skb_push(reply, sizeof(struct ethhdr));
	skb_push(reply, sizeof(struct ethhdr));
	skb_set_mac_header(reply, 0);
	skb_reset_mac_header(reply);


	ns = (struct nd_msg *)skb_transport_header(request);
	ns = (struct nd_msg *)skb_transport_header(request);


@@ -1480,7 +1480,7 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request,
	reply->protocol = htons(ETH_P_IPV6);
	reply->protocol = htons(ETH_P_IPV6);


	skb_pull(reply, sizeof(struct ethhdr));
	skb_pull(reply, sizeof(struct ethhdr));
	skb_set_network_header(reply, 0);
	skb_reset_network_header(reply);
	skb_put(reply, sizeof(struct ipv6hdr));
	skb_put(reply, sizeof(struct ipv6hdr));


	/* IPv6 header */
	/* IPv6 header */
@@ -1495,7 +1495,7 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request,
	pip6->saddr = *(struct in6_addr *)n->primary_key;
	pip6->saddr = *(struct in6_addr *)n->primary_key;


	skb_pull(reply, sizeof(struct ipv6hdr));
	skb_pull(reply, sizeof(struct ipv6hdr));
	skb_set_transport_header(reply, 0);
	skb_reset_transport_header(reply);


	na = (struct nd_msg *)skb_put(reply, sizeof(*na) + na_olen);
	na = (struct nd_msg *)skb_put(reply, sizeof(*na) + na_olen);


+2 −2
Original line number Original line Diff line number Diff line
@@ -844,7 +844,7 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
	hdr->rt_chbitmask = cpu_to_le16(flags);
	hdr->rt_chbitmask = cpu_to_le16(flags);


	skb->dev = hwsim_mon;
	skb->dev = hwsim_mon;
	skb_set_mac_header(skb, 0);
	skb_reset_mac_header(skb);
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->protocol = htons(ETH_P_802_2);
	skb->protocol = htons(ETH_P_802_2);
@@ -887,7 +887,7 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
	memcpy(hdr11->addr1, addr, ETH_ALEN);
	memcpy(hdr11->addr1, addr, ETH_ALEN);


	skb->dev = hwsim_mon;
	skb->dev = hwsim_mon;
	skb_set_mac_header(skb, 0);
	skb_reset_mac_header(skb);
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->protocol = htons(ETH_P_802_2);
	skb->protocol = htons(ETH_P_802_2);
+3 −3
Original line number Original line Diff line number Diff line
@@ -205,9 +205,9 @@ static void prepare_frame_for_deferred_tx(struct ieee80211_sub_if_data *sdata,
	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;


	skb_set_mac_header(skb, 0);
	skb_reset_mac_header(skb);
	skb_set_network_header(skb, 0);
	skb_reset_network_header(skb);
	skb_set_transport_header(skb, 0);
	skb_reset_transport_header(skb);


	/* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
	/* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
	skb_set_queue_mapping(skb, IEEE80211_AC_VO);
	skb_set_queue_mapping(skb, IEEE80211_AC_VO);
+1 −1
Original line number Original line Diff line number Diff line
@@ -3101,7 +3101,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
	ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom,
	ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom,
					 false);
					 false);


	skb_set_mac_header(skb, 0);
	skb_reset_mac_header(skb);
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->protocol = htons(ETH_P_802_2);
	skb->protocol = htons(ETH_P_802_2);
+1 −1
Original line number Original line Diff line number Diff line
@@ -697,7 +697,7 @@ void ieee80211_tx_monitor(struct ieee80211_local *local, struct sk_buff *skb,
					 rtap_len, shift);
					 rtap_len, shift);


	/* XXX: is this sufficient for BPF? */
	/* XXX: is this sufficient for BPF? */
	skb_set_mac_header(skb, 0);
	skb_reset_mac_header(skb);
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->pkt_type = PACKET_OTHERHOST;
	skb->protocol = htons(ETH_P_802_2);
	skb->protocol = htons(ETH_P_802_2);
Loading