diff options
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index f82c267e1886..c4392fcd4eb0 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -176,11 +176,11 @@ static int batadv_interface_tx(struct sk_buff *skb, | |||
176 | 176 | ||
177 | soft_iface->trans_start = jiffies; | 177 | soft_iface->trans_start = jiffies; |
178 | vid = batadv_get_vid(skb, 0); | 178 | vid = batadv_get_vid(skb, 0); |
179 | ethhdr = (struct ethhdr *)skb->data; | 179 | ethhdr = eth_hdr(skb); |
180 | 180 | ||
181 | switch (ntohs(ethhdr->h_proto)) { | 181 | switch (ntohs(ethhdr->h_proto)) { |
182 | case ETH_P_8021Q: | 182 | case ETH_P_8021Q: |
183 | vhdr = (struct vlan_ethhdr *)skb->data; | 183 | vhdr = vlan_eth_hdr(skb); |
184 | 184 | ||
185 | if (vhdr->h_vlan_encapsulated_proto != ethertype) | 185 | if (vhdr->h_vlan_encapsulated_proto != ethertype) |
186 | break; | 186 | break; |
@@ -194,7 +194,7 @@ static int batadv_interface_tx(struct sk_buff *skb, | |||
194 | goto dropped; | 194 | goto dropped; |
195 | 195 | ||
196 | /* skb->data might have been reallocated by batadv_bla_tx() */ | 196 | /* skb->data might have been reallocated by batadv_bla_tx() */ |
197 | ethhdr = (struct ethhdr *)skb->data; | 197 | ethhdr = eth_hdr(skb); |
198 | 198 | ||
199 | /* Register the client MAC in the transtable */ | 199 | /* Register the client MAC in the transtable */ |
200 | if (!is_multicast_ether_addr(ethhdr->h_source)) { | 200 | if (!is_multicast_ether_addr(ethhdr->h_source)) { |
@@ -230,7 +230,7 @@ static int batadv_interface_tx(struct sk_buff *skb, | |||
230 | /* skb->data may have been modified by | 230 | /* skb->data may have been modified by |
231 | * batadv_gw_dhcp_recipient_get() | 231 | * batadv_gw_dhcp_recipient_get() |
232 | */ | 232 | */ |
233 | ethhdr = (struct ethhdr *)skb->data; | 233 | ethhdr = eth_hdr(skb); |
234 | /* if gw_mode is on, broadcast any non-DHCP message. | 234 | /* if gw_mode is on, broadcast any non-DHCP message. |
235 | * All the DHCP packets are going to be sent as unicast | 235 | * All the DHCP packets are going to be sent as unicast |
236 | */ | 236 | */ |