Bug 153454 - [patch] [wlan] [urtw] Support ad-hoc and hostap modes in if_urtw(4)
Summary: [patch] [wlan] [urtw] Support ad-hoc and hostap modes in if_urtw(4)
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.2-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Eugene Grosbein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-26 18:40 UTC by Eugene Grosbein
Modified: 2020-07-21 05:01 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (821 bytes, patch)
2010-12-26 18:40 UTC, Eugene Grosbein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein 2010-12-26 18:40:08 UTC
	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.

How-To-Repeat: 
	Try to enable hostap/ad-hoc modes with if_urtw, it won't.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-12-26 20:36:15 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Weongyo Jeong 2011-01-18 19:16:30 UTC
On Mon, Dec 27, 2010 at 12:18:55AM +0600, Eugene Grosbein wrote:
> 
> >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: <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.
> 
> >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.

Hello Eugene,

IMHO it's not easy to apply your patch to CURRENT directly without
additional patches.  When I wrote urtw(4) it based on realtek's linux
driver and at that moment it didn't support adhoc and hostap modes.  Not
sure it's working on other chipsets though I don't know what you're
using.

regards,
Weongyo Jeong
Comment 3 Eugene Grosbein 2011-01-18 20:21:43 UTC
On 19.01.2011 01:16, Weongyo Jeong wrote:
> On Mon, Dec 27, 2010 at 12:18:55AM +0600, Eugene Grosbein wrote:

>>> 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: <product 0x8189 vendor 0x0bda> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

> IMHO it's not easy to apply your patch to CURRENT directly without
> additional patches.  When I wrote urtw(4) it based on realtek's linux
> driver and at that moment it didn't support adhoc and hostap modes.  Not
> sure it's working on other chipsets though I don't know what you're
> using.

I've found its name by vendor/product id: Realtek RTL8187B.

Eugene Grosbein
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:03 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 5 Eugene Grosbein freebsd_committer freebsd_triage 2020-07-21 05:01:59 UTC
The hardware did not work reliably with the patch. Closing due to lack of interest.