Hi, I bought a LG AN-WF500 wifi adapter and I'm trying to use it on
OpenBSD with the driver bwfm. The driver supports the chipset BCM43242
but doesn't have the IDs for the adapter.

I tried to add the IDs to the driver (patch at the end of the mail) but
the kernel detects three devices and panics when tries to initialize the
first one. Sorry, I only have a photo of the panic:

https://juanfra.info/t/panic_bwfm_1.png

I'm not sure what the problem is but maybe the driver is trying to
initialize the wrong device. I don't know how to make the driver skips
the first device and try the others, so if you can help with it or have
a better idea...

The adapter is fullmac and works on Linux with the broadcom driver. This
is the output of "lsusb -v" from Linux and looks like the wifi chip is
the third device:


Bus 001 Device 003: ID 043e:3101 LG Electronics USA, Inc. AN-WF500 802.11abgn + 
BT Wireless Adapter [Broadcom BCM43242]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x043e LG Electronics USA, Inc.
  idProduct          0x3101 AN-WF500 802.11abgn + BT Wireless Adapter [Broadcom 
BCM43242]
  bcdDevice            0.01
  iManufacturer           1 Broadcom
  iProduct                4 Composite Wireless Adapter
  iSerial                 3 13597
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x005d
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass        224 Wireless
      bFunctionSubClass       1 Radio Frequency
      bFunctionProtocol       1 Bluetooth
      iFunction               5 Bluetooth MI
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              6 Bluetooth Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              6 Bluetooth Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0014  1x 20 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0014  1x 20 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2 
      bInterfaceProtocol    255 
      iInterface              2 BCMUSB 802.11 Wireless Adapter
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)



diff --git a/dev/usb/if_bwfm_usb.c b/dev/usb/if_bwfm_usb.c
index 505bb91cc9d..9a8c32aba01 100644
--- a/dev/usb/if_bwfm_usb.c
+++ b/dev/usb/if_bwfm_usb.c
@@ -60,6 +60,7 @@ static const struct usb_devno bwfm_usbdevs[] = {
        { USB_VENDOR_BROADCOM,  USB_PRODUCT_BROADCOM_BCM43242 },
        { USB_VENDOR_BROADCOM,  USB_PRODUCT_BROADCOM_BCM43569 },
        { USB_VENDOR_BROADCOM,  USB_PRODUCT_BROADCOM_BCMFW },
+       { USB_VENDOR_LG,        USB_PRODUCT_LG_AN_WF500 },
 };
 
 #ifdef BWFM_DEBUG
diff --git a/dev/usb/usbdevs b/dev/usb/usbdevs
index bc977839062..d6e4e1e9285 100644
--- a/dev/usb/usbdevs
+++ b/dev/usb/usbdevs
@@ -80,6 +80,7 @@ vendor FUJITSUCOMP    0x0430  Fujitsu Component
 vendor TAUGA           0x0436  Taugagreining HF
 vendor AMD             0x0438  Advanced Micro Devices
 vendor LEXMARK         0x043d  Lexmark International
+vendor LG              0x043e  LG Electronics
 vendor NANAO           0x0440  NANAO
 vendor ALPS            0x044e  Alps Electric
 vendor THRUST          0x044f  Thrustmaster
@@ -2518,6 +2519,9 @@ product LEXAR 2662WAR             0xa002  2662W-AR
 /* Lexmark products */
 product LEXMARK S2450          0x0009  Optra S 2450
 
+/* LG Electronics */
+product LG AN_WF500            0x3101  LG AN-WF500
+
 /* Liebert products */
 product LIEBERT UPS            0xffff  UPS
 product LIEBERT2 PSA           0x0001  PowerSure PSA UPS
diff --git a/dev/usb/usbdevs.h b/dev/usb/usbdevs.h
index 7c47e33fc74..85330f60674 100644
--- a/dev/usb/usbdevs.h
+++ b/dev/usb/usbdevs.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: usbdevs.h,v 1.696 2018/04/11 04:18:18 bket Exp $      */
+/*     $OpenBSD$       */
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -87,6 +87,7 @@
 #define        USB_VENDOR_TAUGA        0x0436          /* Taugagreining HF */
 #define        USB_VENDOR_AMD  0x0438          /* Advanced Micro Devices */
 #define        USB_VENDOR_LEXMARK      0x043d          /* Lexmark 
International */
+#define        USB_VENDOR_LG   0x043e          /* LG Electronics */
 #define        USB_VENDOR_NANAO        0x0440          /* NANAO */
 #define        USB_VENDOR_ALPS 0x044e          /* Alps Electric */
 #define        USB_VENDOR_THRUST       0x044f          /* Thrustmaster */
@@ -2525,6 +2526,9 @@
 /* Lexmark products */
 #define        USB_PRODUCT_LEXMARK_S2450       0x0009          /* Optra S 2450 
*/
 
+/* LG Electronics */
+#define        USB_PRODUCT_LG_AN_WF500 0x3101          /* LG AN-WF500 */
+
 /* Liebert products */
 #define        USB_PRODUCT_LIEBERT_UPS 0xffff          /* UPS */
 #define        USB_PRODUCT_LIEBERT2_PSA        0x0001          /* PowerSure 
PSA UPS */
diff --git a/dev/usb/usbdevs_data.h b/dev/usb/usbdevs_data.h
index ea0bfdba35c..4c69ddc3edb 100644
--- a/dev/usb/usbdevs_data.h
+++ b/dev/usb/usbdevs_data.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: usbdevs_data.h,v 1.690 2018/04/11 04:18:18 bket Exp $ */
+/*     $OpenBSD$       */
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -5529,6 +5529,10 @@ const struct usb_known_product usb_known_products[] = {
            USB_VENDOR_LEXMARK, USB_PRODUCT_LEXMARK_S2450,
            "Optra S 2450",
        },
+       {
+           USB_VENDOR_LG, USB_PRODUCT_LG_AN_WF500,
+           "LG AN-WF500",
+       },
        {
            USB_VENDOR_LIEBERT, USB_PRODUCT_LIEBERT_UPS,
            "UPS",
@@ -11753,6 +11757,10 @@ const struct usb_known_vendor usb_known_vendors[] = {
            USB_VENDOR_LEXMARK,
            "Lexmark International",
        },
+       {
+           USB_VENDOR_LG,
+           "LG Electronics",
+       },
        {
            USB_VENDOR_NANAO,
            "NANAO",

Reply via email to