kern/153454: [patch] [wlan] [urtw] Support ad-hoc and hostap modes in if_urtw(4)

Eugene Grosbein eugen at
Sun Dec 26 18:40:09 UTC 2010

>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
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 26 18:40:08 UTC 2010
>Originator:     Eugene Grosbein
>Release:        FreeBSD 8.2-PRERELEASE i386
System: FreeBSD 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #17: Sat Dec 11 23:58:55 NOVT 2010 root at i386


	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: <product 0x8189 vendor 0x0bda> 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.


	Try to enable hostap/ad-hoc modes with if_urtw, it won't.


--- 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 @@
-.Cm station
+.Cm station ,
+.Cm adhoc ,
+.Cm hostap ,
 .Cm monitor
 mode operation.

More information about the freebsd-bugs mailing list