Commit f8eb5ee5 authored by Bing Zhao's avatar Bing Zhao Committed by John W. Linville

mwifiex: avoid using variable name eth_hdr

eth_hdr is defined in kernel. Use a different variable name in
our functions.
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c613d16f
...@@ -36,12 +36,12 @@ mwifiex_discard_gratuitous_arp(struct mwifiex_private *priv, ...@@ -36,12 +36,12 @@ mwifiex_discard_gratuitous_arp(struct mwifiex_private *priv,
struct sk_buff *skb) struct sk_buff *skb)
{ {
const struct mwifiex_arp_eth_header *arp; const struct mwifiex_arp_eth_header *arp;
struct ethhdr *eth_hdr; struct ethhdr *eth;
struct ipv6hdr *ipv6; struct ipv6hdr *ipv6;
struct icmp6hdr *icmpv6; struct icmp6hdr *icmpv6;
eth_hdr = (struct ethhdr *)skb->data; eth = (struct ethhdr *)skb->data;
switch (ntohs(eth_hdr->h_proto)) { switch (ntohs(eth->h_proto)) {
case ETH_P_ARP: case ETH_P_ARP:
arp = (void *)(skb->data + sizeof(struct ethhdr)); arp = (void *)(skb->data + sizeof(struct ethhdr));
if (arp->hdr.ar_op == htons(ARPOP_REPLY) || if (arp->hdr.ar_op == htons(ARPOP_REPLY) ||
...@@ -87,7 +87,7 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv, ...@@ -87,7 +87,7 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
struct rx_packet_hdr *rx_pkt_hdr; struct rx_packet_hdr *rx_pkt_hdr;
struct rxpd *local_rx_pd; struct rxpd *local_rx_pd;
int hdr_chop; int hdr_chop;
struct ethhdr *eth_hdr; struct ethhdr *eth;
local_rx_pd = (struct rxpd *) (skb->data); local_rx_pd = (struct rxpd *) (skb->data);
...@@ -109,7 +109,7 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv, ...@@ -109,7 +109,7 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
* To create the Ethernet II, just move the src, dst address * To create the Ethernet II, just move the src, dst address
* right before the snap_type. * right before the snap_type.
*/ */
eth_hdr = (struct ethhdr *) eth = (struct ethhdr *)
((u8 *) &rx_pkt_hdr->eth803_hdr ((u8 *) &rx_pkt_hdr->eth803_hdr
+ sizeof(rx_pkt_hdr->eth803_hdr) + + sizeof(rx_pkt_hdr->eth803_hdr) +
sizeof(rx_pkt_hdr->rfc1042_hdr) sizeof(rx_pkt_hdr->rfc1042_hdr)
...@@ -117,14 +117,14 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv, ...@@ -117,14 +117,14 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
- sizeof(rx_pkt_hdr->eth803_hdr.h_source) - sizeof(rx_pkt_hdr->eth803_hdr.h_source)
- sizeof(rx_pkt_hdr->rfc1042_hdr.snap_type)); - sizeof(rx_pkt_hdr->rfc1042_hdr.snap_type));
memcpy(eth_hdr->h_source, rx_pkt_hdr->eth803_hdr.h_source, memcpy(eth->h_source, rx_pkt_hdr->eth803_hdr.h_source,
sizeof(eth_hdr->h_source)); sizeof(eth->h_source));
memcpy(eth_hdr->h_dest, rx_pkt_hdr->eth803_hdr.h_dest, memcpy(eth->h_dest, rx_pkt_hdr->eth803_hdr.h_dest,
sizeof(eth_hdr->h_dest)); sizeof(eth->h_dest));
/* Chop off the rxpd + the excess memory from the 802.2/llc/snap /* Chop off the rxpd + the excess memory from the 802.2/llc/snap
header that was removed. */ header that was removed. */
hdr_chop = (u8 *) eth_hdr - (u8 *) local_rx_pd; hdr_chop = (u8 *) eth - (u8 *) local_rx_pd;
} else { } else {
/* Chop off the rxpd */ /* Chop off the rxpd */
hdr_chop = (u8 *) &rx_pkt_hdr->eth803_hdr - hdr_chop = (u8 *) &rx_pkt_hdr->eth803_hdr -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment