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

Commit 86e65da9 authored by David S. Miller's avatar David S. Miller Committed by David S. Miller
Browse files

[NET]: Remove explicit initializations of skb->input_dev



Instead, set it in one place, namely the beginning of
netif_receive_skb().

Based upon suggestions from Jamal Hadi Salim.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0742fd53
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1786,7 +1786,6 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
		lp->stats.rx_bytes += skb->len;
	}
	skb->dev = ndev;
	skb->input_dev = ndev;
	skb->pkt_type = PACKET_HOST;
	skb->mac.raw = skb->data;
#ifdef ISDN_DEBUG_NET_DUMP
+0 −1
Original line number Diff line number Diff line
@@ -1177,7 +1177,6 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
		mlp->huptimer = 0;
#endif /* CONFIG_IPPP_FILTER */
	skb->dev = dev;
	skb->input_dev = dev;
	skb->mac.raw = skb->data;
	netif_rx(skb);
	/* net_dev->local->stats.rx_packets++; done in isdn_net.c */
+0 −1
Original line number Diff line number Diff line
@@ -1657,7 +1657,6 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
			skb->dev = ppp->dev;
			skb->protocol = htons(npindex_to_ethertype[npi]);
			skb->mac.raw = skb->data;
			skb->input_dev = ppp->dev;
			netif_rx(skb);
			ppp->dev->last_rx = jiffies;
		}
+3 −3
Original line number Diff line number Diff line
@@ -352,10 +352,10 @@ tcf_change_indev(struct tcf_proto *tp, char *indev, struct rtattr *indev_tlv)
static inline int
tcf_match_indev(struct sk_buff *skb, char *indev)
{
	if (0 != indev[0]) {
		if  (NULL == skb->input_dev)
	if (indev[0]) {
		if  (!skb->input_dev)
			return 0;
		else if (0 != strcmp(indev, skb->input_dev->name))
		if (strcmp(indev, skb->input_dev->name))
			return 0;
	}

+0 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev)
{
	skb->mac.raw = skb->data;
	skb->input_dev = skb->dev = dev;
	skb->pkt_type = PACKET_HOST;
	
	return htons(ETH_P_X25);
Loading