Commit 0a4f23fb authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller

[HIPPI/FDDI]: Make {hippi,fddi}_type_trans set skb->dev

Now all the _type_trans routines are consistent in this regard.
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8fb7948
...@@ -3096,8 +3096,6 @@ static void dfx_rcv_queue_process( ...@@ -3096,8 +3096,6 @@ static void dfx_rcv_queue_process(
skb_reserve(skb,3); /* adjust data field so that it points to FC byte */ skb_reserve(skb,3); /* adjust data field so that it points to FC byte */
skb_put(skb, pkt_len); /* pass up packet length, NOT including CRC */ skb_put(skb, pkt_len); /* pass up packet length, NOT including CRC */
skb->dev = bp->dev; /* pass up device pointer */
skb->protocol = fddi_type_trans(skb, bp->dev); skb->protocol = fddi_type_trans(skb, bp->dev);
bp->rcv_total_bytes += skb->len; bp->rcv_total_bytes += skb->len;
netif_rx(skb); netif_rx(skb);
......
...@@ -1029,7 +1029,6 @@ static void rx_int(struct net_device *dev, u32 rxlimit, u32 index) ...@@ -1029,7 +1029,6 @@ static void rx_int(struct net_device *dev, u32 rxlimit, u32 index)
goto defer; goto defer;
} }
} }
skb->dev = dev;
skb->protocol = hippi_type_trans(skb, dev); skb->protocol = hippi_type_trans(skb, dev);
netif_rx(skb); /* send it up */ netif_rx(skb); /* send it up */
......
...@@ -1680,7 +1680,6 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, ...@@ -1680,7 +1680,6 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
rxd->rxd_os.skb = NULL; rxd->rxd_os.skb = NULL;
skb_trim(skb, len); skb_trim(skb, len);
skb->protocol = fddi_type_trans(skb, bp->dev); skb->protocol = fddi_type_trans(skb, bp->dev);
skb->dev = bp->dev; /* pass up device pointer */
netif_rx(skb); netif_rx(skb);
bp->dev->last_rx = jiffies; bp->dev->last_rx = jiffies;
......
...@@ -1784,7 +1784,6 @@ lcs_get_skb(struct lcs_card *card, char *skb_data, unsigned int skb_len) ...@@ -1784,7 +1784,6 @@ lcs_get_skb(struct lcs_card *card, char *skb_data, unsigned int skb_len)
card->stats.rx_dropped++; card->stats.rx_dropped++;
return; return;
} }
skb->dev = card->dev;
memcpy(skb_put(skb, skb_len), skb_data, skb_len); memcpy(skb_put(skb, skb_len), skb_data, skb_len);
skb->protocol = card->lan_type_trans(skb, card->dev); skb->protocol = card->lan_type_trans(skb, card->dev);
card->stats.rx_bytes += skb_len; card->stats.rx_bytes += skb_len;
......
...@@ -130,6 +130,7 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) ...@@ -130,6 +130,7 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev)
* to start of packet data. Assume 802.2 SNAP frames for now. * to start of packet data. Assume 802.2 SNAP frames for now.
*/ */
skb->dev = dev;
skb->mac.raw = skb->data; /* point to frame control (FC) */ skb->mac.raw = skb->data; /* point to frame control (FC) */
if(fddi->hdr.llc_8022_1.dsap==0xe0) if(fddi->hdr.llc_8022_1.dsap==0xe0)
......
...@@ -126,14 +126,14 @@ __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev) ...@@ -126,14 +126,14 @@ __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev)
{ {
struct hippi_hdr *hip; struct hippi_hdr *hip;
hip = (struct hippi_hdr *) skb->data;
/* /*
* This is actually wrong ... question is if we really should * This is actually wrong ... question is if we really should
* set the raw address here. * set the raw address here.
*/ */
skb->mac.raw = skb->data; skb->dev = dev;
skb_pull(skb, HIPPI_HLEN); skb->mac.raw = skb->data;
hip = (struct hippi_hdr *)skb->mac.raw;
skb_pull(skb, HIPPI_HLEN);
/* /*
* No fancy promisc stuff here now. * No fancy promisc stuff here now.
......
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