From babcda74e9d96bb58fd9c6c5112dbdbff169e695 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 3 Nov 2008 21:11:17 -0800 Subject: drivers/net: Kill now superfluous ->last_rx stores. The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller --- drivers/net/hamradio/scc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/net/hamradio/scc.c') diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index c17e39bc546..802d1c7c4af 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -1627,7 +1627,6 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb) skb->protocol = ax25_type_trans(skb, scc->dev); netif_rx(skb); - scc->dev->last_rx = jiffies; return; } -- cgit v1.2.3 From f4bdd264b43cc60dccb617afce2859dffdd7a935 Mon Sep 17 00:00:00 2001 From: Wang Chen Date: Thu, 20 Nov 2008 01:02:05 -0800 Subject: netdevice hamradio: Convert directly reference of netdev->priv Since all the memory, which pointed by netdev->priv, are allocated in advance instead of by alloc_netdev(). Use netdev->ml_priv to point to those memory. Signed-off-by: Wang Chen Signed-off-by: David S. Miller --- drivers/net/hamradio/scc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/net/hamradio/scc.c') diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index 802d1c7c4af..c011af7088e 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -1518,7 +1518,7 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc) if (!dev) return -ENOMEM; - dev->priv = scc; + dev->ml_priv = scc; scc->dev = dev; spin_lock_init(&scc->lock); init_timer(&scc->tx_t); @@ -1575,7 +1575,7 @@ static void scc_net_setup(struct net_device *dev) static int scc_net_open(struct net_device *dev) { - struct scc_channel *scc = (struct scc_channel *) dev->priv; + struct scc_channel *scc = (struct scc_channel *) dev->ml_priv; if (!scc->init) return -EINVAL; @@ -1593,7 +1593,7 @@ static int scc_net_open(struct net_device *dev) static int scc_net_close(struct net_device *dev) { - struct scc_channel *scc = (struct scc_channel *) dev->priv; + struct scc_channel *scc = (struct scc_channel *) dev->ml_priv; unsigned long flags; netif_stop_queue(dev); @@ -1634,7 +1634,7 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb) static int scc_net_tx(struct sk_buff *skb, struct net_device *dev) { - struct scc_channel *scc = (struct scc_channel *) dev->priv; + struct scc_channel *scc = (struct scc_channel *) dev->ml_priv; unsigned long flags; char kisscmd; @@ -1704,7 +1704,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) struct scc_mem_config memcfg; struct scc_hw_config hwcfg; struct scc_calibrate cal; - struct scc_channel *scc = (struct scc_channel *) dev->priv; + struct scc_channel *scc = (struct scc_channel *) dev->ml_priv; int chan; unsigned char device_name[IFNAMSIZ]; void __user *arg = ifr->ifr_data; @@ -1951,7 +1951,7 @@ static int scc_net_set_mac_address(struct net_device *dev, void *addr) static struct net_device_stats *scc_net_get_stats(struct net_device *dev) { - struct scc_channel *scc = (struct scc_channel *) dev->priv; + struct scc_channel *scc = (struct scc_channel *) dev->ml_priv; scc->dev_stat.rx_errors = scc->stat.rxerrs + scc->stat.rx_over; scc->dev_stat.tx_errors = scc->stat.txerrs + scc->stat.tx_under; -- cgit v1.2.3