On Thu, Nov 12, 2020 at 11:01 PM Jonathan Matthew <[email protected]> wrote:
>
> On Thu, Nov 12, 2020 at 03:31:09PM -0500, Morgan Aldridge wrote:
> > >Synopsis:      Edimax EW-7811Un V2 not detected by urtwn
> > >Category:      kernel amd64
> > >Environment:
> >         System      : OpenBSD 6.8
> >         Details     : OpenBSD 6.8 (GENERIC.MP) #0: Wed Oct 28 10:06:34 MDT 
> > 2020
> >
> > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> >         Architecture: OpenBSD.amd64
> >         Machine     : amd64
> > >Description:
> >         I purchased an Edimax EW-7811Un USB WiFi adapter after a number of
> >         suggestions that it is commonly supported by urtwn(4) on OpenBSD, 
> > but
> >         they seem to be shipping new V2 model which is still identified as
> >         Realtek, but has a new device ID of 0xb811 (instead of 0x7811).
> >
> >         dmesg shows:
> >
> >         ugen2 at uhub1 port 2 "Realtek Edimax N150 Adapter" rev 2.00/0.00 
> > addr 2
> >
> >         usbdevs shows:
> >
> >         addr 02: 7392:b811 Realtek, Edimax N150 Adapter
> >                  high speed, power 500 mA, config 1, rev 0.00, iSerial
> > 08BEAC0EEAA1
> >                  driver: ugen2
> >
> >         fw_update does not fetch the urtwn firmware.
> >
> >         I'm not 100% sure that this is still using the same chipset, but it
> >         seems like it's at least still using a Realtek chipset, and am
> >         happy to provide further details or even send the device to a
> >         developer. I'm tempted to just add the new device ID  to usbdevs and
> >         if_urtwn.c and see if it works, but I don't know what the risks are.
> > >How-To-Repeat:
> >         Plug Edimax EW-7811Un V2 to USB port, run fw_update, dmesg, and 
> > usbdevs.
> > >Fix:
> >         Maybe we can just add the new device ID to usbdevs & if_urtwn.c, but
> >         I'm not sure.
>
> It looks like this device is RTL8188EU based (not RTL8188CU like the 7811Un), 
> since
> the linux driver they offer for download is called rtl8188EUS, so you'd add
>
>         URTWN_DEV_8188EU(EDIMAX, EW7811UNV2)
>
> to the urtwn device list.

Thanks for the tip! I have confirmed that from the Linux drivers and
the following diff works for me on GENERIC.MP amd64:

Index: sys/dev/usb/if_urtwn.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.95
diff -u -p -u -p -r1.95 if_urtwn.c
--- sys/dev/usb/if_urtwn.c      12 Nov 2020 13:31:19 -0000      1.95
+++ sys/dev/usb/if_urtwn.c      13 Nov 2020 20:32:45 -0000
@@ -326,6 +326,7 @@ static const struct urtwn_type {
        URTWN_DEV_8188EU(DLINK,         DWA121B1),
        URTWN_DEV_8188EU(DLINK,         DWA123D1),
        URTWN_DEV_8188EU(DLINK,         DWA125D1),
+       URTWN_DEV_8188EU(EDIMAX,        EW7811UNV2),
        URTWN_DEV_8188EU(ELECOM,        WDC150SU2M),
        URTWN_DEV_8188EU(REALTEK,       RTL8188ETV),
        URTWN_DEV_8188EU(REALTEK,       RTL8188EU),
Index: sys/dev/usb/usbdevs
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.726
diff -u -p -u -p -r1.726 usbdevs
--- sys/dev/usb/usbdevs 11 Nov 2020 12:59:18 -0000      1.726
+++ sys/dev/usb/usbdevs 13 Nov 2020 20:32:45 -0000
@@ -1704,6 +1704,7 @@ product EDIMAX EW7717             0x7717
EW-7717
 product EDIMAX EW7718          0x7718  EW-7718
 product EDIMAX EW7722UTN       0x7722  EW-7722UTn
 product EDIMAX EW7811UN                0x7811  EW-7811Un
+product EDIMAX EW7811UNV2      0xb811  EW-7811Un V2
 product EDIMAX RTL8192CU       0x7822  RTL8192CU
 product EDIMAX EW7611ULB       0xa611  EW-7611ULB
 product EDIMAX EW7822ULC       0xb822  EW-7822ULC
Index: sys/dev/usb/usbdevs.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.738
diff -u -p -u -p -r1.738 usbdevs.h
--- sys/dev/usb/usbdevs.h       11 Nov 2020 12:59:44 -0000      1.738
+++ sys/dev/usb/usbdevs.h       13 Nov 2020 20:32:45 -0000
@@ -1,4 +1,4 @@
-/*     $OpenBSD: usbdevs.h,v 1.738 2020/11/11 12:59:44 patrick Exp $   */
+/*     $OpenBSD$       */

 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -1711,6 +1711,7 @@
 #define        USB_PRODUCT_EDIMAX_EW7718       0x7718          /* EW-7718 */
 #define        USB_PRODUCT_EDIMAX_EW7722UTN    0x7722          /* EW-7722UTn */
 #define        USB_PRODUCT_EDIMAX_EW7811UN     0x7811          /* EW-7811Un */
+#define        USB_PRODUCT_EDIMAX_EW7811UNV2   0xb811          /*
EW-7811Un V2 */
 #define        USB_PRODUCT_EDIMAX_RTL8192CU    0x7822          /* RTL8192CU */
 #define        USB_PRODUCT_EDIMAX_EW7611ULB    0xa611          /* EW-7611ULB */
 #define        USB_PRODUCT_EDIMAX_EW7822ULC    0xb822          /* EW-7822ULC */
Index: sys/dev/usb/usbdevs_data.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v
retrieving revision 1.732
diff -u -p -u -p -r1.732 usbdevs_data.h
--- sys/dev/usb/usbdevs_data.h  11 Nov 2020 12:59:44 -0000      1.732
+++ sys/dev/usb/usbdevs_data.h  13 Nov 2020 20:32:46 -0000
@@ -1,4 +1,4 @@
-/*     $OpenBSD: usbdevs_data.h,v 1.732 2020/11/11 12:59:44 patrick
Exp $      */
+/*     $OpenBSD$       */

 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -3016,6 +3016,10 @@ const struct usb_known_product usb_known
        {
            USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7811UN,
            "EW-7811Un",
+       },
+       {
+           USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7811UNV2,
+           "EW-7811Un V2",
        },
        {
            USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_RTL8192CU,

Reply via email to