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

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

diff -u --recursive --new-file v2.1.119/linux/drivers/net/sdla_ppp.c linux/drivers/net/sdla_ppp.c
@@ -848,7 +848,16 @@
 static struct enet_statistics *if_stats(struct device *dev)
 {
 	ppp_private_area_t *ppp_priv_area = dev->priv;
-	sdla_t *card = ppp_priv_area->card;
+	sdla_t *card;
+	
+	/*
+	 *	Device is down:No statistics
+	 */
+	 
+	if(ppp_priv_area==NULL)
+		return NULL;
+	
+	card = ppp_priv_area->card;
 	return &card->wandev.stats;
 }
 

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