Don't unset dev->stop, it's dangerous to mess with netdev internals
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 15 Apr 2009 03:47:42 +0000 (03:47 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 15 Apr 2009 03:47:42 +0000 (03:47 +0000)
Instead, unset IFF_RUNNUNG on the interface - this suppresses most
functionality of ath_stop().

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4001 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath.c

index 5e562ac566fbca3cc7606d41d9a955c2831d6a8f..4ed51723c711ab6797ec3188b0549f8909e47055 100644 (file)
@@ -1184,7 +1184,7 @@ ath_detach(struct net_device *dev)
        ATH_BBUF_LOCK_DESTROY(sc);
        ATH_GBUF_LOCK_DESTROY(sc);
        ATH_HAL_LOCK_DESTROY(sc);
-       dev->stop = NULL; /* prevent calling ath_stop again */
+       dev->flags &= ~IFF_RUNNING; /* mark as stopped */
        unregister_netdev(dev);
        return 0;
 }