patch-2.1.120 linux/drivers/net/sdla_fr.c

Next file: linux/drivers/net/sdla_ppp.c
Previous file: linux/drivers/net/plip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.119/linux/drivers/net/sdla_fr.c linux/drivers/net/sdla_fr.c
@@ -158,7 +158,7 @@
 	unsigned long IB_addr;	/* physical address of Interface Byte */
 	unsigned long state_tick;	/* time of the last state change */
 	sdla_t *card;		/* -> owner */
-	struct enet_statistics ifstats;		/* interface statistics */
+	struct net_device_stats ifstats;		/* interface statistics */
 	unsigned long if_send_entry;
 	unsigned long if_send_skb_null;
 	unsigned long if_send_broadcast;
@@ -252,7 +252,7 @@
 	    unsigned short type, void *daddr, void *saddr, unsigned len);
 static int if_rebuild_hdr(struct sk_buff *skb);
 static int if_send(struct sk_buff *skb, struct device *dev);
-static struct enet_statistics *if_stats(struct device *dev);
+static struct net_device_stats *if_stats(struct device *dev);
 /* Interrupt handlers */
 static void fr502_isr(sdla_t * card);
 static void fr508_isr(sdla_t * card);
@@ -1225,12 +1225,15 @@
 
 /*============================================================================
  * Get Ethernet-style interface statistics.
- * Return a pointer to struct enet_statistics.
+ * Return a pointer to struct net_device_stats.
  */
 
 static struct net_device_stats *if_stats(struct device *dev)
 {
 	fr_channel_t *chan = dev->priv;
+	if(chan==NULL)
+		return NULL;
+		
 	return &chan->ifstats;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov