From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 26 18:40:09 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64ACC106566C for ; Sun, 26 Dec 2010 18:40:09 +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 26AB58FC19 for ; Sun, 26 Dec 2010 18:40:09 +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 oBQIe953061836 for ; Sun, 26 Dec 2010 18:40:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oBQIe9L9061834; Sun, 26 Dec 2010 18:40:09 GMT (envelope-from gnats) Resent-Date: Sun, 26 Dec 2010 18:40:09 GMT Resent-Message-Id: <201012261840.oBQIe9L9061834@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eugene Grosbein Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15C2F106564A for ; Sun, 26 Dec 2010 18:34:59 +0000 (UTC) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (grosbein.pp.ru [89.189.172.146]) by mx1.freebsd.org (Postfix) with ESMTP id 6120C8FC08 for ; Sun, 26 Dec 2010 18:34:57 +0000 (UTC) Received: from grosbein.pp.ru (localhost [127.0.0.1]) by grosbein.pp.ru (8.14.4/8.14.4) with ESMTP id oBQIIuMd018841 for ; Mon, 27 Dec 2010 00:18:56 +0600 (NOVT) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.14.4/8.14.4/Submit) id oBQIItWt018840; Mon, 27 Dec 2010 00:18:55 +0600 (NOVT) (envelope-from eugen) Message-Id: <201012261818.oBQIItWt018840@grosbein.pp.ru> Date: Mon, 27 Dec 2010 00:18:55 +0600 (NOVT) From: Eugene Grosbein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/153454: [patch] [wlan] [urtw] Support ad-hoc and hostap modes in if_urtw(4) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eugene Grosbein List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2010 18:40:09 -0000 >Number: 153454 >Category: kern >Synopsis: [patch] [wlan] [urtw] Support ad-hoc and hostap modes in if_urtw(4) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 26 18:40:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 8.2-PRERELEASE i386 >Organization: RDTC JSC >Environment: System: FreeBSD grosbein.pp.ru 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #17: Sat Dec 11 23:58:55 NOVT 2010 root@grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386 >Description: Currently, if_urtw(4) driver for Realtek wireless NICs supports only station and monitor modes. I have a notebook with embedded USB wireless NIC supported with this driver and was able to successfully setup it in ad-hoc mode and in hostap mode (with and without hostapd) and connect my Nokia E72 smartphone to the Internet over wifi using this notebook after applying the following patch to the driver. usbconfig shows me: ugen7.2: at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON I've used standard instructions from the Handbook (never dealt with Wifi devices before) and found no problems with one exception: "ifconfig wlan0 scan" does not work but "ifconfig wlan0 list scan" does. >How-To-Repeat: Try to enable hostap/ad-hoc modes with if_urtw, it won't. >Fix: --- sys/dev/usb/wlan/if_urtw.c.orig 2010-12-26 21:04:47.000000000 +0600 +++ sys/dev/usb/wlan/if_urtw.c 2010-12-26 21:05:32.000000000 +0600 @@ -880,6 +880,8 @@ ic->ic_caps = IEEE80211_C_STA | /* station mode */ IEEE80211_C_MONITOR | /* monitor mode supported */ + IEEE80211_C_IBSS | /* ad-hoc mode supported */ + IEEE80211_C_HOSTAP | /* access point mode supported */ IEEE80211_C_TXPMGT | /* tx power management */ IEEE80211_C_SHPREAMBLE | /* short preamble supported */ IEEE80211_C_SHSLOT | /* short slot time supported */ --- share/man/man4/urtw.4.orig 2010-12-27 00:02:10.000000000 +0600 +++ share/man/man4/urtw.4 2010-12-27 00:06:40.000000000 +0600 @@ -56,7 +56,9 @@ .Pp .Nm supports -.Cm station +.Cm station , +.Cm adhoc , +.Cm hostap , and .Cm monitor mode operation. >Release-Note: >Audit-Trail: >Unformatted: