r3930 - branches/src/target/kernel/2.6.24.x/patches

werner at sita.openmoko.org werner at sita.openmoko.org
Wed Jan 23 01:43:59 CET 2008


Author: werner
Date: 2008-01-23 01:43:54 +0100 (Wed, 23 Jan 2008)
New Revision: 3930

Modified:
   branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch
Log:
Whenever our ar6k chip can not be identified, we are trying to unregister
our netdevice although it was never registered.
This patch fixes this bug.

Signed-off-by: Samuel Ortiz <sameo at openedhand.com>



Modified: branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch	2008-01-23 00:36:48 UTC (rev 3929)
+++ branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch	2008-01-23 00:43:54 UTC (rev 3930)
@@ -79,7 +79,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24-rc8/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
-@@ -0,0 +1,3069 @@
+@@ -0,0 +1,3070 @@
 +/*
 + *
 + * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -291,7 +291,7 @@
 +static void ar6000_init_control_info(AR_SOFTC_T *ar);
 +static int ar6000_data_tx(struct sk_buff *skb, struct net_device *dev);
 +
-+static void ar6000_destroy(struct net_device *dev);
++static void ar6000_destroy(struct net_device *dev, unsigned int unregister);
 +static void ar6000_detect_error(unsigned long ptr);
 +static struct net_device_stats *ar6000_get_stats(struct net_device *dev);
 +static struct iw_statistics *ar6000_get_iwstats(struct net_device * dev);
@@ -641,7 +641,7 @@
 +        if (ar6000_devices[i] != NULL) {
 +            ar6000_netdev = ar6000_devices[i];
 +            ar6000_devices[i] = NULL;
-+            ar6000_destroy(ar6000_netdev);
++            ar6000_destroy(ar6000_netdev, 1);
 +        }
 +    }
 +
@@ -924,7 +924,7 @@
 +    /* This runs the init function */
 +    if (register_netdev(dev)) {
 +        AR_DEBUG_PRINTF("ar6000_avail: register_netdev failed\n");
-+        ar6000_destroy(dev);
++        ar6000_destroy(dev, 0);
 +        return;
 +    }
 +
@@ -978,7 +978,7 @@
 +    AR_SOFTC_T *ar = (AR_SOFTC_T *)Instance;
 +        /* NULL out it's entry in the global list */
 +    ar6000_devices[ar->arDeviceIndex] = NULL;
-+    ar6000_destroy(ar->arNetDev);
++    ar6000_destroy(ar->arNetDev, 1);
 +}
 +
 +/*
@@ -996,7 +996,7 @@
 + *   removal since they will anyway not go through.
 + */
 +static void
-+ar6000_destroy(struct net_device *dev)
++ar6000_destroy(struct net_device *dev, unsigned int unregister)
 +{
 +    AR_SOFTC_T *ar;
 +
@@ -1086,7 +1086,8 @@
 +
 +
 +    /* Free up the device data structure */
-+    unregister_netdev(dev);
++    if (unregister)
++	    unregister_netdev(dev);
 +#ifndef free_netdev
 +    kfree(dev);
 +#else





More information about the commitlog mailing list