staging: r8712u: Set device type to wlan
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 24 Dec 2013 17:22:54 +0000 (11:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 18:35:25 +0000 (10:35 -0800)
The latest version of NetworkManager does not recognize the device as wireless
without this change.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/usb_intf.c

index dbefa43e4c2c50211cf4aa866896d875068b8147..bbd5888e316b788102743f9c5f4f655500045ef0 100644 (file)
@@ -353,6 +353,10 @@ static void disable_ht_for_spec_devid(const struct usb_device_id *pdid,
        }
 }
 
+static const struct device_type wlan_type = {
+       .name = "wlan",
+};
+
 /*
  * drv_init() - a device potentially for us
  *
@@ -388,6 +392,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
        padapter->pusb_intf = pusb_intf;
        usb_set_intfdata(pusb_intf, pnetdev);
        SET_NETDEV_DEV(pnetdev, &pusb_intf->dev);
+       pnetdev->dev.type = &wlan_type;
        /* step 2. */
        padapter->dvobj_init = &r8712_usb_dvobj_init;
        padapter->dvobj_deinit = &r8712_usb_dvobj_deinit;