Making OpenBSD 4.3 detect a D-Link DWA-110 USB Wireless adapter

I bought a D-Link USB Wireless adapater, more specifically, a DWA-110. I wanted to use the device on my very old desktop with OpenBSD 4.3 installed (I'm currently using that box as a "mini" router at home). Before I bouoght the device, I browsed through OpenBSD's list of supported wireless devices. And, sure enough, DWA-100 has a Ralink chipset that is supported by the rum driver. Now, being an idiot that I usually am, I forgot to check the branch (the driver code is still on -current) and bought the device. By now you probably know what happened next...

Out of sheer desperation, I tried following the commits made to -current that enabled the driver support for this device. Luckily, I got it working - well I haven't really used it much so there could still be quirks along the way.

Below is a simple diff of the modifications that I applied (I would have given a link to the diff file but unfortunately I don't have any place to upload files... you'll just have to make do with this ugly white on black html version of the diff file):



diff -ruN src.orig/sys/dev/usb/if_rum.c src/sys/dev/usb/if_rum.c
--- src.orig/sys/dev/usb/if_rum.c 2008-03-05 03:42:04.000000000 +0800
+++ src/sys/dev/usb/if_rum.c 2008-09-17 03:59:44.000000000 +0800
@@ -97,6 +97,7 @@
{ USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GL },
{ USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_CWD854F },
{ USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_RT2573 },
+ { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110 },
{ USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWLG122C1 },
{ USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_WUA1340 },
{ USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB01GS },
diff -ruN src.orig/sys/dev/usb/usbdevs src/sys/dev/usb/usbdevs
--- src.orig/sys/dev/usb/usbdevs 2008-03-05 03:42:04.000000000 +0800
+++ src/sys/dev/usb/usbdevs 2008-09-17 03:59:29.000000000 +0800
@@ -1083,6 +1083,7 @@
product DLINK2 DWLG122C1 0x3c03 DWL-G122 rev C1
product DLINK2 WUA1340 0x3c04 WUA-1340
product DLINK DUBE100B1 0x3c05 DUB-E100 rev B1
+product DLINK2 DWA110 0x3c07 DWA-110
product DLINK2 RT2870 0x3c09 RT2870
product DLINK DSB650C 0x4000 10Mbps ethernet
product DLINK DSB650TX1 0x4001 10/100 ethernet
diff -ruN src.orig/sys/dev/usb/usbdevs_data.h src/sys/dev/usb/usbdevs_data.h
--- src.orig/sys/dev/usb/usbdevs_data.h 2008-03-05 03:42:05.000000000 +0800
+++ src/sys/dev/usb/usbdevs_data.h 2008-09-17 04:00:20.000000000 +0800
@@ -1465,6 +1465,10 @@
"DUB-E100 rev B1",
},
{
+ USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110,
+ "DWA110",
+ },
+ {
USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870,
"RT2870",
},
diff -ruN src.orig/sys/dev/usb/usbdevs.h src/sys/dev/usb/usbdevs.h
--- src.orig/sys/dev/usb/usbdevs.h 2008-03-05 03:42:04.000000000 +0800
+++ src/sys/dev/usb/usbdevs.h 2008-09-17 03:59:59.000000000 +0800
@@ -1090,6 +1090,7 @@
#define USB_PRODUCT_DLINK2_DWLG122C1 0x3c03 /* DWL-G122 rev C1 */
#define USB_PRODUCT_DLINK2_WUA1340 0x3c04 /* WUA-1340 */
#define USB_PRODUCT_DLINK_DUBE100B1 0x3c05 /* DUB-E100 rev B1 */
+#define USB_PRODUCT_DLINK2_DWA110 0x3c07 /* DWA110 */
#define USB_PRODUCT_DLINK2_RT2870 0x3c09 /* RT2870 */
#define USB_PRODUCT_DLINK_DSB650C 0x4000 /* 10Mbps ethernet */
#define USB_PRODUCT_DLINK_DSB650TX1 0x4001 /* 10/100 ethernet */

No comments: