From john@stealth.jnielsen.net  Mon Dec 19 18:35:14 2011
Return-Path: <john@stealth.jnielsen.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A859106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Dec 2011 18:35:14 +0000 (UTC)
	(envelope-from john@stealth.jnielsen.net)
Received: from stealth.jnielsen.net (stealth.jnielsen.net [74.218.226.254])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D3FA8FC14
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Dec 2011 18:35:14 +0000 (UTC)
Received: from stealth.jnielsen.net (jn@localhost [127.0.0.1])
	by stealth.jnielsen.net (8.14.5/8.14.5) with ESMTP id pBJICYIo017615
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Dec 2011 13:12:34 -0500 (EST)
	(envelope-from john@stealth.jnielsen.net)
Received: (from john@localhost)
	by stealth.jnielsen.net (8.14.5/8.14.4/Submit) id pBJICYdg017614;
	Mon, 19 Dec 2011 13:12:34 -0500 (EST)
	(envelope-from john)
Message-Id: <201112191812.pBJICYdg017614@stealth.jnielsen.net>
Date: Mon, 19 Dec 2011 13:12:34 -0500 (EST)
From: John Nielsen <john@jnielsen.net>
Reply-To: John Nielsen <john@jnielsen.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ath] "bssid" in wlanN create_args does not change wlan MAC address
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         163455
>Category:       bin
>Synopsis:       [ath] "bssid" in wlanN create_args does not change wlan MAC address
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 19 18:40:05 UTC 2011
>Closed-Date:    
>Last-Modified:  Tue Mar 13 04:20:01 UTC 2012
>Originator:     John Nielsen
>Release:        FreeBSD 9.0-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD stealth.jnielsen.net 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0 r228148M: Thu Dec 1 08:59:24 EST 2011 john@stealth.jnielsen.net:/usr/obj/usr/src/sys/STEALTH amd64


	
>Description:
	
The "bssid" parameter to ifconfig does notwork as advertised with ath
hardware: all wlan devices have the same MAC address(es) as their parent(s),
whether or not the "bssid" keyword is used when they are created. I know I
have used it successfully in the past but it may have been with a different
(ath) card and I don't know what FreeBSD version it was so I can't be much
help in determining when it stopped working (if indeed it ever did for this
hardware). The machine in question currently has an AR9220 card:

ath0: <Atheros 9220> mem 0xfebf0000-0xfebfffff irq 20 at device 5.0 on pci4
[ath] enabling AN_TOP2_FIXUP
ath0: [HT] enabling HT modes
ath0: [HT] 2 RX streams; 2 TX streams
ath0: Enabling register serialisation
ath0: AR9220 mac 128.2 RF5133 phy 13.0

ath0@pci0:4:5:0:	class=0x028000 card=0x2096168c chip=0x0029168c rev=0x01 hdr=0x00
    vendor     = 'Atheros Communications Inc.'
    device     = 'AR922X Wireless Network Adapter'

>How-To-Repeat:
ifconfig wlan0 create wlandev ath0 wlanmode hostap bssid
ifconfig wlan1 create wlandev ath0 wlanmode hostap bssid
ifconfig ath0
ifconfig wlan0
ifconfig wlan1
notice that the MAC addresses of both vap's are identical to the parent device.
	
>Fix:

	


>Release-Note:
>Audit-Trail:

From: Erick Wales <wales.erick@gmail.com>
To: bug-followup@FreeBSD.org,
 john@jnielsen.net
Cc:  
Subject: Re: bin/163455: [ath] &quot;bssid&quot; in wlanN create_args does not change wlan MAC address
Date: Mon, 12 Mar 2012 21:17:42 -0700

 > The "bssid" parameter to ifconfig does notwork as advertised with ath
 > hardware: all wlan devices have the same MAC address(es) as their =
 parent(s),
 > whether or not the "bssid" keyword is used when they are created. I =
 know I
 > have used it successfully in the past but it may have been with a =
 different
 > (ath) card and I don't know what FreeBSD version it was so I can't be =
 much
 > help in determining when it stopped working (if indeed it ever did for =
 this
 > hardware). The machine in question currently has an AR9220 card:
 >=20
 > ath0: <Atheros 9220> mem 0xfebf0000-0xfebfffff irq 20 at device 5.0 on =
 pci4
 > [ath] enabling AN_TOP2_FIXUP
 > ath0: [HT] enabling HT modes
 > ath0: [HT] 2 RX streams; 2 TX streams
 > ath0: Enabling register serialisation
 > ath0: AR9220 mac 128.2 RF5133 phy 13.0
 >=20
 > ath0@pci0:4:5:0:	class=3D0x028000 card=3D0x2096168c =
 chip=3D0x0029168c rev=3D0x01 hdr=3D0x00
 > vendor =3D 'Atheros Communications Inc.'
 > device =3D 'AR922X Wireless Network Adapter'
 
 Was looking for something to do today and looked into this. It appears =
 that the ath driver for the 9280 chipset (which is what your card has) =
 does not set the halBssIdMaskSupport capability. Since this variable is =
 not set the behavior you experience is to be expected. I'm not familiar =
 enough with the hardware to know for sure whether or not it supports =
 this feature but if it does I would imagine it would be as simple as =
 adding the following line to sys/dev/ath/ath_hal/ar9002/ar9280_attach.c:
 
 --- ar9280_attach.c	2012-01-02 20:26:54.000000000 -0700
 +++ ar9280_attach_new.c	2012-03-12 20:50:58.000000000 -0700
 @@ -841,6 +841,7 @@
  	pCap->halRxStbcSupport =3D 1;
  	pCap->halTxStbcSupport =3D 1;
  	pCap->halEnhancedDfsSupport =3D AH_TRUE;
 +	pCap->halBssIdMaskSupport =3D AH_TRUE;
 =20
  	return AH_TRUE;
  }
 
 If I'm way off base here someone let me know, this is my first dive into =
 these drivers.
 
 -Erick
 
>Unformatted:
