From owner-freebsd-wireless@FreeBSD.ORG  Mon Apr 29 10:14:57 2013
Return-Path: <owner-freebsd-wireless@FreeBSD.ORG>
Delivered-To: wireless@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 647548B7
 for <wireless@freebsd.org>; Mon, 29 Apr 2013 10:14:57 +0000 (UTC)
 (envelope-from freebsd@psconsult.nl)
Received: from mx1.psconsult.nl (unknown [IPv6:2001:7b8:30f:e0::5059:ee8a])
 by mx1.freebsd.org (Postfix) with ESMTP id B0BE715E1
 for <wireless@freebsd.org>; Mon, 29 Apr 2013 10:14:56 +0000 (UTC)
Received: from mx1.psconsult.nl (mx1.hvnu.psconsult.nl [46.44.189.154])
 by mx1.psconsult.nl (8.14.5/8.14.4) with ESMTP id r3TAEnP2061317
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <wireless@freebsd.org>; Mon, 29 Apr 2013 12:14:54 +0200 (CEST)
 (envelope-from freebsd@psconsult.nl)
Received: (from paul@localhost)
 by mx1.psconsult.nl (8.14.5/8.14.4/Submit) id r3TAEnsD061316
 for wireless@freebsd.org; Mon, 29 Apr 2013 12:14:49 +0200 (CEST)
 (envelope-from freebsd@psconsult.nl)
X-Authentication-Warning: mx1.psconsult.nl: paul set sender to
 freebsd@psconsult.nl using -f
Date: Mon, 29 Apr 2013 12:14:49 +0200
From: Paul Schenkeveld <freebsd@psconsult.nl>
To: wireless@freebsd.org
Subject: State os VAP support
Message-ID: <20130429101449.GA27298@psconsult.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
X-BeenThere: freebsd-wireless@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Discussions of 802.11 stack,
 tools device driver development." <freebsd-wireless.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-wireless>, 
 <mailto:freebsd-wireless-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-wireless>
List-Post: <mailto:freebsd-wireless@freebsd.org>
List-Help: <mailto:freebsd-wireless-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-wireless>, 
 <mailto:freebsd-wireless-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Apr 2013 10:14:57 -0000

Hi,

I still cannot get VAP's to work, perhaps I'm doing something wrong,
perhaps VAP support isn't ready yet.

My hardware: Soekris net4826 with Atheros 5212 mini-pci card
My FreeBSD: FreeBSD 10.0-CURRENT #0 r249745
My config:

    wlans_ath0="wlan63 wlan207"
    create_args_wlan63="wlanmode hostap mode 11g channel 7 country NL"
    create_args_wlan207="wlanmode hostap mode 11g channel 7 country NL"
    hostapd_config="/etc/hostapd.conf.testB /etc/hostapd.conf.testO"

    ==== hostapd.conf.testB:
    driver=bsd
    interface=wlan63
    ctrl_interface=/var/run/hostapd.wlan63
    ctrl_interface_group=wheel
    ssid=testB
    wpa=1
    wpa_passphrase=********
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=CCMP TKIP

    ==== hostapd.conf.testO:
    driver=bsd
    interface=wlan207
    ctrl_interface=/var/run/hostapd.wlan207
    ctrl_interface_group=wheel
    ssid=testO
    wpa=1
    wpa_passphrase=********
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=CCMP TKIP

I have tried running a single hostapd with two config files and running
two separate hostapd daemons each with a config file.  In both cases, I
get one wlan working, the other does not work.  Running hostapd with -d
does not reveal the problem to me either (I see debug output when
connecting to the working wlan but not when trying to connect to the
other one).  Hostapd debug output is below.

My questions:

    Should VAP work at all?
    Does anyone know of VAP problems with the Atheros 5212?
    Should I run one hostapd with multiple config files or separate daemons?
    Anything else I'm doing wrong?

Thanks for any help!

Paul Schenkeveld

------------------------------------------------------------------------

hostapd -d output:

ap1# hostapd -P /var/run/hostapd.pid -d /etc/hostapd.conf.testB /etc/hostapd.conf.testO
Configuration file: /etc/hostapd.conf.testB
ctrl_interface_group=0 (from group name 'wheel')
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Completing interface initialization
Flushing old station entries
Deauthenticate all stations
bsd_set_privacy: enabled=0
bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=1 seq_len=0 key_len=0
bsd_del_key: key_idx=0
bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=1
bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=2
bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=3
Using interface wlan63 with hwaddr 00:0b:6b:dd:50:7b and ssid 'testB'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     74 65 73 74 42                                    testB
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
bsd_set_ieee8021x: enabled=1
bsd_configure_wpa: enable WPA= 0x1
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
bsd_set_key: alg=2 addr=0x0 key_idx=1 set_tx=1 seq_len=0 key_len=32
bsd_set_privacy: enabled=1
bsd_set_opt_ie: set WPA+RSN ie (len 28)
wlan63: Setup of interface done.
Configuration file: /etc/hostapd.conf.testO
ctrl_interface_group=0 (from group name 'wheel')
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Completing interface initialization
Flushing old station entries
Deauthenticate all stations
bsd_set_privacy: enabled=0
bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=1 seq_len=0 key_len=0
bsd_del_key: key_idx=0
bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=1
bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=2
bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=3
Using interface wlan207 with hwaddr 00:0b:6b:dd:50:7b and ssid 'testO'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     74 65 73 74 4f                                    testO
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
bsd_set_ieee8021x: enabled=1
bsd_configure_wpa: enable WPA= 0x1
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
bsd_set_key: alg=2 addr=0x0 key_idx=1 set_tx=1 seq_len=0 key_len=32
bsd_set_privacy: enabled=1
bsd_set_opt_ie: set WPA+RSN ie (len 28)
wlan207: Setup of interface done.
Discard routing message to if#0 (not for us 10)

Discard routing message to if#0 (not for us 11)

Discard routing message to if#0 (not for us 10)