Staging: wlan-ng: prism2_usb.c always enable the card in probe_usb
authorRichard Kennedy <richard@rsk.demon.co.uk>
Mon, 3 Nov 2008 11:13:48 +0000 (11:13 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Jan 2009 21:51:58 +0000 (13:51 -0800)
always enable card in probe_usb
& update register_wlandev to match latest wlan-ng-dev tree.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/wlan-ng/prism2usb.c

index 8d4959f514a802814f86ae3aa68deca2f34e4b35..8f7b1f281f0abf474ec733e33e92f45af89c3287 100644 (file)
@@ -110,11 +110,6 @@ static int prism2sta_probe_usb(
         * linux netdevice.
         */
        SET_NETDEV_DEV(wlandev->netdev, &(interface->dev));
-        if ( register_wlandev(wlandev) != 0 ) {
-               WLAN_LOG_ERROR("%s: register_wlandev() failed.\n", dev_info);
-               result = -EIO;
-               goto failed;
-        }
 
        /* Do a chip-level reset on the MAC */
        if (prism2_doreset) {
@@ -136,6 +131,15 @@ static int prism2sta_probe_usb(
 
        wlandev->msdstate = WLAN_MSD_HWPRESENT;
 
+        if ( register_wlandev(wlandev) != 0 ) {
+               WLAN_LOG_ERROR("%s: register_wlandev() failed.\n", dev_info);
+               result = -EIO;
+               goto failed;
+        }
+
+/* enable the card */
+       prism2sta_ifstate(wlandev, P80211ENUM_ifstate_enable);
+
        goto done;
 
  failed: