From owner-freebsd-usb@FreeBSD.ORG Wed Oct 19 08:00:28 2011 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C10F1065697 for ; Wed, 19 Oct 2011 08:00:28 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9041D8FC18 for ; Wed, 19 Oct 2011 08:00:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J80Mte095790 for ; Wed, 19 Oct 2011 08:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9J80MU1095789; Wed, 19 Oct 2011 08:00:22 GMT (envelope-from gnats) Resent-Date: Wed, 19 Oct 2011 08:00:22 GMT Resent-Message-Id: <201110190800.p9J80MU1095789@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Zahemszky@FreeBSD.org, Gábor Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BD581065672 for ; Wed, 19 Oct 2011 07:51:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 51B648FC12 for ; Wed, 19 Oct 2011 07:51:49 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J7pm46075869 for ; Wed, 19 Oct 2011 07:51:48 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p9J7pm6x075867; Wed, 19 Oct 2011 07:51:48 GMT (envelope-from nobody) Message-Id: <201110190751.p9J7pm6x075867@red.freebsd.org> Date: Wed, 19 Oct 2011 07:51:48 GMT From: Zahemszky@FreeBSD.org, Gábor To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/161798: usbdevs / if_run.c modification X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 08:00:29 -0000 >Number: 161798 >Category: usb >Synopsis: usbdevs / if_run.c modification >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 19 08:00:22 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Zahemszky, Gábor >Release: 8.2-p3 i386 >Organization: Zahemszky Ltd. >Environment: FreeBSD Lappantyu.Zahemszky.hu 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:07:27 UTC 2011 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: I bought a wlan adapter for my TV. I tried it under FreeBSD, but it couldn't recognise it. So I made my homework, and here is the output. It is a "Samsung WIS09ABGN Wireless LAN Adapter". It has Ralink chipset in it, so the if_run and runfw drivers should work with it. Here is the info and the usbconfig outputs: Name: Samsung Wireless LAN Adapter WIS09ABGN (for selected 2009-2011 models of Samsung TVs & Blu-Ray Players) Model: WIS09ABGN Model Code: WIS09ABGNX/XEC it should work - and it works! - with the if_run & runfw drivers # usbconfig -d 2.2 dump_device_desc ugen2.2: <802.11 n WLAN Ralink> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x04e8 idProduct = 0x2018 bcdDevice = 0x0101 iManufacturer = 0x0001 iProduct = 0x0002 <802.11 n WLAN> iSerialNumber = 0x0003 <1.0> bNumConfigurations = 0x0001 # usbconfig -d 2.2 dump_all_config_desc ugen2.2: <802.11 n WLAN Ralink> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0035 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x0080 bMaxPower = 0x00e1 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0005 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0005 <1.0> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0001 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 2 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 3 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0003 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 4 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0004 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 === This output is with the original if_run and runfw modules. After it, I made two small changes in the src: a) added the device info into /usr/src/sys/dev/usb/usbdevs file: product SAMSUNG WIS09ABGN 0x2018 WIS09ABGN Wireless LAN adapter b) and added it to the known list of HWs in the /usr/src/sys/dev/usb/wlan/if_run.c file: RUN_DEV(SAMSUNG, WIS09ABGN), unloading the original module, generating the new (with cd /usrs/src/sys/modules/usb/run make commands) and loading it with: kldload runfw kldload ./if_run.ko and voila, the system has a new run0 interface. After it, created the wlan0 interface, started wpa_supplicant and dhclient, and I have a working wifi connection. usbconfig -d 2.2 - with the "modified" driver ugen2.2: <802.11 n WLAN Ralink> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON It is on FreeBSD 8.2-p3 i386. >How-To-Repeat: Buy a Samsung-TV wifi dongle, and try it under FreeBSD. >Fix: Put the product SAMSUNG WIS09ABGN 0x2018 WIS09ABGN Wireless LAN adapter line into usbdevs, and the RUN_DEV(SAMSUNG, WIS09ABGN), line into if_run.c. After it, it should work. >Release-Note: >Audit-Trail: >Unformatted: