Jesse Keating 2f82dd
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
Jesse Keating 2f82dd
index f6ba846..03fd9dd 100644
Jesse Keating 2f82dd
--- a/drivers/media/dvb/dvb-core/dvb_net.c
Jesse Keating 2f82dd
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
Jesse Keating 2f82dd
@@ -125,6 +125,7 @@ static void hexdump( const unsigned char *buf, unsigned short len )
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
 struct dvb_net_priv {
Jesse Keating 2f82dd
 	int in_use;
Jesse Keating 2f82dd
+	struct net_device_stats stats;
Jesse Keating 2f82dd
 	u16 pid;
Jesse Keating 2f82dd
 	struct net_device *net;
Jesse Keating 2f82dd
 	struct dvb_net *host;
Jesse Keating 2f82dd
@@ -383,8 +384,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 				if (priv->ule_skb) {
Jesse Keating 2f82dd
 					dev_kfree_skb( priv->ule_skb );
Jesse Keating 2f82dd
 					/* Prepare for next SNDU. */
Jesse Keating 2f82dd
-					dev->stats.rx_errors++;
Jesse Keating 2f82dd
-					dev->stats.rx_frame_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_frame_errors++;
Jesse Keating 2f82dd
 				}
Jesse Keating 2f82dd
 				reset_ule(priv);
Jesse Keating 2f82dd
 				priv->need_pusi = 1;
Jesse Keating 2f82dd
@@ -437,8 +438,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 					dev_kfree_skb( priv->ule_skb );
Jesse Keating 2f82dd
 					/* Prepare for next SNDU. */
Jesse Keating 2f82dd
 					// reset_ule(priv);  moved to below.
Jesse Keating 2f82dd
-					dev->stats.rx_errors++;
Jesse Keating 2f82dd
-					dev->stats.rx_frame_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_frame_errors++;
Jesse Keating 2f82dd
 				}
Jesse Keating 2f82dd
 				reset_ule(priv);
Jesse Keating 2f82dd
 				/* skip to next PUSI. */
Jesse Keating 2f82dd
@@ -459,8 +460,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 						/* Drop partly decoded SNDU, reset state, resync on PUSI. */
Jesse Keating 2f82dd
 						if (priv->ule_skb) {
Jesse Keating 2f82dd
 							dev_kfree_skb( priv->ule_skb );
Jesse Keating 2f82dd
-							dev->stats.rx_errors++;
Jesse Keating 2f82dd
-							dev->stats.rx_frame_errors++;
Jesse Keating 2f82dd
+							priv->stats.rx_errors++;
Jesse Keating 2f82dd
+							priv->stats.rx_frame_errors++;
Jesse Keating 2f82dd
 						}
Jesse Keating 2f82dd
 						reset_ule(priv);
Jesse Keating 2f82dd
 						priv->need_pusi = 1;
Jesse Keating 2f82dd
@@ -476,8 +477,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 				if (priv->ule_sndu_remain > 183) {
Jesse Keating 2f82dd
 					/* Current SNDU lacks more data than there could be available in the
Jesse Keating 2f82dd
 					 * current TS cell. */
Jesse Keating 2f82dd
-					dev->stats.rx_errors++;
Jesse Keating 2f82dd
-					dev->stats.rx_length_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_length_errors++;
Jesse Keating 2f82dd
 					printk(KERN_WARNING "%lu: Expected %d more SNDU bytes, but "
Jesse Keating 2f82dd
 					       "got PUSI (pf %d, ts_remain %d).  Flushing incomplete payload.\n",
Jesse Keating 2f82dd
 					       priv->ts_count, priv->ule_sndu_remain, ts[4], ts_remain);
Jesse Keating 2f82dd
@@ -519,8 +520,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 				if (priv->ule_sndu_len < 5) {
Jesse Keating 2f82dd
 					printk(KERN_WARNING "%lu: Invalid ULE SNDU length %u. "
Jesse Keating 2f82dd
 					       "Resyncing.\n", priv->ts_count, priv->ule_sndu_len);
Jesse Keating 2f82dd
-					dev->stats.rx_errors++;
Jesse Keating 2f82dd
-					dev->stats.rx_length_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_errors++;
Jesse Keating 2f82dd
+					priv->stats.rx_length_errors++;
Jesse Keating 2f82dd
 					priv->ule_sndu_len = 0;
Jesse Keating 2f82dd
 					priv->need_pusi = 1;
Jesse Keating 2f82dd
 					new_ts = 1;
Jesse Keating 2f82dd
@@ -572,7 +573,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 			if (priv->ule_skb == NULL) {
Jesse Keating 2f82dd
 				printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n",
Jesse Keating 2f82dd
 				       dev->name);
Jesse Keating 2f82dd
-				dev->stats.rx_dropped++;
Jesse Keating 2f82dd
+				priv->stats.rx_dropped++;
Jesse Keating 2f82dd
 				return;
Jesse Keating 2f82dd
 			}
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
@@ -636,8 +637,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 				ule_dump = 1;
Jesse Keating 2f82dd
 #endif
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
-				dev->stats.rx_errors++;
Jesse Keating 2f82dd
-				dev->stats.rx_crc_errors++;
Jesse Keating 2f82dd
+				priv->stats.rx_errors++;
Jesse Keating 2f82dd
+				priv->stats.rx_crc_errors++;
Jesse Keating 2f82dd
 				dev_kfree_skb(priv->ule_skb);
Jesse Keating 2f82dd
 			} else {
Jesse Keating 2f82dd
 				/* CRC32 verified OK. */
Jesse Keating 2f82dd
@@ -743,8 +744,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
Jesse Keating 2f82dd
 				 * receive the packet anyhow. */
Jesse Keating 2f82dd
 				/* if (priv->ule_dbit && skb->pkt_type == PACKET_OTHERHOST)
Jesse Keating 2f82dd
 					priv->ule_skb->pkt_type = PACKET_HOST; */
Jesse Keating 2f82dd
-				dev->stats.rx_packets++;
Jesse Keating 2f82dd
-				dev->stats.rx_bytes += priv->ule_skb->len;
Jesse Keating 2f82dd
+				priv->stats.rx_packets++;
Jesse Keating 2f82dd
+				priv->stats.rx_bytes += priv->ule_skb->len;
Jesse Keating 2f82dd
 				netif_rx(priv->ule_skb);
Jesse Keating 2f82dd
 			}
Jesse Keating 2f82dd
 			sndu_done:
Jesse Keating 2f82dd
@@ -799,7 +800,8 @@ static void dvb_net_sec(struct net_device *dev,
Jesse Keating 2f82dd
 {
Jesse Keating 2f82dd
 	u8 *eth;
Jesse Keating 2f82dd
 	struct sk_buff *skb;
Jesse Keating 2f82dd
-	struct net_device_stats *stats = &dev->stats;
Jesse Keating 2f82dd
+	struct net_device_stats *stats =
Jesse Keating 2f82dd
+		&((struct dvb_net_priv *) netdev_priv(dev))->stats;
Jesse Keating 2f82dd
 	int snap = 0;
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
 	/* note: pkt_len includes a 32bit checksum */
Jesse Keating 2f82dd
@@ -1214,29 +1216,28 @@ static int dvb_net_stop(struct net_device *dev)
Jesse Keating 2f82dd
 	return dvb_net_feed_stop(dev);
Jesse Keating 2f82dd
 }
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
+static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
Jesse Keating 2f82dd
+{
Jesse Keating 2f82dd
+	return &((struct dvb_net_priv *) netdev_priv(dev))->stats;
Jesse Keating 2f82dd
+}
Jesse Keating 2f82dd
+
Jesse Keating 2f82dd
 static const struct header_ops dvb_header_ops = {
Jesse Keating 2f82dd
 	.create		= eth_header,
Jesse Keating 2f82dd
 	.parse		= eth_header_parse,
Jesse Keating 2f82dd
 	.rebuild	= eth_rebuild_header,
Jesse Keating 2f82dd
 };
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
-
Jesse Keating 2f82dd
-static const struct net_device_ops dvb_netdev_ops = {
Jesse Keating 2f82dd
-	.ndo_open		= dvb_net_open,
Jesse Keating 2f82dd
-	.ndo_stop		= dvb_net_stop,
Jesse Keating 2f82dd
-	.ndo_start_xmit		= dvb_net_tx,
Jesse Keating 2f82dd
-	.ndo_set_multicast_list = dvb_net_set_multicast_list,
Jesse Keating 2f82dd
-	.ndo_set_mac_address    = dvb_net_set_mac,
Jesse Keating 2f82dd
-	.ndo_change_mtu		= eth_change_mtu,
Jesse Keating 2f82dd
-	.ndo_validate_addr	= eth_validate_addr,
Jesse Keating 2f82dd
-};
Jesse Keating 2f82dd
-
Jesse Keating 2f82dd
 static void dvb_net_setup(struct net_device *dev)
Jesse Keating 2f82dd
 {
Jesse Keating 2f82dd
 	ether_setup(dev);
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
 	dev->header_ops		= &dvb_header_ops;
Jesse Keating 2f82dd
-	dev->netdev_ops		= &dvb_netdev_ops;
Jesse Keating 2f82dd
+	dev->open		= dvb_net_open;
Jesse Keating 2f82dd
+	dev->stop		= dvb_net_stop;
Jesse Keating 2f82dd
+	dev->hard_start_xmit	= dvb_net_tx;
Jesse Keating 2f82dd
+	dev->get_stats		= dvb_net_get_stats;
Jesse Keating 2f82dd
+	dev->set_multicast_list = dvb_net_set_multicast_list;
Jesse Keating 2f82dd
+	dev->set_mac_address    = dvb_net_set_mac;
Jesse Keating 2f82dd
 	dev->mtu		= 4096;
Jesse Keating 2f82dd
 	dev->mc_count           = 0;
Jesse Keating 2f82dd