[802.11] Properly reset state on interface closure
authorJoshua Oreman <oremanj@xenon.get-linux.org>
Sat, 13 Jun 2009 02:03:17 +0000 (19:03 -0700)
committerJoshua Oreman <oremanj@xenon.get-linux.org>
Sat, 13 Jun 2009 02:03:17 +0000 (19:03 -0700)
This fixes a bug that caused ifopen, ifclose, dhcp to fail.

src/net/net80211.c

index f378410..315ed0d 100644 (file)
@@ -198,6 +198,9 @@ void net80211_netdev_close ( struct net_device *netdev )
        if ( dev->state & NET80211_WORKING )
                process_del ( &dev->proc_assoc );
 
+       dev->state = 0;
+       dev->netdev->state &= ~NETDEV_LINK_UP;
+
        if ( dev->op->close )
                dev->op->close ( dev );
 }