From vpn2008  Mon Aug  1 01:44:33 2011
From: vpn2008 (2008 vpn)
Date: Mon, 1 Aug 2011 16:44:33 +0800
Subject: How to request PAC when anonymous provision is enabled in
	wpa_supplicant?
Message-ID: <CANokWkiCL=qJj-xa_-nRrsWZXzqnyE5RdoejKqa+6O5KJWdnYQ@mail.gmail.com>

Hi,

In function eap_fast_process_decrypted there is following code to request
PAC:

if (data->current_pac == NULL && data->provisioning &&
    !data->anon_provisioning && !tlv.pac &&
    (tlv.iresult == EAP_TLV_RESULT_SUCCESS ||
     tlv.result == EAP_TLV_RESULT_SUCCESS)) {
/*
 * Need to request Tunnel PAC when using authenticated
 * provisioning.
 */
wpa_printf(MSG_DEBUG, "EAP-FAST: Request Tunnel PAC");
tmp = eap_fast_pac_request();
resp = wpabuf_concat(resp, tmp);
}

But this is only for (!data->anon_provisioning) is true.

And function  eap_fast_pac_request is only called here.

How is anonymous provision?







Best Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110801/f76fc0c1/attachment.htm 


From shafi.ath9k  Mon Aug  1 08:30:35 2011
From: shafi.ath9k (Mohammed Shafi)
Date: Mon, 1 Aug 2011 21:00:35 +0530
Subject: Delayed block ack
In-Reply-To: <CABkXhb9qQ0MGMcm1OOtX5sdFd_khmqk95V0KMbq_6f4PChroJg@mail.gmail.com>
References: <CABkXhb9qQ0MGMcm1OOtX5sdFd_khmqk95V0KMbq_6f4PChroJg@mail.gmail.com>
Message-ID: <CAJOga58w5=jaQ7d7ZDmrPSa63hNfCm7Zeimxu=x793KchyCgag@mail.gmail.com>

On Fri, Jul 29, 2011 at 11:34 PM, austin wonderly
<lacrosse1991 at gmail.com> wrote:
> Why would using delayed block ack prevent hostap from becoming unresponsive?

if the driver does not supports delayed block ack ht-capability then
the hostapd won't

>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
>


From proski  Mon Aug  1 14:16:57 2011
From: proski (Pavel Roskin)
Date: Mon, 01 Aug 2011 17:16:57 -0400
Subject: Help forum/group
In-Reply-To: <CABkXhb_rBokDgOQL0U1xu+h1=Orhc64+BN2j1Fyu5F700Vv1tA@mail.gmail.com>
References: <CABkXhb_rBokDgOQL0U1xu+h1=Orhc64+BN2j1Fyu5F700Vv1tA@mail.gmail.com>
Message-ID: <4E3717C9.7080602@gnu.org>

On 07/29/2011 06:00 PM, austin wonderly wrote:
> Do any of you guys know of any hostapd help groups/forum's as I feel like
> I'm in the wrong place :/

It's the right place.  You are just doing the wrong thing.  People who 
can answer you typically have little time and must choose what questions 
to answer.  Make sure they are interested in answering you.  Make it 
easy for them to find out what message was ignored - provide a link. 
Add new information, I'm sure you have something.  Show that you are 
ready to answer questions.  More tips here:

http://www.catb.org/~esr/faqs/smart-questions.html

-- 
Regards,
Pavel Roskin


From curtlarsen  Mon Aug  1 15:31:30 2011
From: curtlarsen (Curtis Larsen)
Date: Mon, 1 Aug 2011 16:31:30 -0600
Subject: Best 5ghz USB Adapter for use with wpa_supplicant and ubuntu 11.04?
Message-ID: <CA+a8BWBmp+n808458r1vWMSvvdwy8bN7EDQg5hMMFm6kGeyceA@mail.gmail.com>

Hi,

I am working a on a project that requires 802.11n 5ghz USB wireless
adapters on ubuntu 11.04.  I will need about 100 clients.  I need to
use these for some performance testing, and I need to be able to
select the band to test as needed (Ex.  freq_list ...).  Sometimes
testing 802.11n 5ghz 40Mhz wide, and sometimes testing 802.11 2.4ghz
20Mhz wide.  So far, I am looking at the ar9170, but it appears linux
support has been abandoned for this here:
http://linuxwireless.org/en/users/Drivers   So, I am thinking RT3572
is the best.  Anyone disagree?  Why?

I have been happy with the AR928X chip in my laptop, and have been
able to use full 802.11n in 2.4ghz, and 5ghz bands, and I can control
this as I need to.  Will I be able to use all of the same features on
ubuntu with the RT3572?  Anyone know where to get a discount on these
by buying bulk?  Let me know.

Thanks,

Curtis


From stonezju  Mon Aug  1 22:58:31 2011
From: stonezju (Stone)
Date: Tue, 2 Aug 2011 13:58:31 +0800
Subject: How to set probe resp WPS IE through nl80211 interface
Message-ID: <CAKH3Sjsuixw41qz9zguhZJnhHcEiepS4XAEuSJU_3xtmFxSH7g@mail.gmail.com>

Hi,
    Could someone tell me that, when wpa_supplicant works as AP, how does
wpa_supplicant set probe resp WPS IE through nl80211 interface? The beacon
IE is able to be configured through set_beacon in driver_nl80211.c, while
there is no accomplishment for set_ap_wps_ie.
    Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110802/18a2a483/attachment.htm 


From geryk  Tue Aug  2 04:04:02 2011
From: geryk (Kahn, Gery)
Date: Tue, 2 Aug 2011 14:04:02 +0300
Subject: [PATCH 1/2] New bgscan operation for list of candidates
In-Reply-To: <CA+yqC4acdvks-UZeqtZDhfD5-VJheOW-MaAnB3e=h1aXEtZ2VA@mail.gmail.com>
References: <1311860445-7735-1-git-send-email-geryk@ti.com>
	<1311860445-7735-2-git-send-email-geryk@ti.com>
	<CA+yqC4acdvks-UZeqtZDhfD5-VJheOW-MaAnB3e=h1aXEtZ2VA@mail.gmail.com>
Message-ID: <CABB-i1eg4UGhLKpfVt=j7ZsguOEdZOetq8khsF5RrjxB7SFA9A@mail.gmail.com>

On Sun, Jul 31, 2011 at 01:26, Sam Leffler <sleffler at google.com> wrote:
> On Thu, Jul 28, 2011 at 6:40 AM, Gery Kahn <geryk at ti.com> wrote:
>> Add new bgscan operation list_candidates which fills provided buffer with
>> candidates information.
>> The solution exists only for bgscan_learn, because there is no
>> candidates in bgscan_simple.
>
> I see no description of a "candidate" except as something that
> bgscan_learn decides. ?If you want a list of bss that might be worth
> roaming to then you can get that from the bss table directly and not
> limit the functionality to bgscan_learn. ?In general bgscan
> functionality should maintain a "scan cache" that describes bss in
> range of the sta.
>

Sorry for the late response.

I will send different patch.

Thank you for the review.

Gery


From janusz.dziedzic  Tue Aug  2 08:42:21 2011
From: janusz.dziedzic (Janusz Dziedzic)
Date: Tue, 2 Aug 2011 17:42:21 +0200
Subject: How to set probe resp WPS IE through nl80211 interface
In-Reply-To: <CAKH3Sjsuixw41qz9zguhZJnhHcEiepS4XAEuSJU_3xtmFxSH7g@mail.gmail.com>
References: <CAKH3Sjsuixw41qz9zguhZJnhHcEiepS4XAEuSJU_3xtmFxSH7g@mail.gmail.com>
Message-ID: <CAFED-jkiwcZh-6ODdx7tOXSpfvpsT48ccEHq1QOCL3+jCKbQgQ@mail.gmail.com>

2011/8/2 Stone <stonezju at gmail.com>:
> Hi,
> ??? Could someone tell me that,?when wpa_supplicant works as AP, how does
> wpa_supplicant set probe resp WPS IE through nl80211 interface? The beacon
> IE is able to?be configured through set_beacon in driver_nl80211.c, while
> there is no accomplishment for set_ap_wps_ie.

Our firmware also require this functionality - we need setup
beacon/probe_resp frames as a firmware templates.
Seems, this could be usefull implementation.

We have temporary solution for set_ap_wps_ie - we are sending this
info via nl80211 test_mode command, but seems real implementation is
required.
For most cases also "copy" from beacon template to probe_res works
fine, but this not cover all cases eg. p2p

BR
-- 
Janusz Dziedzic


From proski  Tue Aug  2 14:03:26 2011
From: proski (Pavel Roskin)
Date: Tue, 02 Aug 2011 17:03:26 -0400
Subject: Best 5ghz USB Adapter for use with wpa_supplicant and ubuntu
	11.04?
In-Reply-To: <CA+a8BWBmp+n808458r1vWMSvvdwy8bN7EDQg5hMMFm6kGeyceA@mail.gmail.com>
References: <CA+a8BWBmp+n808458r1vWMSvvdwy8bN7EDQg5hMMFm6kGeyceA@mail.gmail.com>
Message-ID: <4E38661E.10808@gnu.org>

On 08/01/2011 06:31 PM, Curtis Larsen wrote:
> Hi,
>
> I am working a on a project that requires 802.11n 5ghz USB wireless
> adapters on ubuntu 11.04.  I will need about 100 clients.  I need to
> use these for some performance testing, and I need to be able to
> select the band to test as needed (Ex.  freq_list ...).  Sometimes
> testing 802.11n 5ghz 40Mhz wide, and sometimes testing 802.11 2.4ghz
> 20Mhz wide.  So far, I am looking at the ar9170, but it appears linux
> support has been abandoned for this here:
> http://linuxwireless.org/en/users/Drivers

It's replaced by carl9170, which is listed on the same page.  I'll try 
to update the information on that page to make it more obvious for those 
who look specifically for ar9170.

> I have been happy with the AR928X chip in my laptop, and have been
> able to use full 802.11n in 2.4ghz, and 5ghz bands, and I can control
> this as I need to.

Then I think AR9271 (driver ath9k_htc) is the best option for you. 
Unlike carl9170, it's supported by Atheros.

I think you should ask in Linux-wireless about the hardware and the 
drivers.  wpa_supplicant does its job really well, and it's mostly 
hardware-independent.

-- 
Regards,
Pavel Roskin


From curtlarsen  Tue Aug  2 14:31:12 2011
From: curtlarsen (Curtis Larsen)
Date: Tue, 2 Aug 2011 15:31:12 -0600
Subject: Best 5ghz USB Adapter for use with wpa_supplicant and ubuntu
	11.04?
In-Reply-To: <4E38661E.10808@gnu.org>
References: <CA+a8BWBmp+n808458r1vWMSvvdwy8bN7EDQg5hMMFm6kGeyceA@mail.gmail.com>
	<4E38661E.10808@gnu.org>
Message-ID: <CA+a8BWBFQZ_YJOsVFUPhsDDC=hbkSmUSKLqvf-kcHdoCfj3j_Q@mail.gmail.com>

On Tue, Aug 2, 2011 at 3:03 PM, Pavel Roskin <proski at gnu.org> wrote:
> On 08/01/2011 06:31 PM, Curtis Larsen wrote:
>>
>> Hi,
>>
>> I am working a on a project that requires 802.11n 5ghz USB wireless
>> adapters on ubuntu 11.04. ?I will need about 100 clients. ?I need to
>> use these for some performance testing, and I need to be able to
>> select the band to test as needed (Ex. ?freq_list ...). ?Sometimes
>> testing 802.11n 5ghz 40Mhz wide, and sometimes testing 802.11 2.4ghz
>> 20Mhz wide. ?So far, I am looking at the ar9170, but it appears linux
>> support has been abandoned for this here:
>> http://linuxwireless.org/en/users/Drivers
>
> It's replaced by carl9170, which is listed on the same page. ?I'll try to
> update the information on that page to make it more obvious for those who
> look specifically for ar9170.

okay ...I will look into that driver and see if I can get it to work.

>
>> I have been happy with the AR928X chip in my laptop, and have been
>> able to use full 802.11n in 2.4ghz, and 5ghz bands, and I can control
>> this as I need to.
>
> Then I think AR9271 (driver ath9k_htc) is the best option for you. Unlike
> carl9170, it's supported by Atheros.

But AR9271 has no 5Ghz band.  That is one of my requirements, and
frustrations with Atheros ...that I can't find a dual-band USB device
with supported atheros drivers.

>
> I think you should ask in Linux-wireless about the hardware and the drivers.
> ?wpa_supplicant does its job really well, and it's mostly
> hardware-independent.

okay I will ask them.

Thanks,

Curtis


From proski  Tue Aug  2 15:37:54 2011
From: proski (Pavel Roskin)
Date: Tue, 02 Aug 2011 18:37:54 -0400
Subject: [PATCH] Disable bgscan for modes other than infrastructure
In-Reply-To: <538FB72AA9C7314998FCE2FB41335C5A115884488F@EXMB02.eu.tieto.com>
References: <538FB72AA9C7314998FCE2FB41335C5A115884488F@EXMB02.eu.tieto.com>
Message-ID: <4E387C42.3020608@gnu.org>

On 07/28/2011 02:32 AM, Bartosz.Markowski at tieto.com wrote:
> Signed-off-by: Bartosz Markowski<bartosz.markowski at tieto.com>
> ---
>   wpa_supplicant/wpa_supplicant.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
> index 3f3e435..7a11b21 100644
> --- a/wpa_supplicant/wpa_supplicant.c
> +++ b/wpa_supplicant/wpa_supplicant.c
> @@ -527,6 +527,9 @@ const char * wpa_supplicant_state_txt(enum wpa_states state)
>
>   static void wpa_supplicant_start_bgscan(struct wpa_supplicant *wpa_s)
>   {
> +       if (wpa_s->current_ssid->mode)
> +               return;

I think it would be better to write:

if (wpa_s->current_ssid->mode != WPAS_MODE_INFRA)

This would make the code more robust and clear.  The code won't break if 
the numeric value of WPAS_MODE_INFRA changes.  And the meaning of the 
code becomes clear without reading the log.

-- 
Regards,
Pavel Roskin


From proski  Tue Aug  2 15:54:44 2011
From: proski (Pavel Roskin)
Date: Tue, 02 Aug 2011 18:54:44 -0400
Subject: Which wireless adapter should I choose
In-Reply-To: <CABkXhb-EHUR6fbvPy+bba_nittNoMTrnWoT6OD4yEZxCSanmRg@mail.gmail.com>
References: <CABkXhb8gZ+pHA7L5GHKh89j_hboLGhNvJQNVCLhSa4ivWitC0w@mail.gmail.com>
	<CABkXhb-EHUR6fbvPy+bba_nittNoMTrnWoT6OD4yEZxCSanmRg@mail.gmail.com>
Message-ID: <4E388034.9030901@gnu.org>

On 07/29/2011 05:38 PM, austin wonderly wrote:
> Hello! I currently have a dlink dwa 552 but I am having some issues with
> hostapd becoming unresponsive while using this adapter, which I am not even
> sure if the adapter is the source of the problem :( any ways I was wondering
> if there were any known issues with this card, and if not I was wondering
> what you guys would recommend for a good pci wireless n card that plays nice
> with hostapd, thanks! Any help is really appreciated :)

There is way too little information in your post.

What is the version of hostapd?  If that's the program that gives you 
the problem, its version number is highly relevant.  The main point of 
releasing new versions is to resolve users' problems!

What is the version of the kernel?  The kernel works with the card and 
talks to hostapd.

What is the revision of the card?  Some cards even have different 
chipsets in different revisions.

What driver do you use?  Is it ath9k or madwifi or something else?

What is "unresponsive"?  What do you do with it, what kind of response 
do you expect and what do you actually observe?  Is there anything 
interesting in the kernel log?

It's hard to give an intelligent response to your question without 
having all that information.

I used to have two DWA-552 cards.  One have the antennas wide apart 
(http://www.computerdirectcorp.com/cdproductcatalog/images/products/DWA552.jpg) 
and it didn't work on some motherboards.  Another had the antennas close 
to each other (http://www.compupoint.ca/images/DWA-552.jpg) and worked 
on the systems where the first one didn't work.  That's a totally 
anecdotal observation, and may be irrelevant to your issue.

-- 
Regards,
Pavel Roskin


From wupengzhan110  Wed Aug  3 07:15:16 2011
From: wupengzhan110 (12)
Date: Wed, 3 Aug 2011 22:15:16 +0800 (CST)
Subject: wpa_supplicant P2P not working with new compat-wireless release
	(after compat-wireless-2011-07-28)
Message-ID: <12383d.16d5.1318fff9262.Coremail.wupengzhan110@126.com>

Hello,I have a wireless card which chipest is AR9271. Today I test the latest compat-wireless release,using the latest hostap from  git://w1.fi/srv/git/hostap.git . But I failed connect two P2P devices with"p2p_find/p2p_connect" commands. The two devices reports the fllowing message.

one  device

> > status
wpa_state=INACTIVE
p2p_device_address=b0:48:7a:06:bc:c3
address=b0:48:7a:06:bc:c3
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE

> > p2p_find
OK
<3>P2P-DEVICE-FOUND b0:48:7a:06:bc:c9 p2p_dev_addr=b0:48:7a:06:bc:c9 pri_dev_type=1-0050F204-1 name='WN721N2' config_methods=0x80 dev_capab=0x23 group_capab=0x8
<3>P2P-GO-NEG-REQUEST b0:48:7a:06:bc:c9 dev_passwd_id=4

> > p2p_connect b0:48:7a:06:bc:c9 pbc
OK
<3>P2P-GO-NEG-SUCCESS
<3>WPS-ENROLLEE-SEEN b0:48:7a:06:bc:c9 0b76b931-7a8b-5165-8d65-f148b6543767 1-0050F204-1 0x2388 4 1 [WN721N2]
<3>CTRL-EVENT-EAP-STARTED b0:48:7a:06:bc:c9
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
<3>CTRL-EVENT-EAP-FAILURE b0:48:7a:06:bc:c9
<3>P2P-GROUP-FORMATION-FAILURE
<3>P2P-GROUP-REMOVED wlan0 GO



other device

> > p2p_find
OK
<3>P2P-DEVICE-FOUND b0:48:7a:06:bc:c3 p2p_dev_addr=b0:48:7a:06:bc:c3 pri_dev_type=1-0050F204-1 name='WN721-1' config_methods=0x188 dev_capab=0x23 group_capab=0x0

> > p2p_connect b0:48:7a:06:bc:c3 pbc
OK
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>P2P-GO-NEG-SUCCESS
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE-PBC
<3>SME: Trying to authenticate with b0:48:7a:06:bc:c3 (SSID='DIRECT-5i' freq=2437 MHz)
<3>Trying to associate with b0:48:7a:06:bc:c3 (SSID='DIRECT-5i' freq=2437 MHz)
<3>Associated with b0:48:7a:06:bc:c3
<3>CTRL-EVENT-EAP-STARTED EAP authentication started
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
<3>CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
<3>CTRL-EVENT-EAP-FAILURE EAP authentication failed
<3>WPS-FAIL
<3>CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=2
<3>P2P-GROUP-FORMATION-FAILURE
<3>P2P-GROUP-REMOVED wlan1 GO

what's wrong with software, is there some wrong thing about config or others.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110803/878e10c4/attachment.htm 


From wupengzhan110  Wed Aug  3 08:02:21 2011
From: wupengzhan110 (12)
Date: Wed, 3 Aug 2011 23:02:21 +0800 (CST)
Subject: can't unistall the previous compat-wireless-2011-07-28
Message-ID: <4f28f8d5.29f9.131902aaf3c.Coremail.wupengzhan110@126.com>

I have installed the latest compat-wireless-2011-07-28,but there is something wrong in my distro, so I want to unistall it and test the old compat-wireless,bute when I execute the command "sudo make uinstall"  in the compat-wireless-2011-07-28 directory where I have execute "make "and "sudo make install",it reported the following message:"make: *** No rule to make target `uinstall'.  Stop."  what i shoud do .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110803/e2c5bd7c/attachment.htm 


From f.de.kruijf  Wed Aug  3 08:09:20 2011
From: f.de.kruijf (Freek de Kruijf)
Date: Wed, 3 Aug 2011 17:09:20 +0200
Subject: can't unistall the previous compat-wireless-2011-07-28
In-Reply-To: <4f28f8d5.29f9.131902aaf3c.Coremail.wupengzhan110@126.com>
References: <4f28f8d5.29f9.131902aaf3c.Coremail.wupengzhan110@126.com>
Message-ID: <201108031709.20116.f.de.kruijf@gmail.com>

On woensdag 3 augustus 2011 17:02:21 12 wrote:
> I have installed the latest compat-wireless-2011-07-28,but there is
> something wrong in my distro, so I want to unistall it and test the old
> compat-wireless,bute when I execute the command "sudo make uinstall"  in
> the compat-wireless-2011-07-28 directory where I have execute "make "and
> "sudo make install",it reported the following message:"make: *** No rule
> to make target `uinstall'.  Stop."  what i shoud do .

How about inserting an n in "sudo make uinstall", so "sudo make uninstall".

-- 
fr.gr.

Freek de Kruijf


From dimitrysh  Wed Aug  3 11:03:49 2011
From: dimitrysh (Dmitry Shmidt)
Date: Wed, 3 Aug 2011 11:03:49 -0700
Subject: [PATCH] Move control interface cleanup after wpa_supplicant_cleanup()
Message-ID: <20110803181127.3019A3884E@ushik.mtv.corp.google.com>

This is needed to be able to communicate through control interface
after wpa_supplicant_cleanup()

Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
---
 wpa_supplicant/wpa_supplicant.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 3f3e435..c93c4d2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -382,16 +382,10 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
 		wpa_s->l2_br = NULL;
 	}
 
-	if (wpa_s->ctrl_iface) {
-		wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
-		wpa_s->ctrl_iface = NULL;
-	}
 	if (wpa_s->conf != NULL) {
 		struct wpa_ssid *ssid;
 		for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
 			wpas_notify_network_removed(wpa_s, ssid);
-		wpa_config_free(wpa_s->conf);
-		wpa_s->conf = NULL;
 	}
 
 	os_free(wpa_s->confname);
@@ -2303,11 +2297,21 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
 
 	wpa_supplicant_cleanup(wpa_s);
 
+	if (wpa_s->drv_priv)
+		wpa_drv_deinit(wpa_s);
+
 	if (notify)
 		wpas_notify_iface_removed(wpa_s);
 
-	if (wpa_s->drv_priv)
-		wpa_drv_deinit(wpa_s);
+	if (wpa_s->ctrl_iface) {
+		wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
+		wpa_s->ctrl_iface = NULL;
+	}
+
+	if (wpa_s->conf != NULL) {
+		wpa_config_free(wpa_s->conf);
+		wpa_s->conf = NULL;
+	}
 }
 
 
-- 
1.7.3.1



From nithy.psg  Wed Aug  3 18:52:02 2011
From: nithy.psg (Nithyananthan Poosamani)
Date: Wed, 3 Aug 2011 21:52:02 -0400
Subject: Is it possible to record "number of scans" performed information down
	at supplicant level and make it available at Application layer?
Message-ID: <CAMVaJCdZtbdDuR7i9ABYdk5NEhVF8ue+J05xkhj0e81iUs0f-g@mail.gmail.com>

Hi,

I am interested in recording the number of scan trials happening at the
wpa_supplicant daemon service and want that available at the Application
layer.

I know that wpa_supplicant data structure has "scan_runs" integer member
element which can inform me of the number of scan runs performed after the
supplicant service started running.
However I do not know how to record these value somehow and make it
available to an application running at the top.

I can insert a Log message in the scan.c file and make it log always so that
when I am connected to ADB, I can see the information but I feel this method
is ugly !
Can I write information directly onto a file say "xyz.txt" in /data
directory or somewhere so that I can retrieve it later using a rooted
phone?

Please guide me so that I can perform this recording of information.

Thanks,
Nithyananthan Poosamani
--
Networking Research Laboratory (NRL)
NC State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110803/98ad9841/attachment.htm 


From wupengzhan110  Wed Aug  3 19:50:01 2011
From: wupengzhan110 (12)
Date: Thu, 4 Aug 2011 10:50:01 +0800 (CST)
Subject: can't unistall the previous compat-wireless-2011-07-28
	(Freek de Kruijf)
Message-ID: <2a212a.1e5a.13192b29008.Coremail.wupengzhan110@126.com>

> How about inserting an n in "sudo make uinstall", so "sudo make uninstall".
Sorry,you are right,I have fixed the issuse. Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110804/a92a27b2/attachment.htm 


From vpn2008  Wed Aug  3 20:07:56 2011
From: vpn2008 (2008 vpn)
Date: Thu, 4 Aug 2011 11:07:56 +0800
Subject: Problems when using hostapd on wired:IEEE 802.1X data frame from not
	associated STA
Message-ID: <CANokWkh=3ZZAzFhNya8y7N8AXBRfX6GMWgcOLVT4HpHjJ86DCg@mail.gmail.com>

I try to setup a eap testbed on wired.  I run hostapd on ubuntu(vmware) and
wpa_supplicant on another ubuntu(vmware) host.
But when hostapd receives identity response, following mesasge is given out:

IEEE 802.1X: 46 bytes from 00:0c:29:13:68:99
IEEE 802.1X data frame from not associated STA


What does that mean?  For wired, associated is needed? If yes, how to
associate it?


configuration is as fillowing :
wired.conf
====================================================================================================

interface=eth1
driver=wired
logger_stdout=-1
logger_stdout_level=1
debug=2
dump_file=/tmp/hostapd.dump

ieee8021x=1
eap_reauth_period=3600

use_pae_group_addr=1


##### RADIUS configuration
####################################################
# for IEEE 802.1X with external Authentication Server, IEEE 802.11
# authentication with external ACL for MAC addresses, and accounting

# The own IP address of the access point (used as NAS-IP-Address)
own_ip_addr=127.0.0.1

# Optional NAS-Identifier string for RADIUS messages. When used, this should
be
# a unique to the NAS within the scope of the RADIUS server. For example, a
# fully qualified domain name can be used here.
# nas_identifier=ap.example.com

# RADIUS authentication server
auth_server_addr=127.0.0.1
auth_server_port=1812
auth_server_shared_secret=radius

# RADIUS accounting server
#acct_server_addr=127.0.0.1
#acct_server_port=1813
#acct_server_shared_secret=radius



run command for hostapd: sudo ./hostapd -dddd ./wired.conf


=================================================================
configuration for wpa_supplicant:

test.conf:
==============================================
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=root

ap_scan=0

network={

key_mgmt=IEEE8021X

eap=MD5

identity="user"

password="password"
eapol_flags=0

}


run command for wpa_supplicant: sudo ./wpa_supplicant  -dd -i eth1 -c
./test.conf -D wired










If someone has done this, giving me the typical configuration is very
appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110804/30a3b18e/attachment.htm 


From Bartosz.Markowski  Thu Aug  4 01:28:06 2011
From: Bartosz.Markowski (Bartosz.Markowski at tieto.com)
Date: Thu, 4 Aug 2011 11:28:06 +0300
Subject: [PATCH] Move control interface cleanup after
	wpa_supplicant_cleanup()
In-Reply-To: <20110803181127.3019A3884E@ushik.mtv.corp.google.com>
References: <20110803181127.3019A3884E@ushik.mtv.corp.google.com>
Message-ID: <538FB72AA9C7314998FCE2FB41335C5A1158970FB6@EXMB02.eu.tieto.com>

Hi,

Could you please describe what the problem was?
Is it a problem with establishing connection to supplicant?

BR,
Bartosz

-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Dmitry Shmidt
Sent: 3 sierpnia 2011 20:04
To: hostap at lists.shmoo.com
Subject: [PATCH] Move control interface cleanup after wpa_supplicant_cleanup()

This is needed to be able to communicate through control interface
after wpa_supplicant_cleanup()

Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
---
 wpa_supplicant/wpa_supplicant.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 3f3e435..c93c4d2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -382,16 +382,10 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
 		wpa_s->l2_br = NULL;
 	}
 
-	if (wpa_s->ctrl_iface) {
-		wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
-		wpa_s->ctrl_iface = NULL;
-	}
 	if (wpa_s->conf != NULL) {
 		struct wpa_ssid *ssid;
 		for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
 			wpas_notify_network_removed(wpa_s, ssid);
-		wpa_config_free(wpa_s->conf);
-		wpa_s->conf = NULL;
 	}
 
 	os_free(wpa_s->confname);
@@ -2303,11 +2297,21 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
 
 	wpa_supplicant_cleanup(wpa_s);
 
+	if (wpa_s->drv_priv)
+		wpa_drv_deinit(wpa_s);
+
 	if (notify)
 		wpas_notify_iface_removed(wpa_s);
 
-	if (wpa_s->drv_priv)
-		wpa_drv_deinit(wpa_s);
+	if (wpa_s->ctrl_iface) {
+		wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
+		wpa_s->ctrl_iface = NULL;
+	}
+
+	if (wpa_s->conf != NULL) {
+		wpa_config_free(wpa_s->conf);
+		wpa_s->conf = NULL;
+	}
 }
 
 
-- 
1.7.3.1

_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap


From 23hiro  Thu Aug  4 06:20:05 2011
From: 23hiro (hiro)
Date: Thu, 4 Aug 2011 15:20:05 +0200
Subject: wpa_supplicant iwl3945 adhoc WEP
In-Reply-To: <CAFSF3XO2XTW6spikQfFPz3TohOTrVZO2m4vwf+A=5bws15w1mw@mail.gmail.com>
References: <CAFSF3XM6RyQ=3BZkgLeh-ehrTtSKPj2pKLRuPFtuD=LNJ1b0ug@mail.gmail.com>
	<CAFSF3XO2XTW6spikQfFPz3TohOTrVZO2m4vwf+A=5bws15w1mw@mail.gmail.com>
Message-ID: <CAFSF3XODLQfRHZZ0pQMEFAZbmyxs3nJpP-baMTsKbp8yt=iZAQ@mail.gmail.com>

Hi,

 I'm quite happy with wpa_supplicant in normal WPA managed modes, but
 can not make my adhoc network work.
 I can see the network in the scan results but it seems like
 wpa_supplicant doesn't try to connect, in iwconfig I can see that it
 doesn't even change to ad-hoc mode, although I specified mode=1.
 Using iwconfig manually succeeds after first setting ad-hoc mode.
 Is there any valuable info I could provide?

 wpa_supplicant v0.6.9 and kernel 2.6.33.3


From dimitrysh  Thu Aug  4 09:24:37 2011
From: dimitrysh (Dmitry Shmidt)
Date: Thu, 4 Aug 2011 09:24:37 -0700
Subject: [PATCH] Move control interface cleanup after
	wpa_supplicant_cleanup()
In-Reply-To: <538FB72AA9C7314998FCE2FB41335C5A1158970FB6@EXMB02.eu.tieto.com>
References: <20110803181127.3019A3884E@ushik.mtv.corp.google.com>
	<538FB72AA9C7314998FCE2FB41335C5A1158970FB6@EXMB02.eu.tieto.com>
Message-ID: <CAH7ZN-w8Bypy63xkUF8CiEYrxn+ox1MR8+f_Tg03d2ZrQpbAyA@mail.gmail.com>

On Thu, Aug 4, 2011 at 1:28 AM,  <Bartosz.Markowski at tieto.com> wrote:
> Hi,
>
> Could you please describe what the problem was?
> Is it a problem with establishing connection to supplicant?
>
> BR,
> Bartosz

Hi,

The problem is that we are loosing control channel from wpa_supplicant
to network manager
before deinit of the interfaces.
And there is no way to "tell" this to the network manager when we are done.
For example,
        if (notify)
                wpas_notify_iface_removed(wpa_s);
will still be able to send this through DBUS but not through wpa_msg_ctrl().

Thanks,

Dmitry

>
> -----Original Message-----
> From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Dmitry Shmidt
> Sent: 3 sierpnia 2011 20:04
> To: hostap at lists.shmoo.com
> Subject: [PATCH] Move control interface cleanup after wpa_supplicant_cleanup()
>
> This is needed to be able to communicate through control interface
> after wpa_supplicant_cleanup()
>
> Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
> ---
> ?wpa_supplicant/wpa_supplicant.c | ? 20 ++++++++++++--------
> ?1 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
> index 3f3e435..c93c4d2 100644
> --- a/wpa_supplicant/wpa_supplicant.c
> +++ b/wpa_supplicant/wpa_supplicant.c
> @@ -382,16 +382,10 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
> ? ? ? ? ? ? ? ?wpa_s->l2_br = NULL;
> ? ? ? ?}
>
> - ? ? ? if (wpa_s->ctrl_iface) {
> - ? ? ? ? ? ? ? wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
> - ? ? ? ? ? ? ? wpa_s->ctrl_iface = NULL;
> - ? ? ? }
> ? ? ? ?if (wpa_s->conf != NULL) {
> ? ? ? ? ? ? ? ?struct wpa_ssid *ssid;
> ? ? ? ? ? ? ? ?for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
> ? ? ? ? ? ? ? ? ? ? ? ?wpas_notify_network_removed(wpa_s, ssid);
> - ? ? ? ? ? ? ? wpa_config_free(wpa_s->conf);
> - ? ? ? ? ? ? ? wpa_s->conf = NULL;
> ? ? ? ?}
>
> ? ? ? ?os_free(wpa_s->confname);
> @@ -2303,11 +2297,21 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
>
> ? ? ? ?wpa_supplicant_cleanup(wpa_s);
>
> + ? ? ? if (wpa_s->drv_priv)
> + ? ? ? ? ? ? ? wpa_drv_deinit(wpa_s);
> +
> ? ? ? ?if (notify)
> ? ? ? ? ? ? ? ?wpas_notify_iface_removed(wpa_s);
>
> - ? ? ? if (wpa_s->drv_priv)
> - ? ? ? ? ? ? ? wpa_drv_deinit(wpa_s);
> + ? ? ? if (wpa_s->ctrl_iface) {
> + ? ? ? ? ? ? ? wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
> + ? ? ? ? ? ? ? wpa_s->ctrl_iface = NULL;
> + ? ? ? }
> +
> + ? ? ? if (wpa_s->conf != NULL) {
> + ? ? ? ? ? ? ? wpa_config_free(wpa_s->conf);
> + ? ? ? ? ? ? ? wpa_s->conf = NULL;
> + ? ? ? }
> ?}
>
>
> --
> 1.7.3.1
>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>


From jayant.sane  Thu Aug  4 22:28:59 2011
From: jayant.sane (Sane, Jayant)
Date: Fri, 5 Aug 2011 05:28:59 +0000
Subject: [PATCH] DBus/P2P: Return Primary and Secondary device types as bytes
Message-ID: <03C60F3308A1A6419E34968DB630497813706CAA@ORSMSX101.amr.corp.intel.com>

These properties are already correctly treated as bytes for the local
device, we need to do same for peers.

Signed-off-by: Reinette Chatre <reinette.chatre at intel.com>
---
 wpa_supplicant/dbus/dbus_new_handlers_p2p.c |   71 +++++++++-----------------
 1 files changed, 25 insertions(+), 46 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index d68ac4b..29f7d0b 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -1126,7 +1126,6 @@ dbus_bool_t wpas_dbus_getter_p2p_peer_properties(DBusMessageIter *iter,
 	struct peer_handler_args *peer_args = user_data;
 	DBusMessageIter variant_iter, dict_iter;
 	const struct p2p_peer_info *info = NULL;
-	char devtype[WPS_DEV_TYPE_BUFSIZE];
 	const struct wpabuf *vendor_extension[P2P_MAX_WPS_VENDOR_EXT];
 	int i, num;
 
@@ -1144,12 +1143,12 @@ dbus_bool_t wpas_dbus_getter_p2p_peer_properties(DBusMessageIter *iter,
 		goto err_no_mem;
 
 	/* Fill out the dictionary */
-	wps_dev_type_bin2str(info->pri_dev_type, devtype, sizeof(devtype));
 	if (!wpa_dbus_dict_append_string(&dict_iter, "DeviceName",
 					 info->device_name))
 		goto err_no_mem;
-	if (!wpa_dbus_dict_append_string(&dict_iter, "PrimaryDeviceType",
-					 devtype))
+	if (!wpa_dbus_dict_append_byte_array(&dict_iter, "PrimaryDeviceType",
+					     (char *)info->pri_dev_type,
+					     WPS_DEV_TYPE_LEN))
 		goto err_no_mem;
 	if (!wpa_dbus_dict_append_uint16(&dict_iter, "config_method",
 					 info->config_methods))
@@ -1165,54 +1164,34 @@ dbus_bool_t wpas_dbus_getter_p2p_peer_properties(DBusMessageIter *iter,
 		goto err_no_mem;
 
 	if (info->wps_sec_dev_type_list_len) {
-		char *sec_dev_types[MAX_SEC_DEVICE_TYPES];
-		u8 *sec_dev_type_list = NULL;
-		char secdevtype[WPS_DEV_TYPE_BUFSIZE];
-		int num_sec_dev_types = 0;
-
-		sec_dev_type_list = os_zalloc(info->wps_sec_dev_type_list_len);
-
-		if (sec_dev_type_list == NULL)
-			goto err_no_mem;
-
-		os_memcpy(sec_dev_type_list, info->wps_sec_dev_type_list,
-			  info->wps_sec_dev_type_list_len);
-
-		for (i = 0; i < MAX_SEC_DEVICE_TYPES &&
-		       i < (int) (info->wps_sec_dev_type_list_len /
-				  WPS_DEV_TYPE_LEN);
-		     i++) {
-			sec_dev_types[i] = os_zalloc(sizeof(secdevtype));
-
-			if (!sec_dev_types[i] ||
-			    wps_dev_type_bin2str(
-					&sec_dev_type_list[i *
-							   WPS_DEV_TYPE_LEN],
-					sec_dev_types[i],
-					sizeof(secdevtype)) == NULL) {
-				while (--i >= 0)
-					os_free(sec_dev_types[i]);
-				os_free(sec_dev_type_list);
-				goto err_no_mem;
-			}
-
-			num_sec_dev_types++;
-		}
-
-		os_free(sec_dev_type_list);
+		const u8 *sec_dev_type_list = info->wps_sec_dev_type_list;
+		int num_sec_dev_types =
+			info->wps_sec_dev_type_list_len / WPS_DEV_TYPE_LEN;
+		DBusMessageIter iter_secdev_dict_entry, iter_secdev_dict_val,
+				iter_secdev_dict_array;
 
 		if (num_sec_dev_types) {
-			if (!wpa_dbus_dict_append_string_array(&dict_iter,
+			if (!wpa_dbus_dict_begin_array(&dict_iter,
 						"SecondaryDeviceTypes",
-						(const char **)sec_dev_types,
-						num_sec_dev_types)) {
-				for (i = 0; i < num_sec_dev_types; i++)
-					os_free(sec_dev_types[i]);
+						DBUS_TYPE_ARRAY_AS_STRING
+						DBUS_TYPE_BYTE_AS_STRING,
+						&iter_secdev_dict_entry,
+						&iter_secdev_dict_val,
+						&iter_secdev_dict_array))
 				goto err_no_mem;
+			for (i = 0; i < num_sec_dev_types; i++) {
+				wpa_dbus_dict_bin_array_add_element(
+						&iter_secdev_dict_array,
+						sec_dev_type_list,
+						WPS_DEV_TYPE_LEN);
+				sec_dev_type_list += WPS_DEV_TYPE_LEN;
 			}
 
-			for (i = 0; i < num_sec_dev_types; i++)
-				os_free(sec_dev_types[i]);
+			if (!wpa_dbus_dict_end_array(&dict_iter,
+						&iter_secdev_dict_entry,
+						&iter_secdev_dict_val,
+						&iter_secdev_dict_array))
+				goto err_no_mem;
 		}
 	}
 
-- 
1.7.1



From sami.m.ahokas  Thu Aug  4 23:48:42 2011
From: sami.m.ahokas (sami ahokas)
Date: Fri, 5 Aug 2011 09:48:42 +0300
Subject: DWA-556 not working as AP
Message-ID: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>

Hi,

I don't know if my issue is related to ath9k driver or hostapd so I'm
sending this to both lists. My problem is following:

When using D-link dwa-556 (Atheros AR5418 on board) as an AP, RX
direction seems to be deaf. AP sends beacons but it doesn't recognize
probe requests sent by the stations. I can verify that stations really
send probe requests because I have AirMagnet wifi analyzer in place.
So, I can be sure that rx side has problems.

Then I change D-links role to station and make a connection to another
AP, say AP2. Station role works fine, I can ping the AP2. If I then
change D-links role back to AP it starts to work. This is strange to
me. How come use of station mode gets ap mode to work?

If I reboot my board after this, AP role works right from the start.
But if I toggle the power of my board, AP mode gets broken again. What
could cause this kind of behavior? Is there something in AR5418
registers that is left uninitialized in AP mode in the driver or
hostapd?

I'm using Linux kernel version 2.6.33 on powerpc platform. Hostapd
version is 0.7.3 and wpa_supplicant is 0.7.3 too.

I really appreciate any help.

Sami


From Tobias.Gunkel  Fri Aug  5 00:52:50 2011
From: Tobias.Gunkel (Tobias Gunkel)
Date: Fri, 05 Aug 2011 09:52:50 +0200
Subject: Data rates if slow stations present
Message-ID: <20110805075250.21340@gmx.net>

Hello,

I have a general question regarding the behavior of an AP if slow stations are present. 
Imagine there are two stations - one 802.11n capable station and one that is capable of only 802.11b. 
Now the 802.11n station connects to an AP and is able to transfer data with the lets say 150 MBit/s.
After a while the 11b only station connects to the AP but as the SNR is very bad it can only transfer at a 1 MBit/s rate.

What happens now with the data-rate of the 11n station? Will this station switch to 11b two or is an AP able to manage stations in different modes at the "same" time? At least the 11b station will occupy the channel for some time so that the 11n station will have less time-slots for data transfers so the data rate will drop at least 1 MBit/s (probably more because the 11b station needs more time for transferring 1 MBit than the 11n station).

Is the behavior of the AP standardized? I already had a look into the 802.11 standard but could not find a description of the behavior of AP stations (there is only a very short Annex N: AP functional description). 
What is the behavior of hostAP in this case?

Thanks in advance for answers or pointers to other sites, standards, ...

Regards,
Tobias Gunkel


From fmcconstantino  Fri Aug  5 09:17:47 2011
From: fmcconstantino (=?ISO-8859-1?Q?F=E1bio_Miguel_Calisto_Constantino?=)
Date: Fri, 5 Aug 2011 17:17:47 +0100
Subject: Problem with wireless drivers to work with host ap
Message-ID: <CAPR3eXcBWFymi7t+eTGJcN4fAtAS8Kd-4oVjkWAiNJXPNOPiCQ@mail.gmail.com>

Hello,

I hope this is the correct address to send such e-mails, I am in need of
some help here.
In the work needed to start my theses, one of my assignments is to set my
laptop to work as an access point. From what I've read, hostapd is the
program that should make this happen for me.

I have Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller
[14e4:4727] (rev 01) and after reading countless forums/tutorials I can't
seem to get this working.

I have also tried searching to see if this card is supported by hostapd but
can't seem to find any answers.

Any help would be greatly appreciated, I'm really getting desperate here :x

-- 
F?bio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110805/85d31779/attachment.htm 


From Tobias.Gunkel  Fri Aug  5 13:55:11 2011
From: Tobias.Gunkel (Tobias Gunkel)
Date: Fri, 05 Aug 2011 22:55:11 +0200
Subject: Problem with wireless drivers to work with host ap
In-Reply-To: <CAPR3eXcBWFymi7t+eTGJcN4fAtAS8Kd-4oVjkWAiNJXPNOPiCQ@mail.gmail.com>
References: <CAPR3eXcBWFymi7t+eTGJcN4fAtAS8Kd-4oVjkWAiNJXPNOPiCQ@mail.gmail.com>
Message-ID: <4E3C58AF.4030809@gmx.de>

Hello F?bio,

> I hope this is the correct address to send such e-mails, I am in need of
> some help here.
> In the work needed to start my theses, one of my assignments is to set
> my laptop to work as an access point. From what I've read, hostapd is
> the program that should make this happen for me.
> 
> I have Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller
> [14e4:4727] (rev 01) and after reading countless forums/tutorials I
> can't seem to get this working.

I don't have a Broadcom WLAN adapter myself but according to
http://linuxwireless.org/en/users/Drivers there are two lines of drivers
for Broadcom chips: b43(/legacy) and brcmsmac/brcmfmac.

If you want to use hostapd the driver has to support AP mode (see AP
column of the linuxwireless driver table).

The b43(/legacy) driver page (click on the driver name in the table)
which supports AP mode states that the BCM4313 is not supported by the
driver.

The new open source driver brcmsmac/brcmfmac from Broadcom does support
the BCM4313 chip but not AP mode (AP = no).
The brcmsmac/brcmfmac page states: "To be done once softmac driver is in
mainline: Add support for ..., AP, ...".
Depending on how old this information is, it seems that you will not get
hostapd to work with this chipset at the moment.

Maybe someone else knows the current status of that driver.

Regards,
Tobias



From mmodem00  Fri Aug  5 14:10:11 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Fri, 5 Aug 2011 22:10:11 +0100
Subject: unable to build wpa_supplicant
Message-ID: <CAJZLoOxwt7yyRYZ-UQRoVB_dd4azVCbUhNCFWBnU=k+MXmh0fg@mail.gmail.com>

I have cloned git repository and isnt possible to build, the output:

cc1: warnings being treated as errors
../src/crypto/random.c: In function ?random_write_entropy?:
../src/crypto/random.c:372:8: error: ignoring return value of
?fwrite?, declared with attribute warn_unused_res ult
../src/crypto/random.c:373:8: error: ignoring return value of
?fwrite?, declared with attribute warn_unused_res ult
make: *** [../src/crypto/random.o] Error 1
make: *** Waiting for unfinished jobs....
  CC  ../src/crypto/tls_openssl.c
  CC  ../src/crypto/dh_groups.c
  CC  ctrl_iface.c

-- 
Z?


From felix.sargent  Fri Aug  5 14:13:44 2011
From: felix.sargent (Felix Sargent)
Date: Fri, 5 Aug 2011 14:13:44 -0700
Subject: Compiling wpa_supplicant for OS X (10.6, 10.7)
Message-ID: <CAEnJkF6t-cayMVyb9=QZpMhQQDM-L1v8K7j+WUCDzyr_1yjSWw@mail.gmail.com>

Hi everyone,

I'm trying to compile for OS X as we're getting consistently frustrated with
Ethernet 802.1x authentication certificates stored in the OSX keychain, and
want more access and control over the auth process.

Unfortunately, I'm having  hard time building the driver components.
I'm getting a lot of error messages along the lines of:

../src/drivers/driver_wext.c: In function ?wpa_driver_wext_set_mode?:
../src/drivers/driver_wext.c:2152: error: ?struct iwreq? has no member named
?ifr_name?
../src/drivers/driver_wext.c: In function ?wpa_driver_wext_pmksa?:
../src/drivers/driver_wext.c:2202: error: ?struct iwreq? has no member named
?ifr_name?
make: *** [../src/drivers/driver_wext.o] Error 1


I'm not quite sure what to do in this situation. Can anyone offer some
suggestions of how to resolve this error?


Felix Sargent
felix.sargent at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110805/d84c0033/attachment.htm 


From galenz  Fri Aug  5 15:25:08 2011
From: galenz (Galen)
Date: Fri, 5 Aug 2011 15:25:08 -0700
Subject: Data rates if slow stations present
In-Reply-To: <20110805075250.21340@gmx.net>
References: <20110805075250.21340@gmx.net>
Message-ID: <7742C7FB-7F59-4555-A1ED-5634BFC1A6B2@zinkconsulting.com>

Tobias,

Here's the basics:

1) When make an 802.11n AP compatible with 802.11g, you loose some performance.

2) When you make 802.11n AP compatible with 802.11b, you lose even more performance.

Basically, every layer of backwards compatibility adds to the operating overhead, even if there are no legacy devices actively using bandwidth. 

When slower devices come onto the network, the bandwidth is shared by time. Let's say that you have an 802.11n and 802.11b device both active on an AP. If they are both actively transmitting data as fast as they can, each will take around 50% of the airtime. This means that if you have an 802.11n client at 150 megabits and another at 1 megabit, each will get around 50% of the maximum throughput.

This is of course a gross simplification, but it should give you an idea as to how things work approximately. There's so much variance in implementation, client functionality, etc. that these are VERY VERY rough approximations. 

I think that it would be helpful to provide additional context as to why you're asking this question. I could provide you with lots of links, but it would likely down you documentation.

-Galen

On Aug 5, 2011, at 12:52 AM, Tobias Gunkel wrote:

> Hello,
> 
> I have a general question regarding the behavior of an AP if slow stations are present. 
> Imagine there are two stations - one 802.11n capable station and one that is capable of only 802.11b. 
> Now the 802.11n station connects to an AP and is able to transfer data with the lets say 150 MBit/s.
> After a while the 11b only station connects to the AP but as the SNR is very bad it can only transfer at a 1 MBit/s rate.
> 
> What happens now with the data-rate of the 11n station? Will this station switch to 11b two or is an AP able to manage stations in different modes at the "same" time? At least the 11b station will occupy the channel for some time so that the 11n station will have less time-slots for data transfers so the data rate will drop at least 1 MBit/s (probably more because the 11b station needs more time for transferring 1 MBit than the 11n station).
> 
> Is the behavior of the AP standardized? I already had a look into the 802.11 standard but could not find a description of the behavior of AP stations (there is only a very short Annex N: AP functional description). 
> What is the behavior of hostAP in this case?
> 
> Thanks in advance for answers or pointers to other sites, standards, ...
> 
> Regards,
> Tobias Gunkel
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap



From proski  Fri Aug  5 19:01:57 2011
From: proski (Pavel Roskin)
Date: Fri, 5 Aug 2011 22:01:57 -0400
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
Message-ID: <20110805220157.613355a3@mj>

On Fri, 5 Aug 2011 09:48:42 +0300
sami ahokas <sami.m.ahokas at gmail.com> wrote:

> I don't know if my issue is related to ath9k driver or hostapd so I'm
> sending this to both lists.
...
> If I reboot my board after this, AP role works right from the start.
> But if I toggle the power of my board, AP mode gets broken again. What
> could cause this kind of behavior? Is there something in AR5418
> registers that is left uninitialized in AP mode in the driver or
> hostapd?

That's clearly something in the hardware, so hostapd is irrelevant here.

> I'm using Linux kernel version 2.6.33 on powerpc platform. Hostapd
> version is 0.7.3 and wpa_supplicant is 0.7.3 too.

The first thing should be to test the card with the latest kernel or
with compat-wireless.  For Linux wireless drivers, 2.6.33 is stone
age :)

You can also check the card with MadWifi trunk snapshot.  If that works
fine, chances are that ath9k does something wrong, otherwise I would
suspect the hardware.

-- 
Regards,
Pavel Roskin


From proski  Fri Aug  5 19:19:00 2011
From: proski (Pavel Roskin)
Date: Fri, 5 Aug 2011 22:19:00 -0400
Subject: unable to build wpa_supplicant
In-Reply-To: <CAJZLoOxwt7yyRYZ-UQRoVB_dd4azVCbUhNCFWBnU=k+MXmh0fg@mail.gmail.com>
References: <CAJZLoOxwt7yyRYZ-UQRoVB_dd4azVCbUhNCFWBnU=k+MXmh0fg@mail.gmail.com>
Message-ID: <20110805221900.07eba400@mj>

On Fri, 5 Aug 2011 22:10:11 +0100
Z? <mmodem00 at gmail.com> wrote:

> I have cloned git repository and isnt possible to build, the output:
> 
> cc1: warnings being treated as errors
> ../src/crypto/random.c: In function ?random_write_entropy?:
> ../src/crypto/random.c:372:8: error: ignoring return value of
> ?fwrite?, declared with attribute warn_unused_res ult
> ../src/crypto/random.c:373:8: error: ignoring return value of
> ?fwrite?, declared with attribute warn_unused_res ult

That should not be hard to fix, if you are interesting is fixing the
code.

But I guess you simply enabled CONFIG_EAPOL_TEST in .config, which
enabled the -Werror option for the compiler.  You may want to disable
that option and deal with the warnings when you have time and desire
for that.

Alternatively, enable CONFIG_NO_RANDOM_POOL to disable the problematic
code.

-- 
Regards,
Pavel Roskin


From mmodem00  Fri Aug  5 20:02:40 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Sat, 6 Aug 2011 04:02:40 +0100
Subject: unable to build wpa_supplicant
In-Reply-To: <20110805221900.07eba400@mj>
References: <CAJZLoOxwt7yyRYZ-UQRoVB_dd4azVCbUhNCFWBnU=k+MXmh0fg@mail.gmail.com>
	<20110805221900.07eba400@mj>
Message-ID: <CAJZLoOwG2oeD69aJddqZi3nin5f_gyUByLQ_O3ejvEBRAXNvkw@mail.gmail.com>

2011/8/6 Pavel Roskin <proski at gnu.org>:
> On Fri, 5 Aug 2011 22:10:11 +0100
> Z? <mmodem00 at gmail.com> wrote:
>
>> I have cloned git repository and isnt possible to build, the output:
>>
>> cc1: warnings being treated as errors
>> ../src/crypto/random.c: In function ?random_write_entropy?:
>> ../src/crypto/random.c:372:8: error: ignoring return value of
>> ?fwrite?, declared with attribute warn_unused_res ult
>> ../src/crypto/random.c:373:8: error: ignoring return value of
>> ?fwrite?, declared with attribute warn_unused_res ult
>
> That should not be hard to fix, if you are interesting is fixing the
> code.
>
> But I guess you simply enabled CONFIG_EAPOL_TEST in .config, which
> enabled the -Werror option for the compiler. ?You may want to disable
> that option and deal with the warnings when you have time and desire
> for that.

Yes, CONFIG_EAPOL_TEST is enabled  in the.config file i use to package
wpa_supplicant

Anyway -Werror its also puled by the distro defaults, check this:

+ CFLAGS='-O2 -g -pipe -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-b uffer-size=4'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp -buffer-size=4'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-b uffer-size=4'
+ export FFLAGS
+ LDFLAGS=' -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1
-Wl,--build-id -Wl,--enable-new-dtags'

But this kind of problem didnt happened when building version 0.7.3.

By the way, whats wpa_supplicant current version in git?
In what file can be checked the version?

> Alternatively, enable CONFIG_NO_RANDOM_POOL to disable the problematic
> code.
>
> --
> Regards,
> Pavel Roskin
>



-- 
Z?


From proski  Fri Aug  5 20:25:25 2011
From: proski (Pavel Roskin)
Date: Fri, 5 Aug 2011 23:25:25 -0400
Subject: unable to build wpa_supplicant
In-Reply-To: <CAJZLoOwG2oeD69aJddqZi3nin5f_gyUByLQ_O3ejvEBRAXNvkw@mail.gmail.com>
References: <CAJZLoOxwt7yyRYZ-UQRoVB_dd4azVCbUhNCFWBnU=k+MXmh0fg@mail.gmail.com>
	<20110805221900.07eba400@mj>
	<CAJZLoOwG2oeD69aJddqZi3nin5f_gyUByLQ_O3ejvEBRAXNvkw@mail.gmail.com>
Message-ID: <20110805232525.29feeb11@mj>

On Sat, 6 Aug 2011 04:02:40 +0100
Z? <mmodem00 at gmail.com> wrote:

> But this kind of problem didnt happened when building version 0.7.3.

And I'm getting warnings about unused variables.  Unfortunately, fixing
some of those warnings is not quite satisfying, as the variables are
used in some conditions.

> By the way, whats wpa_supplicant current version in git?
> In what file can be checked the version?

That's not hard to find:
src/common/version.h

-- 
Regards,
Pavel Roskin


From Tobias.Gunkel  Sat Aug  6 00:35:18 2011
From: Tobias.Gunkel (Tobias Gunkel)
Date: Sat, 06 Aug 2011 09:35:18 +0200
Subject: Problem with wireless drivers to work with host ap
In-Reply-To: <4E3C58AF.4030809@gmx.de>
References: <CAPR3eXcBWFymi7t+eTGJcN4fAtAS8Kd-4oVjkWAiNJXPNOPiCQ@mail.gmail.com>
	<4E3C58AF.4030809@gmx.de>
Message-ID: <4E3CEEB6.6090002@gmx.de>

Hello Fabio,

>> I hope this is the correct address to send such e-mails, I am in need of
>> some help here.
>> In the work needed to start my theses, one of my assignments is to set
>> my laptop to work as an access point. From what I've read, hostapd is
>> the program that should make this happen for me.
>>
>> I have Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller
>> [14e4:4727] (rev 01) and after reading countless forums/tutorials I
>> can't seem to get this working.
> 
> I don't have a Broadcom WLAN adapter myself but according to
> http://linuxwireless.org/en/users/Drivers there are two lines of drivers
> for Broadcom chips: b43(/legacy) and brcmsmac/brcmfmac.
> 
> If you want to use hostapd the driver has to support AP mode (see AP
> column of the linuxwireless driver table).
> 
> The b43(/legacy) driver page (click on the driver name in the table)
> which supports AP mode states that the BCM4313 is not supported by the
> driver.
> 
> The new open source driver brcmsmac/brcmfmac from Broadcom does support
> the BCM4313 chip but not AP mode (AP = no).
> The brcmsmac/brcmfmac page states: "To be done once softmac driver is in
> mainline: Add support for ..., AP, ...".
> Depending on how old this information is, it seems that you will not get
> hostapd to work with this chipset at the moment.
> 
> Maybe someone else knows the current status of that driver.

I took a look into the git repository of the open source driver brcmsmac
for BCM4313 and it does not have AP support yet (mac80211_if.c: /* Just
STA for now */).

But according to the support table
(http://linuxwireless.org/en/users/Drivers/b43) the closed source wl
driver (http://www.broadcom.com/support/802.11/linux_sta.php) supports
that card too.
That one seems to support AP mode so you may give it a try. Note that it
uses the old Wireless Extensions (wext) interface instead of the new
mac80211 (brcmsmac has this one) interface.

I am not sure if hostapd supports AP mode via wext.
At least you may give it a try. You can test AP mode for wext drivers by
setting the mode with "iwconfig <wlan-dev> mode master" and then check
the mode with iwconfig. If this works try to start hostapd.

Regards,
Tobias


From j  Sat Aug  6 11:11:27 2011
From: j (Jouni Malinen)
Date: Sat, 6 Aug 2011 21:11:27 +0300
Subject: Compiling wpa_supplicant for OS X (10.6, 10.7)
In-Reply-To: <CAEnJkF6t-cayMVyb9=QZpMhQQDM-L1v8K7j+WUCDzyr_1yjSWw@mail.gmail.com>
References: <CAEnJkF6t-cayMVyb9=QZpMhQQDM-L1v8K7j+WUCDzyr_1yjSWw@mail.gmail.com>
Message-ID: <20110806181127.GA25795@jm.kir.nu>

On Fri, Aug 05, 2011 at 02:13:44PM -0700, Felix Sargent wrote:
> I'm trying to compile for OS X as we're getting consistently frustrated with
> Ethernet 802.1x authentication certificates stored in the OSX keychain, and
> want more access and control over the auth process.

I haven't tested this with OS X, but you can compile wpa_supplicant by
adding following lines into wpa_supplicant/.config:

CONFIG_DRIVER_WIRED=y
CONFIG_L2_PACKET=freebsd

> Unfortunately, I'm having  hard time building the driver components.
> I'm getting a lot of error messages along the lines of:
> 
> ../src/drivers/driver_wext.c: In function ?wpa_driver_wext_set_mode?:
> ../src/drivers/driver_wext.c:2152: error: ?struct iwreq? has no member named

driver_wext.c is a Linux driver wrapper and there is no point in trying
to build that for OS X. You will need to remove CONFIG_DRIVER_* lines
that do not match the target you are build for.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sat Aug  6 11:34:45 2011
From: j (Jouni Malinen)
Date: Sat, 6 Aug 2011 21:34:45 +0300
Subject: [PATCH] DBus/P2P: Return Primary and Secondary device types as
	bytes
In-Reply-To: <03C60F3308A1A6419E34968DB630497813706CAA@ORSMSX101.amr.corp.intel.com>
References: <03C60F3308A1A6419E34968DB630497813706CAA@ORSMSX101.amr.corp.intel.com>
Message-ID: <20110806183445.GA26681@jm.kir.nu>

On Fri, Aug 05, 2011 at 05:28:59AM +0000, Sane, Jayant wrote:
> These properties are already correctly treated as bytes for the local
> device, we need to do same for peers.

Thanks, applied.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sat Aug  6 11:37:37 2011
From: j (Jouni Malinen)
Date: Sat, 6 Aug 2011 21:37:37 +0300
Subject: Is it possible to record "number of scans" performed information
	down at supplicant level and make it available at Application layer?
In-Reply-To: <CAMVaJCdZtbdDuR7i9ABYdk5NEhVF8ue+J05xkhj0e81iUs0f-g@mail.gmail.com>
References: <CAMVaJCdZtbdDuR7i9ABYdk5NEhVF8ue+J05xkhj0e81iUs0f-g@mail.gmail.com>
Message-ID: <20110806183737.GB26681@jm.kir.nu>

On Wed, Aug 03, 2011 at 09:52:02PM -0400, Nithyananthan Poosamani wrote:
> I know that wpa_supplicant data structure has "scan_runs" integer member
> element which can inform me of the number of scan runs performed after the
> supplicant service started running.
> However I do not know how to record these value somehow and make it
> available to an application running at the top.

> Can I write information directly onto a file say "xyz.txt" in /data
> directory or somewhere so that I can retrieve it later using a rooted
> phone?

Exposing the current value through the control interface (e.g., the
STATUS command) would sound like a cleaner way. See
wpa_supplicant_ctrl_iface_status() in wpa_supplicant/ctrl_iface.c.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sat Aug  6 11:49:29 2011
From: j (Jouni Malinen)
Date: Sat, 6 Aug 2011 21:49:29 +0300
Subject: [PATCH] Move control interface cleanup after
	wpa_supplicant_cleanup()
In-Reply-To: <20110803181127.3019A3884E@ushik.mtv.corp.google.com>
References: <20110803181127.3019A3884E@ushik.mtv.corp.google.com>
Message-ID: <20110806184929.GC26681@jm.kir.nu>

On Wed, Aug 03, 2011 at 11:03:49AM -0700, Dmitry Shmidt wrote:
> This is needed to be able to communicate through control interface
> after wpa_supplicant_cleanup()

What communication is there after that? You mentioned
wpas_notify_iface_removed(), but there does not seem to be any
wpa_msg*() calls there..

> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
> index 3f3e435..c93c4d2 100644
> @@ -382,16 +382,10 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
>  	if (wpa_s->conf != NULL) {
>  		struct wpa_ssid *ssid;
>  		for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
>  			wpas_notify_network_removed(wpa_s, ssid);
> -		wpa_config_free(wpa_s->conf);
> -		wpa_s->conf = NULL;
>  	}

This is a bit ugly leaving partially cleared configuration behind..

> @@ -2303,11 +2297,21 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
>  
>  	wpa_supplicant_cleanup(wpa_s);
>  
> +	if (wpa_s->drv_priv)
> +		wpa_drv_deinit(wpa_s);
> +
>  	if (notify)
>  		wpas_notify_iface_removed(wpa_s);

Why not just move wpa_supplicant_cleanup() call to be after the
wpas_notify_iface_removed()? Why was wpa_drv_deinit() moved to be before
wpas_notify_iface_removed()?

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sat Aug  6 11:58:54 2011
From: j (Jouni Malinen)
Date: Sat, 6 Aug 2011 21:58:54 +0300
Subject: How to set probe resp WPS IE through nl80211 interface
In-Reply-To: <CAKH3Sjsuixw41qz9zguhZJnhHcEiepS4XAEuSJU_3xtmFxSH7g@mail.gmail.com>
References: <CAKH3Sjsuixw41qz9zguhZJnhHcEiepS4XAEuSJU_3xtmFxSH7g@mail.gmail.com>
Message-ID: <20110806185854.GD26681@jm.kir.nu>

On Tue, Aug 02, 2011 at 01:58:31PM +0800, Stone wrote:
>     Could someone tell me that, when wpa_supplicant works as AP, how does
> wpa_supplicant set probe resp WPS IE through nl80211 interface? The beacon
> IE is able to be configured through set_beacon in driver_nl80211.c, while
> there is no accomplishment for set_ap_wps_ie.

The nl80211 interface does not currently support drivers that handle
Probe Request processing internally (or well, likely in the firmware).
There are number of drivers that would require this type of mechanism,
but no one has submitted a suitable patch to do that in
cfg80211/nl80211 yet, so wpa_supplicant cannot support it either. If no
one else gets to this soon, I'll come up with proposed changes to
cfg80211 in the not too distant future.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sat Aug  6 12:10:14 2011
From: j (Jouni Malinen)
Date: Sat, 6 Aug 2011 22:10:14 +0300
Subject: [PATCH 2/2] hostap: enable uapsd in P2P GO mode if go_apsd was set
In-Reply-To: <1312137905-16621-2-git-send-email-arik@wizery.com>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<1312137905-16621-2-git-send-email-arik@wizery.com>
Message-ID: <20110806191014.GE26681@jm.kir.nu>

On Sun, Jul 31, 2011 at 09:45:05PM +0300, Arik Nemtsov wrote:
> If uapsd is explicitly enabled, set conf->bss->wmm_enabled and
> conf->bss->wmm_uapsd to enable (and advertise) uapsd.

Thanks, applied.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sat Aug  6 12:15:29 2011
From: j (Jouni Malinen)
Date: Sat, 6 Aug 2011 22:15:29 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <1312137905-16621-1-git-send-email-arik@wizery.com>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
Message-ID: <20110806191529.GF26681@jm.kir.nu>

On Sun, Jul 31, 2011 at 09:45:04PM +0300, Arik Nemtsov wrote:
> Set the HT capabilities of a P2P GO according to the supported ones in
> wiphy. In addition enable WMM when 802.11n is enabled.

Isn't wmm_enabled already set (the default hostapd config sets it to -1
and that is then converted into ieee80211n)?

I'm not completely sure I would like to get all HT capabilities enabled
in this way by default based on driver capabilities. Doesn't this leave
things in inconsistent state (e.g., HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET
set, but secondary_channel not)?

-- 
Jouni Malinen                                            PGP id EFC895FA


From wupengzhan110  Sat Aug  6 19:46:23 2011
From: wupengzhan110 (12)
Date: Sun, 7 Aug 2011 10:46:23 +0800 (CST)
Subject: p2p test Error: "CTRL-EVENT-EAP-FAILURE"
Message-ID: <552ef7a7.3a6.131a22253fb.Coremail.wupengzhan110@126.com>

 
Hello,I have a wireless card which chipest is AR9271. Today I test the p2p usage with latest compat-wireless release,using the latest hostap from  git://w1.fi/srv/git/hostap.git . But I failed connect two P2P devices with"p2p_find/p2p_connect" commands. It just look like there is some error in the EAP  method choosing phase .The two devices reports the fllowing message.

one  side

> > status
wpa_state=INACTIVE
p2p_device_address=b0:48:7a:06:bc:c3
address=b0:48:7a:06:bc:c3
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE

> > p2p_find
OK
<3>P2P-DEVICE-FOUND b0:48:7a:06:bc:c9 p2p_dev_addr=b0:48:7a:06:bc:c9 pri_dev_type=1-0050F204-1 name='WN721N2' config_methods=0x80 dev_capab=0x23 group_capab=0x8
<3>P2P-GO-NEG-REQUEST b0:48:7a:06:bc:c9 dev_passwd_id=4

> > p2p_connect b0:48:7a:06:bc:c9 pbc
OK
<3>P2P-GO-NEG-SUCCESS
<3>WPS-ENROLLEE-SEEN b0:48:7a:06:bc:c9 0b76b931-7a8b-5165-8d65-f148b6543767 1-0050F204-1 0x2388 4 1 [WN721N2]
<3>CTRL-EVENT-EAP-STARTED b0:48:7a:06:bc:c9
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
<3>CTRL-EVENT-EAP-FAILURE b0:48:7a:06:bc:c9
<3>P2P-GROUP-FORMATION-FAILURE
<3>P2P-GROUP-REMOVED wlan0 GO



other side

> > p2p_find
OK
<3>P2P-DEVICE-FOUND b0:48:7a:06:bc:c3 p2p_dev_addr=b0:48:7a:06:bc:c3 pri_dev_type=1-0050F204-1 name='WN721-1' config_methods=0x188 dev_capab=0x23 group_capab=0x0

> > p2p_connect b0:48:7a:06:bc:c3 pbc
OK
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>P2P-GO-NEG-SUCCESS
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE-PBC
<3>SME: Trying to authenticate with b0:48:7a:06:bc:c3 (SSID='DIRECT-5i' freq=2437 MHz)
<3>Trying to associate with b0:48:7a:06:bc:c3 (SSID='DIRECT-5i' freq=2437 MHz)
<3>Associated with b0:48:7a:06:bc:c3
<3>CTRL-EVENT-EAP-STARTED EAP authentication started
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
<3>CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
<3>CTRL-EVENT-EAP-FAILURE EAP authentication failed
<3>WPS-FAIL
<3>CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=2
<3>P2P-GROUP-FORMATION-FAILURE
<3>P2P-GROUP-REMOVED wlan1 GO

what's wrong with software, is there some wrong thing about config or others.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110807/a17cdf40/attachment-0001.htm 


From arik  Sat Aug  6 23:00:00 2011
From: arik (Arik Nemtsov)
Date: Sun, 7 Aug 2011 09:00:00 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <20110806191529.GF26681@jm.kir.nu>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
Message-ID: <CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>

On Sat, Aug 6, 2011 at 22:15, Jouni Malinen <j at w1.fi> wrote:
> On Sun, Jul 31, 2011 at 09:45:04PM +0300, Arik Nemtsov wrote:
>> Set the HT capabilities of a P2P GO according to the supported ones in
>> wiphy. In addition enable WMM when 802.11n is enabled.
>
> Isn't wmm_enabled already set (the default hostapd config sets it to -1
> and that is then converted into ieee80211n)?

Yea you're right. Haven't noticed this one. I'll remove this line from
the patch.

>
> I'm not completely sure I would like to get all HT capabilities enabled
> in this way by default based on driver capabilities. Doesn't this leave
> things in inconsistent state (e.g., HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET
> set, but secondary_channel not)?

Yes this specific setting seems problematic. I guess for now we can
just mask out this bit in the received ht_capab?

Arik


From j  Sun Aug  7 00:26:21 2011
From: j (Jouni Malinen)
Date: Sun, 7 Aug 2011 10:26:21 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
Message-ID: <20110807072621.GA1890@jm.kir.nu>

On Sun, Aug 07, 2011 at 09:00:00AM +0300, Arik Nemtsov wrote:
> On Sat, Aug 6, 2011 at 22:15, Jouni Malinen <j at w1.fi> wrote:
> > I'm not completely sure I would like to get all HT capabilities enabled
> > in this way by default based on driver capabilities. Doesn't this leave
> > things in inconsistent state (e.g., HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET
> > set, but secondary_channel not)?
> 
> Yes this specific setting seems problematic. I guess for now we can
> just mask out this bit in the received ht_capab?

I'm not sure that is the only problematic one and as such, I would much
rather see an explicit set of features that get enabled by default if
there is good justification for doing so rather than just enabling
everything.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sun Aug  7 00:28:52 2011
From: j (Jouni Malinen)
Date: Sun, 7 Aug 2011 10:28:52 +0300
Subject: p2p test Error: "CTRL-EVENT-EAP-FAILURE"
In-Reply-To: <552ef7a7.3a6.131a22253fb.Coremail.wupengzhan110@126.com>
References: <552ef7a7.3a6.131a22253fb.Coremail.wupengzhan110@126.com>
Message-ID: <20110807072852.GB1890@jm.kir.nu>

On Sun, Aug 07, 2011 at 10:46:23AM +0800, 12 wrote:
> Hello,I have a wireless card which chipest is AR9271. Today I test the p2p usage with latest compat-wireless release,using the latest hostap from  git://w1.fi/srv/git/hostap.git . But I failed connect two P2P devices with"p2p_find/p2p_connect" commands. It just look like there is some error in the EAP  method choosing phase .The two devices reports the fllowing message.

> <3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
> <3>CTRL-EVENT-EAP-FAILURE b0:48:7a:06:bc:c9
> <3>P2P-GROUP-FORMATION-FAILURE

> <3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
> <3>CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
> <3>CTRL-EVENT-EAP-FAILURE EAP authentication failed
> <3>WPS-FAIL
> <3>CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=2
> <3>P2P-GROUP-FORMATION-FAILURE

That does not look like EAP method selection issue, but something going
wrong during WPS. Please collect more debug information from both
devices by adding -ddt to the wpa_supplicant command line and looking at
the debug log rather than the limited messages showing up in wpa_cli.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sun Aug  7 01:18:20 2011
From: j (Jouni Malinen)
Date: Sun, 7 Aug 2011 11:18:20 +0300
Subject: [PATCH] dbus: shuffle property description struct members
In-Reply-To: <1311969690.3084.6.camel@dcbw.foobar.com>
References: <1311969690.3084.6.camel@dcbw.foobar.com>
Message-ID: <20110807081820.GC1890@jm.kir.nu>

On Fri, Jul 29, 2011 at 03:01:29PM -0500, Dan Williams wrote:
> So we can put the access permissions before the getters/setters
> and make it look prettier.

Why would we even need the separate access permission (enum
dbus_prop_access)? That can be determined from getter/setter function
pointers and seems to be just added extra complexity and source of human
errors. As such, instead of applying this reordering patch, I just
removed the access variable completely.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Sun Aug  7 01:23:13 2011
From: j (Jouni Malinen)
Date: Sun, 7 Aug 2011 11:23:13 +0300
Subject: [PATCH] dbus: don't segfault if p2p isn't enabled
In-Reply-To: <1311969595.3084.4.camel@dcbw.foobar.com>
References: <1311969595.3084.4.camel@dcbw.foobar.com>
Message-ID: <20110807082313.GD1890@jm.kir.nu>

On Fri, Jul 29, 2011 at 02:59:54PM -0500, Dan Williams wrote:
> Various pieces of the p2p code assume that p2p is enabled, so make
> the D-Bus code not call the p2p stuff if p2p is disabled.  Also
> ensures that if p2p is disabled a suitable error is returned to
> the D-Bus caller.

Thanks, applied.

-- 
Jouni Malinen                                            PGP id EFC895FA


From proski  Sun Aug  7 05:49:09 2011
From: proski (Pavel Roskin)
Date: Sun, 07 Aug 2011 08:49:09 -0400
Subject: [PATCH 1/3] random: improve error messages about writing to entropy
	file
Message-ID: <20110807124909.12333.69130.stgit@localhost.localdomain>


---

 src/crypto/random.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/crypto/random.c b/src/crypto/random.c
index 5b15354..eff96d2 100644
--- a/src/crypto/random.c
+++ b/src/crypto/random.c
@@ -364,7 +364,8 @@ static void random_write_entropy(void)
 
 	f = fopen(random_entropy_file, "wb");
 	if (f == NULL) {
-		wpa_printf(MSG_ERROR, "random: Could not write %s",
+		wpa_printf(MSG_ERROR,
+			   "random: Could not open entropy file %s",
 			   random_entropy_file);
 		return;
 	}
@@ -375,7 +376,8 @@ static void random_write_entropy(void)
 		fail = 1;
 	fclose(f);
 	if (fail) {
-		wpa_printf(MSG_ERROR, "random: Could not entropy data to %s",
+		wpa_printf(MSG_ERROR,
+			   "random: Could not write entropy data to %s",
 			   random_entropy_file);
 		return;
 	}


From proski  Sun Aug  7 05:49:17 2011
From: proski (Pavel Roskin)
Date: Sun, 07 Aug 2011 08:49:17 -0400
Subject: [PATCH 2/3] driver_wext: remove write-only variable "ap_num"
In-Reply-To: <20110807124909.12333.69130.stgit@localhost.localdomain>
References: <20110807124909.12333.69130.stgit@localhost.localdomain>
Message-ID: <20110807124917.12333.22601.stgit@localhost.localdomain>


---

 src/drivers/driver_wext.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index e731101..9fa356b 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1387,7 +1387,7 @@ static void wpa_driver_wext_add_scan_entry(struct wpa_scan_results *res,
 struct wpa_scan_results * wpa_driver_wext_get_scan_results(void *priv)
 {
 	struct wpa_driver_wext_data *drv = priv;
-	size_t ap_num = 0, len;
+	size_t len;
 	int first;
 	u8 *res_buf;
 	struct iw_event iwe_buf, *iwe = &iwe_buf;
@@ -1399,7 +1399,6 @@ struct wpa_scan_results * wpa_driver_wext_get_scan_results(void *priv)
 	if (res_buf == NULL)
 		return NULL;
 
-	ap_num = 0;
 	first = 1;
 
 	res = os_zalloc(sizeof(*res));


From proski  Sun Aug  7 05:49:24 2011
From: proski (Pavel Roskin)
Date: Sun, 07 Aug 2011 08:49:24 -0400
Subject: [PATCH 3/3] hostapd: Use result of l2_packet_send() in
	hostapd_wpa_auth_send_ether()
In-Reply-To: <20110807124909.12333.69130.stgit@localhost.localdomain>
References: <20110807124909.12333.69130.stgit@localhost.localdomain>
Message-ID: <20110807124924.12333.80367.stgit@localhost.localdomain>

If l2_packet_send() succeeds, don't report it as a failure.  It's a
successful fallback.
---

 src/ap/wpa_auth_glue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index 0e3cb31..7b60bc7 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -384,7 +384,7 @@ static int hostapd_wpa_auth_send_ether(void *ctx, const u8 *dst, u16 proto,
 	ret = l2_packet_send(hapd->l2, dst, proto, (u8 *) buf,
 			     sizeof(*buf) + data_len);
 	os_free(buf);
-	return -1;
+	return ret;
 }
 
 


From proski  Sun Aug  7 06:28:49 2011
From: proski (Pavel Roskin)
Date: Sun, 7 Aug 2011 09:28:49 -0400
Subject: Problem with wireless drivers to work with host ap
In-Reply-To: <4E3CEEB6.6090002@gmx.de>
References: <CAPR3eXcBWFymi7t+eTGJcN4fAtAS8Kd-4oVjkWAiNJXPNOPiCQ@mail.gmail.com>
	<4E3C58AF.4030809@gmx.de> <4E3CEEB6.6090002@gmx.de>
Message-ID: <20110807092849.64fb445d@ae>

On Sat, 06 Aug 2011 09:35:18 +0200
Tobias Gunkel <Tobias.Gunkel at gmx.de> wrote:

> I took a look into the git repository of the open source driver
> brcmsmac for BCM4313 and it does not have AP support yet
> (mac80211_if.c: /* Just STA for now */).
> 
> But according to the support table
> (http://linuxwireless.org/en/users/Drivers/b43) the closed source wl
> driver (http://www.broadcom.com/support/802.11/linux_sta.php) supports
> that card too.
> That one seems to support AP mode so you may give it a try. Note that
> it uses the old Wireless Extensions (wext) interface instead of the
> new mac80211 (brcmsmac has this one) interface.
> 
> I am not sure if hostapd supports AP mode via wext.

It doesn't, and it's a fundamental limitation.  Some functionality
needed for the access point is not provided by the wireless extensions.

One approach would be to try driver_broadcom in hostapd, but it's
unlikely to work as is.  It's for an older proprietary driver, but
Broadcom may have preserved some API.

Another approach would be to add AP mode to brcmsmac.  That would
benefit more people, and it's likely that somebody would help with
the effort.  Most of the AP code should be in the kernel already.  All
that's needed is the hardware specific part.

-- 
Regards,
Pavel Roskin


From mmodem00  Sun Aug  7 06:29:46 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Sun, 7 Aug 2011 14:29:46 +0100
Subject: unable to build wpa_supplicant
In-Reply-To: <20110806205101.18bc2631@ae>
References: <CAJZLoOxwt7yyRYZ-UQRoVB_dd4azVCbUhNCFWBnU=k+MXmh0fg@mail.gmail.com>
	<20110805221900.07eba400@mj>
	<CAJZLoOwG2oeD69aJddqZi3nin5f_gyUByLQ_O3ejvEBRAXNvkw@mail.gmail.com>
	<20110805232525.29feeb11@mj>
	<CAJZLoOwqAkLLaRrydSSCUC9a-xb0wS3uEg804HQUPJUOATZrGg@mail.gmail.com>
	<20110806205101.18bc2631@ae>
Message-ID: <CAJZLoOyZsUVLirx+24s0m8cWZ7VYyvtM-U1jgWt=yQE0KaoRaA@mail.gmail.com>

2011/8/7 Pavel Roskin <proski at gnu.org>:
> On Sat, 6 Aug 2011 14:55:16 +0100
> Z? <mmodem00 at gmail.com> wrote:
>
>> 2011/8/6 Pavel Roskin <proski at gnu.org>:
>> > On Sat, 6 Aug 2011 04:02:40 +0100
>> > Z? <mmodem00 at gmail.com> wrote:
>> >
>> >> But this kind of problem didnt happened when building version
>> >> 0.7.3.
>> >
>> > And I'm getting warnings about unused variables. ?Unfortunately,
>> > fixing some of those warnings is not quite satisfying, as the
>> > variables are used in some conditions.
>>
>> But why are you refering to warnings?
>
> I was talking about the warnings I could reproduce. ?I don't get any
> build errors.
>
>> There was a build error, please look with attention to the output that
>> i first pasted.
>
> I know it was a build error for you. ?It should be fixed now in git.
> Thank you for reporting!
>
> In the future, please don't drop the mailing list from cc.

I didnt notested that the mailing list address wasnt in, as you may
see my first message was to the ML and was in field To.

> --
> Regards,
> Pavel Roskin
>



-- 
Z?


From geryk  Sun Aug  7 09:49:01 2011
From: geryk (Gery Kahn)
Date: Sun,  7 Aug 2011 19:49:01 +0300
Subject: [PATCH] Add wpa_cli command to show roaming candidates
Message-ID: <1312735741-11574-1-git-send-email-geryk@ti.com>

The wpa_supplicant collects APs for roaming during background scanning.
The patch provides new cli command to get the list of roaming
candidates by selected APs from common wpa_supplicant list. The selection rules
are AP with the same SSID, AP with the same security type as connected netwrok
and not connected AP.

The patch introduces new function wpa_bss_ssid_match_security() to check if
selected AP has the same security as chosen ESS.

To test if AP has same WPS security as ESS introduced new function
wpa_ssid_match_wps(). There is also new file ssid.c to include SSID
functionality.


Signed-off-by: Gery Kahn <geryk at ti.com>
---
 wpa_supplicant/Makefile         |    1 +
 wpa_supplicant/bss.c            |  162 +++++++++++++++++++++++++++++++++++++++
 wpa_supplicant/bss.h            |    3 +
 wpa_supplicant/ctrl_iface.c     |   37 +++++++++
 wpa_supplicant/events.c         |    1 -
 wpa_supplicant/ssid.c           |   84 ++++++++++++++++++++
 wpa_supplicant/ssid.h           |   21 +++++
 wpa_supplicant/wpa_cli.c        |   10 +++
 wpa_supplicant/wps_supplicant.c |   61 +-------------
 wpa_supplicant/wps_supplicant.h |    4 +
 10 files changed, 327 insertions(+), 57 deletions(-)
 create mode 100644 wpa_supplicant/ssid.c
 create mode 100644 wpa_supplicant/ssid.h

diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 4b3f5a0..866179d 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -56,6 +56,7 @@ install: all
 OBJS = config.o
 OBJS += notify.o
 OBJS += bss.o
+OBJS += ssid.o
 OBJS += eap_register.o
 OBJS += ../src/utils/common.o
 OBJS += ../src/utils/wpa_debug.o
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index 21d6322..503bb20 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -16,13 +16,16 @@
 
 #include "utils/common.h"
 #include "utils/eloop.h"
+#include "rsn_supp/wpa.h"
 #include "common/ieee802_11_defs.h"
+#include "common/wpa_common.h"
 #include "drivers/driver.h"
 #include "wpa_supplicant_i.h"
 #include "config.h"
 #include "notify.h"
 #include "scan.h"
 #include "bss.h"
+#include "ssid.h"
 
 
 /**
@@ -267,6 +270,165 @@ static u32 wpa_bss_compare_res(const struct wpa_bss *old,
 	return changes;
 }
 
+int wpa_bss_ssid_match_wps(struct wpa_supplicant *wpa_s,
+			   struct wpa_ssid *ssid, struct wpa_bss *bss)
+{
+	struct wpabuf *wps_ie;
+	int ret;
+
+	if (!(ssid->key_mgmt & WPA_KEY_MGMT_WPS))
+		return -1;
+
+	wps_ie = wpa_bss_get_vendor_ie_multi(bss, WPS_IE_VENDOR_TYPE);
+
+	ret = wpa_ssid_match_wps(wpa_s, ssid, wps_ie);
+
+	if (wps_ie)
+		wpabuf_free(wps_ie);
+
+	return ret;
+}
+
+int wpa_bss_ssid_match_security(struct wpa_supplicant *wpa_s,
+				struct wpa_ssid *ssid,
+				struct wpa_bss *bss)
+{
+	struct wpa_ie_data ie;
+	int proto_match = 0;
+	const u8 *rsn_ie, *wpa_ie;
+	int ret;
+	int wep_ok;
+
+	ret = wpa_bss_ssid_match_wps(wpa_s, ssid, bss);
+	if (ret >= 0)
+		return ret;
+
+	/* Allow TSN if local configuration accepts WEP use without WPA/WPA2 */
+	wep_ok = !wpa_key_mgmt_wpa(ssid->key_mgmt) &&
+		(((ssid->key_mgmt & WPA_KEY_MGMT_NONE) &&
+		  ssid->wep_key_len[ssid->wep_tx_keyidx] > 0) ||
+		 (ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA));
+
+	rsn_ie = wpa_bss_get_ie(bss, WLAN_EID_RSN);
+	if (!rsn_ie)
+		wpa_dbg(wpa_s, MSG_DEBUG, "No RSN_IE");
+
+	while ((ssid->proto & WPA_PROTO_RSN) && rsn_ie) {
+		proto_match++;
+
+		if (wpa_parse_wpa_ie(rsn_ie, 2 + rsn_ie[1], &ie)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip RSN IE - parse "
+				"failed");
+			break;
+		}
+
+		if (wep_ok &&
+		    (ie.group_cipher & (WPA_CIPHER_WEP40 | WPA_CIPHER_WEP104)))
+		{
+			wpa_dbg(wpa_s, MSG_DEBUG, "   selected based on TSN "
+				"in RSN IE");
+			return 1;
+		}
+
+		if (!(ie.proto & ssid->proto)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip RSN IE - proto "
+				"mismatch");
+			break;
+		}
+
+		if (!(ie.pairwise_cipher & ssid->pairwise_cipher)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip RSN IE - PTK "
+				"cipher mismatch");
+			break;
+		}
+
+		if (!(ie.group_cipher & ssid->group_cipher)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip RSN IE - GTK "
+				"cipher mismatch");
+			break;
+		}
+
+		if (!(ie.key_mgmt & ssid->key_mgmt)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip RSN IE - key mgmt "
+				"mismatch");
+			break;
+		}
+
+#ifdef CONFIG_IEEE80211W
+		if (!(ie.capabilities & WPA_CAPABILITY_MFPC) &&
+		    ssid->ieee80211w == MGMT_FRAME_PROTECTION_REQUIRED) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip RSN IE - no mgmt "
+				"frame protection");
+			break;
+		}
+#endif /* CONFIG_IEEE80211W */
+
+		wpa_dbg(wpa_s, MSG_DEBUG, "   selected based on RSN IE");
+		return 1;
+	}
+
+	wpa_ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
+	while ((ssid->proto & WPA_PROTO_WPA) && wpa_ie) {
+		proto_match++;
+
+		if (wpa_parse_wpa_ie(wpa_ie, 2 + wpa_ie[1], &ie)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip WPA IE - parse "
+				"failed");
+			break;
+		}
+
+		if (wep_ok &&
+		    (ie.group_cipher & (WPA_CIPHER_WEP40 | WPA_CIPHER_WEP104)))
+		{
+			wpa_dbg(wpa_s, MSG_DEBUG, "   selected based on TSN "
+				"in WPA IE");
+			return 1;
+		}
+
+		if (!(ie.proto & ssid->proto)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip WPA IE - proto "
+				"mismatch");
+			break;
+		}
+
+		if (!(ie.pairwise_cipher & ssid->pairwise_cipher)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip WPA IE - PTK "
+				"cipher mismatch");
+			break;
+		}
+
+		if (!(ie.group_cipher & ssid->group_cipher)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip WPA IE - GTK "
+				"cipher mismatch");
+			break;
+		}
+
+		if (!(ie.key_mgmt & ssid->key_mgmt)) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "   skip WPA IE - key mgmt "
+				"mismatch");
+			break;
+		}
+
+		wpa_dbg(wpa_s, MSG_DEBUG, "   selected based on WPA IE");
+		return 1;
+	}
+
+	if ((ssid->proto & (WPA_PROTO_WPA | WPA_PROTO_RSN)) &&
+	    wpa_key_mgmt_wpa(ssid->key_mgmt) && proto_match == 0) {
+		wpa_dbg(wpa_s, MSG_DEBUG, "   skip - no WPA/RSN proto match");
+		return 0;
+	}
+
+	if (!wpa_key_mgmt_wpa(ssid->key_mgmt)) {
+		wpa_dbg(wpa_s, MSG_DEBUG, "   allow in non-WPA/WPA2");
+		return 1;
+	}
+
+	wpa_dbg(wpa_s, MSG_DEBUG, "   reject due to mismatch with "
+		"WPA/WPA2");
+
+	return 0;
+}
 
 static void notify_bss_changes(struct wpa_supplicant *wpa_s, u32 changes,
 			       const struct wpa_bss *bss)
diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h
index 992b9c0..54d8a99 100644
--- a/wpa_supplicant/bss.h
+++ b/wpa_supplicant/bss.h
@@ -71,6 +71,9 @@ struct wpa_bss {
 	/* followed by beacon_ie_len octets of IEs */
 };
 
+int wpa_bss_ssid_match_security(struct wpa_supplicant *wpa_s,
+				struct wpa_ssid *ssid,
+				struct wpa_bss *bss);
 void wpa_bss_update_start(struct wpa_supplicant *wpa_s);
 void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s,
 			     struct wpa_scan_res *res);
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 730e607..44e1d9a 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2103,6 +2103,39 @@ static int wpa_supplicant_ctrl_iface_roam(struct wpa_supplicant *wpa_s,
 	return 0;
 }
 
+static int wpa_supplicant_ctrl_iface_list_candidates(
+	struct wpa_supplicant *wpa_s, char *buf, size_t buflen)
+{
+	struct wpa_bss *bss;
+	char *pos, *end;
+	int ret;
+
+	pos = buf;
+	end = buf + buflen;
+
+	/*
+	 * Find roaming candidates from bss list. Select BSSes with the same
+	 * ssid and the same security type, except BSS connected to
+	 */
+	dl_list_for_each(bss, &wpa_s->bss_id, struct wpa_bss, list_id) {
+		if (os_memcmp(wpa_s->bssid, bss->bssid, ETH_ALEN) == 0 ||
+		    bss->ssid_len != wpa_s->current_ssid->ssid_len ||
+		    os_memcmp(bss->ssid, wpa_s->current_ssid->ssid,
+			      bss->ssid_len) != 0 ||
+		    wpa_bss_ssid_match_security(wpa_s,
+						wpa_s->current_ssid, bss))
+			continue;
+
+		ret = os_snprintf(pos, end - pos,
+			"BSS " MACSTR "  freq %d  level %d\n",
+			MAC2STR(bss->bssid), bss->freq, bss->level);
+		if (ret < 0 || ret >= end - pos)
+			return pos - buf;
+		pos += ret;
+	}
+
+	return pos - buf;
+}
 
 #ifdef CONFIG_P2P
 static int p2p_ctrl_find(struct wpa_supplicant *wpa_s, char *cmd)
@@ -3270,6 +3303,10 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
 	} else if (os_strncmp(buf, "ROAM ", 5) == 0) {
 		if (wpa_supplicant_ctrl_iface_roam(wpa_s, buf + 5))
 			reply_len = -1;
+	} else if (os_strcmp(buf, "LIST_CANDIDATES") == 0) {
+		if (wpa_s->wpa_state == WPA_COMPLETED)
+			reply_len = wpa_supplicant_ctrl_iface_list_candidates(
+					wpa_s, reply, reply_size);
 	} else if (os_strncmp(buf, "STA_AUTOCONNECT ", 16) == 0) {
 		if (wpa_supplicant_ctrl_iface_sta_autoconnect(wpa_s, buf + 16))
 			reply_len = -1;
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index a307eda..2a11770 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -460,7 +460,6 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
 	return 0;
 }
 
-
 static int freq_allowed(int *freqs, int freq)
 {
 	int i;
diff --git a/wpa_supplicant/ssid.c b/wpa_supplicant/ssid.c
new file mode 100644
index 0000000..0655852
--- /dev/null
+++ b/wpa_supplicant/ssid.c
@@ -0,0 +1,84 @@
+/*
+ * SSID table
+ * Copyright (c) 2011, Texas Instruments
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#include "utils/includes.h"
+
+#include "utils/common.h"
+#include "utils/eloop.h"
+#include "common/ieee802_11_defs.h"
+#include "eap_peer/eap.h"
+#include "drivers/driver.h"
+#include "wpa_supplicant_i.h"
+#include "config.h"
+#include "notify.h"
+#include "bss.h"
+#include "wps_supplicant.h"
+
+
+int wpa_ssid_match_wps(struct wpa_supplicant *wpa_s,
+			    struct wpa_ssid *ssid, struct wpabuf *wps_ie)
+{
+	if (eap_is_wps_pbc_enrollee(&ssid->eap)) {
+		if (!wps_ie) {
+			wpa_printf(MSG_DEBUG, "   skip - non-WPS AP");
+			return 0;
+		}
+
+		if (!wps_is_selected_pbc_registrar(wps_ie)) {
+			wpa_printf(MSG_DEBUG, "   skip - WPS AP "
+				   "without active PBC Registrar");
+			return 0;
+		}
+
+		/* TODO: overlap detection */
+		wpa_printf(MSG_DEBUG, "   selected based on WPS IE "
+			   "(Active PBC)");
+		return 1;
+	}
+
+	if (eap_is_wps_pin_enrollee(&ssid->eap)) {
+		if (!wps_ie) {
+			wpa_printf(MSG_DEBUG, "   skip - non-WPS AP");
+			return 0;
+		}
+
+		/*
+		 * Start with WPS APs that advertise our address as an
+		 * authorized MAC (v2.0) or active PIN Registrar (v1.0) and
+		 * allow any WPS AP after couple of scans since some APs do not
+		 * set Selected Registrar attribute properly when using
+		 * external Registrar.
+		 */
+		if (!wps_is_addr_authorized(wps_ie, wpa_s->own_addr, 1)) {
+			if (wpa_s->scan_runs < WPS_PIN_SCAN_IGNORE_SEL_REG) {
+				wpa_printf(MSG_DEBUG, "   skip - WPS AP "
+					   "without active PIN Registrar");
+				return 0;
+			}
+			wpa_printf(MSG_DEBUG, "   selected based on WPS IE");
+		} else {
+			wpa_printf(MSG_DEBUG, "   selected based on WPS IE "
+				   "(Authorized MAC or Active PIN)");
+		}
+		return 1;
+	}
+
+	if (wps_ie) {
+		wpa_printf(MSG_DEBUG, "   selected based on WPS IE");
+		return 1;
+	}
+
+	return -1;
+}
+
diff --git a/wpa_supplicant/ssid.h b/wpa_supplicant/ssid.h
new file mode 100644
index 0000000..8ddebae
--- /dev/null
+++ b/wpa_supplicant/ssid.h
@@ -0,0 +1,21 @@
+/*
+ * WPA Supplicant / Network configuration operations
+ * Copyright (c) 2011, Texas Instruments
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#ifndef SSID_H
+#define SSID_H
+
+int wpa_ssid_match_wps(struct wpa_supplicant *wpa_s,
+			    struct wpa_ssid *ssid, struct wpabuf *wps_ie);
+
+#endif /* CONFIG_SSID_H */
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 9439856..7b84b7d 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1678,6 +1678,13 @@ static int wpa_cli_cmd_roam(struct wpa_ctrl *ctrl, int argc, char *argv[])
 }
 
 
+static int wpa_cli_cmd_list_candidates(struct wpa_ctrl *ctrl,
+				       int argc, char *argv[])
+{
+	return wpa_ctrl_command(ctrl, "LIST_CANDIDATES");
+}
+
+
 #ifdef CONFIG_P2P
 
 static int wpa_cli_cmd_p2p_find(struct wpa_ctrl *ctrl, int argc, char *argv[])
@@ -2540,6 +2547,9 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
 	{ "roam", wpa_cli_cmd_roam,
 	  cli_cmd_flag_none,
 	  "<addr> = roam to the specified BSS" },
+	{ "list_candidates", wpa_cli_cmd_list_candidates,
+	  cli_cmd_flag_none,
+	  "= list candidates for roaming" },
 #ifdef CONFIG_P2P
 	{ "p2p_find", wpa_cli_cmd_p2p_find, cli_cmd_flag_none,
 	  "[timeout] [type=*] = find P2P Devices for up-to timeout seconds" },
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 6f70cad..b750ef1 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -33,16 +33,13 @@
 #include "blacklist.h"
 #include "bss.h"
 #include "scan.h"
+#include "ssid.h"
 #include "ap.h"
 #include "p2p/p2p.h"
 #include "p2p_supplicant.h"
 #include "wps_supplicant.h"
 
 
-#ifndef WPS_PIN_SCAN_IGNORE_SEL_REG
-#define WPS_PIN_SCAN_IGNORE_SEL_REG 3
-#endif /* WPS_PIN_SCAN_IGNORE_SEL_REG */
-
 static void wpas_wps_timeout(void *eloop_ctx, void *timeout_ctx);
 static void wpas_clear_wps(struct wpa_supplicant *wpa_s);
 
@@ -1201,67 +1198,19 @@ int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
 			    struct wpa_ssid *ssid, struct wpa_scan_res *bss)
 {
 	struct wpabuf *wps_ie;
+	int ret;
 
 	if (!(ssid->key_mgmt & WPA_KEY_MGMT_WPS))
 		return -1;
 
 	wps_ie = wpa_scan_get_vendor_ie_multi(bss, WPS_IE_VENDOR_TYPE);
-	if (eap_is_wps_pbc_enrollee(&ssid->eap)) {
-		if (!wps_ie) {
-			wpa_printf(MSG_DEBUG, "   skip - non-WPS AP");
-			return 0;
-		}
-
-		if (!wps_is_selected_pbc_registrar(wps_ie)) {
-			wpa_printf(MSG_DEBUG, "   skip - WPS AP "
-				   "without active PBC Registrar");
-			wpabuf_free(wps_ie);
-			return 0;
-		}
-
-		/* TODO: overlap detection */
-		wpa_printf(MSG_DEBUG, "   selected based on WPS IE "
-			   "(Active PBC)");
-		wpabuf_free(wps_ie);
-		return 1;
-	}
-
-	if (eap_is_wps_pin_enrollee(&ssid->eap)) {
-		if (!wps_ie) {
-			wpa_printf(MSG_DEBUG, "   skip - non-WPS AP");
-			return 0;
-		}
 
-		/*
-		 * Start with WPS APs that advertise our address as an
-		 * authorized MAC (v2.0) or active PIN Registrar (v1.0) and
-		 * allow any WPS AP after couple of scans since some APs do not
-		 * set Selected Registrar attribute properly when using
-		 * external Registrar.
-		 */
-		if (!wps_is_addr_authorized(wps_ie, wpa_s->own_addr, 1)) {
-			if (wpa_s->scan_runs < WPS_PIN_SCAN_IGNORE_SEL_REG) {
-				wpa_printf(MSG_DEBUG, "   skip - WPS AP "
-					   "without active PIN Registrar");
-				wpabuf_free(wps_ie);
-				return 0;
-			}
-			wpa_printf(MSG_DEBUG, "   selected based on WPS IE");
-		} else {
-			wpa_printf(MSG_DEBUG, "   selected based on WPS IE "
-				   "(Authorized MAC or Active PIN)");
-		}
-		wpabuf_free(wps_ie);
-		return 1;
-	}
+	ret = wpa_ssid_match_wps(wpa_s, ssid, wps_ie);
 
-	if (wps_ie) {
-		wpa_printf(MSG_DEBUG, "   selected based on WPS IE");
+	if (wps_ie)
 		wpabuf_free(wps_ie);
-		return 1;
-	}
 
-	return -1;
+	return ret;
 }
 
 
diff --git a/wpa_supplicant/wps_supplicant.h b/wpa_supplicant/wps_supplicant.h
index b38c091..c42b2b2 100644
--- a/wpa_supplicant/wps_supplicant.h
+++ b/wpa_supplicant/wps_supplicant.h
@@ -22,6 +22,10 @@ struct wpa_scan_res;
 #include "wps/wps.h"
 #include "wps/wps_defs.h"
 
+#ifndef WPS_PIN_SCAN_IGNORE_SEL_REG
+#define WPS_PIN_SCAN_IGNORE_SEL_REG 3
+#endif /* WPS_PIN_SCAN_IGNORE_SEL_REG */
+
 struct wpa_bss;
 
 struct wps_new_ap_settings {
-- 
1.7.0.4



From arik  Sun Aug  7 12:09:05 2011
From: arik (Arik Nemtsov)
Date: Sun, 7 Aug 2011 22:09:05 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <20110807072621.GA1890@jm.kir.nu>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
	<20110807072621.GA1890@jm.kir.nu>
Message-ID: <CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>

On Sun, Aug 7, 2011 at 10:26, Jouni Malinen <j at w1.fi> wrote:
> On Sun, Aug 07, 2011 at 09:00:00AM +0300, Arik Nemtsov wrote:
>> On Sat, Aug 6, 2011 at 22:15, Jouni Malinen <j at w1.fi> wrote:
>> > I'm not completely sure I would like to get all HT capabilities enabled
>> > in this way by default based on driver capabilities. Doesn't this leave
>> > things in inconsistent state (e.g., HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET
>> > set, but secondary_channel not)?
>>
>> Yes this specific setting seems problematic. I guess for now we can
>> just mask out this bit in the received ht_capab?
>
> I'm not sure that is the only problematic one and as such, I would much
> rather see an explicit set of features that get enabled by default if
> there is good justification for doing so rather than just enabling
> everything.

The features enabled are of course card/driver specific. I'm afraid
there's no "catch-all" set I can think of.

For instance, the features required for wl12xx cards are:
HT_CAP_INFO_GREEN_FIELD, HT_CAP_INFO_SHORT_GI20MHZ, HT_CAP_INFO_RX_STBC_1

Should I initially mask only those in, and others can gradually add to the mask?

Arik


From stonezju  Sun Aug  7 19:25:41 2011
From: stonezju (Stone)
Date: Mon, 8 Aug 2011 10:25:41 +0800
Subject: How to set probe resp WPS IE through nl80211 interface
In-Reply-To: <20110806185854.GD26681@jm.kir.nu>
References: <CAKH3Sjsuixw41qz9zguhZJnhHcEiepS4XAEuSJU_3xtmFxSH7g@mail.gmail.com>
	<20110806185854.GD26681@jm.kir.nu>
Message-ID: <CAKH3SjurVnvgeTpfdSWUc=pWSQiGp9JdF09vUR-bWXJjpMyd0Q@mail.gmail.com>

Hi Jouni Malinen,
   Thanks to your reply which is very helpful for me.


2011/8/7 Jouni Malinen <j at w1.fi>

>  On Tue, Aug 02, 2011 at 01:58:31PM +0800, Stone wrote:
> >     Could someone tell me that, when wpa_supplicant works as AP, how does
> > wpa_supplicant set probe resp WPS IE through nl80211 interface? The
> beacon
> > IE is able to be configured through set_beacon in driver_nl80211.c, while
> > there is no accomplishment for set_ap_wps_ie.
>
> The nl80211 interface does not currently support drivers that handle
> Probe Request processing internally (or well, likely in the firmware).
> There are number of drivers that would require this type of mechanism,
> but no one has submitted a suitable patch to do that in
> cfg80211/nl80211 yet, so wpa_supplicant cannot support it either. If no
> one else gets to this soon, I'll come up with proposed changes to
> cfg80211 in the not too distant future.
>
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110808/5bee3b87/attachment.htm 


From johannes  Mon Aug  8 00:15:39 2011
From: johannes (Johannes Berg)
Date: Mon, 08 Aug 2011 09:15:39 +0200
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
	<20110807072621.GA1890@jm.kir.nu>
	<CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
Message-ID: <1312787739.4372.1.camel@jlt3.sipsolutions.net>

On Sun, 2011-08-07 at 22:09 +0300, Arik Nemtsov wrote:

> The features enabled are of course card/driver specific. I'm afraid
> there's no "catch-all" set I can think of.
> 
> For instance, the features required for wl12xx cards are:
> HT_CAP_INFO_GREEN_FIELD, HT_CAP_INFO_SHORT_GI20MHZ, HT_CAP_INFO_RX_STBC_1

Why no catch-all? I mean, it's pretty obvious which ones are symmetric
in this sense. We also have similar code in mac80211 when masking the
capabilities of the peer.

johannes



From j  Mon Aug  8 01:07:59 2011
From: j (Jouni Malinen)
Date: Mon, 8 Aug 2011 11:07:59 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
	<20110807072621.GA1890@jm.kir.nu>
	<CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
Message-ID: <20110808080759.GA2233@jm.kir.nu>

On Sun, Aug 07, 2011 at 10:09:05PM +0300, Arik Nemtsov wrote:
> The features enabled are of course card/driver specific. I'm afraid
> there's no "catch-all" set I can think of.

Not only card/driver specific, but also specific to environment or use
of the network..

> For instance, the features required for wl12xx cards are:
> HT_CAP_INFO_GREEN_FIELD, HT_CAP_INFO_SHORT_GI20MHZ, HT_CAP_INFO_RX_STBC_1

Do you really want to enable greenfield by default (user would not have
an option to disable it)?

-- 
Jouni Malinen                                            PGP id EFC895FA


From hari.c36  Mon Aug  8 01:18:05 2011
From: hari.c36 (hari.c36 at wipro.com)
Date: Mon, 8 Aug 2011 08:18:05 +0000
Subject: Regt to realtek support for hostapd
Message-ID: <2BE95BFE575B924DB9631C4B399697F44F5F87BA@CHN-SNR-MBX3.wipro.com>


>I have Reltek dongle[RTL8192CU] built with Reltek 8192CU Driver

 --How can i use hostapd with reltek driver to support AP mode?


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110808/545b8148/attachment.htm 


From dimitrysh  Mon Aug  8 09:28:03 2011
From: dimitrysh (Dmitry Shmidt)
Date: Mon, 8 Aug 2011 09:28:03 -0700
Subject: [PATCH] Move control interface cleanup after
	wpa_supplicant_cleanup()
In-Reply-To: <20110806184929.GC26681@jm.kir.nu>
References: <20110803181127.3019A3884E@ushik.mtv.corp.google.com>
	<20110806184929.GC26681@jm.kir.nu>
Message-ID: <CAH7ZN-z8TkpFwar4mZDrPZwtRCyfca41-4xrXqBz91cRcuiWEA@mail.gmail.com>

Hi,

On Sat, Aug 6, 2011 at 11:49 AM, Jouni Malinen <j at w1.fi> wrote:
> On Wed, Aug 03, 2011 at 11:03:49AM -0700, Dmitry Shmidt wrote:
>> This is needed to be able to communicate through control interface
>> after wpa_supplicant_cleanup()
>
> What communication is there after that? You mentioned
> wpas_notify_iface_removed(), but there does not seem to be any
> wpa_msg*() calls there..

It will be different patch - we want to add wpa_msg() - we just didn't
agree yet about
what will be the commonly accepted message. And it can be done in
different patch.

>
>> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
>> index 3f3e435..c93c4d2 100644
>> @@ -382,16 +382,10 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
>> ? ? ? if (wpa_s->conf != NULL) {
>> ? ? ? ? ? ? ? struct wpa_ssid *ssid;
>> ? ? ? ? ? ? ? for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
>> ? ? ? ? ? ? ? ? ? ? ? wpas_notify_network_removed(wpa_s, ssid);
>> - ? ? ? ? ? ? wpa_config_free(wpa_s->conf);
>> - ? ? ? ? ? ? wpa_s->conf = NULL;
>> ? ? ? }
>
> This is a bit ugly leaving partially cleared configuration behind..

Agree 100%, just wanted to minimize the changes. Let me know if this
is the only concern, I'll move
it.

>
>> @@ -2303,11 +2297,21 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
>>
>> ? ? ? wpa_supplicant_cleanup(wpa_s);
>>
>> + ? ? if (wpa_s->drv_priv)
>> + ? ? ? ? ? ? wpa_drv_deinit(wpa_s);
>> +
>> ? ? ? if (notify)
>> ? ? ? ? ? ? ? wpas_notify_iface_removed(wpa_s);
>
> Why not just move wpa_supplicant_cleanup() call to be after the
> wpas_notify_iface_removed()? Why was wpa_drv_deinit() moved to be before
> wpas_notify_iface_removed()?

Notification is sent to Wifi manager. If it is done before real
deinit() Wifi manager may start to do
things "in parallel" with wpa_supplicant to the interface. (In our
case it started hostapd() that sometimes got
unexpected interface down).

>
> --
> Jouni Malinen ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>


From felix.sargent  Mon Aug  8 11:34:04 2011
From: felix.sargent (Felix Sargent)
Date: Mon, 8 Aug 2011 11:34:04 -0700
Subject: Compiling wpa_supplicant for OS X (10.6, 10.7)
In-Reply-To: <20110806181127.GA25795@jm.kir.nu>
References: <CAEnJkF6t-cayMVyb9=QZpMhQQDM-L1v8K7j+WUCDzyr_1yjSWw@mail.gmail.com>
	<20110806181127.GA25795@jm.kir.nu>
Message-ID: <CAEnJkF56bdU5pFJgiacSaH7uTNxGx8m8prPgnUdeK1fquDx3YA@mail.gmail.com>

Thank you Jouni! That explains a lot. I knew I must have been choosing the
wrong driver/library.

I'm getting this error now, which seems a lot more troubling:

Undefined symbols for architecture x86_64:
  "_sme_state_changed", referenced from:
      _wpas_notify_state_changed in notify.o
  "_sme_deinit", referenced from:
      _wpa_supplicant_deinit_iface in wpa_supplicant.o
  "_sme_authenticate", referenced from:
      _wpa_supplicant_associate in wpa_supplicant.o
  "_sme_event_auth", referenced from:
      _wpa_supplicant_event in events.o
  "_sme_event_disassoc", referenced from:
      _wpa_supplicant_event in events.o
  "_sme_disassoc_while_authenticating", referenced from:
      _wpa_supplicant_event in events.o
  "_sme_event_assoc_reject", referenced from:
      _wpa_supplicant_event in events.o
  "_sme_event_auth_timed_out", referenced from:
      _wpa_supplicant_event in events.o
  "_sme_event_assoc_timed_out", referenced from:
      _wpa_supplicant_event in events.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [wpa_supplicant] Error 1

Anything I can do?

Felix Sargent
(415) 935-3354
felix.sargent at gmail.com


On Sat, Aug 6, 2011 at 11:11 AM, Jouni Malinen <j at w1.fi> wrote:

> On Fri, Aug 05, 2011 at 02:13:44PM -0700, Felix Sargent wrote:
> > I'm trying to compile for OS X as we're getting consistently frustrated
> with
> > Ethernet 802.1x authentication certificates stored in the OSX keychain,
> and
> > want more access and control over the auth process.
>
> I haven't tested this with OS X, but you can compile wpa_supplicant by
> adding following lines into wpa_supplicant/.config:
>
> CONFIG_DRIVER_WIRED=y
> CONFIG_L2_PACKET=freebsd
>
> > Unfortunately, I'm having  hard time building the driver components.
> > I'm getting a lot of error messages along the lines of:
> >
> > ../src/drivers/driver_wext.c: In function ?wpa_driver_wext_set_mode?:
> > ../src/drivers/driver_wext.c:2152: error: ?struct iwreq? has no member
> named
>
> driver_wext.c is a Linux driver wrapper and there is no point in trying
> to build that for OS X. You will need to remove CONFIG_DRIVER_* lines
> that do not match the target you are build for.
>
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110808/a51221b0/attachment.htm 


From arik  Mon Aug  8 12:11:48 2011
From: arik (Arik Nemtsov)
Date: Mon, 8 Aug 2011 22:11:48 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <20110808080759.GA2233@jm.kir.nu>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
	<20110807072621.GA1890@jm.kir.nu>
	<CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
	<20110808080759.GA2233@jm.kir.nu>
Message-ID: <CA+XVXfduLT3KBNkGOe9YGN_UCwESZ2s4AiGaLLAo+h0YWT-igg@mail.gmail.com>

On Mon, Aug 8, 2011 at 11:07, Jouni Malinen <j at w1.fi> wrote:
> On Sun, Aug 07, 2011 at 10:09:05PM +0300, Arik Nemtsov wrote:
>> The features enabled are of course card/driver specific. I'm afraid
>> there's no "catch-all" set I can think of.
>
> Not only card/driver specific, but also specific to environment or use
> of the network..
>
>> For instance, the features required for wl12xx cards are:
>> HT_CAP_INFO_GREEN_FIELD, HT_CAP_INFO_SHORT_GI20MHZ, HT_CAP_INFO_RX_STBC_1
>
> Do you really want to enable greenfield by default (user would not have
> an option to disable it)?

I didn't mean to hard-code it. I meant these should be part of the
mask of allowed bits.

Greenfield should be enabled for cards supported by the
mac80211+wl12xx driver. These always support receiving PPDUs in
Greenfield format. IIUC, this bit shouldn't change according to
network operating conditions.

Arik


From arik  Mon Aug  8 12:20:49 2011
From: arik (Arik Nemtsov)
Date: Mon, 8 Aug 2011 22:20:49 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <1312787739.4372.1.camel@jlt3.sipsolutions.net>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
	<20110807072621.GA1890@jm.kir.nu>
	<CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
	<1312787739.4372.1.camel@jlt3.sipsolutions.net>
Message-ID: <CA+XVXfd8=tz8o8o1fd9o_FzmZs3wEDrXCpWKQZeUVdjxN=r0KA@mail.gmail.com>

On Mon, Aug 8, 2011 at 10:15, Johannes Berg <johannes at sipsolutions.net> wrote:
> On Sun, 2011-08-07 at 22:09 +0300, Arik Nemtsov wrote:
>
>> The features enabled are of course card/driver specific. I'm afraid
>> there's no "catch-all" set I can think of.
>>
>> For instance, the features required for wl12xx cards are:
>> HT_CAP_INFO_GREEN_FIELD, HT_CAP_INFO_SHORT_GI20MHZ, HT_CAP_INFO_RX_STBC_1
>
> Why no catch-all? I mean, it's pretty obvious which ones are symmetric
> in this sense. We also have similar code in mac80211 when masking the
> capabilities of the peer.
>

I'm not sure I'm following. This patch is about the HT capabilities of
the GO, not the ones of its peers.
I assume you're referring to ieee80211_ht_cap_ie_to_sta_ht_cap(), but
do we really want to do the same thing as GO? support only the subset
of HT-capabilities supported by all connected peers?

Arik


From johannes  Mon Aug  8 13:14:34 2011
From: johannes (Johannes Berg)
Date: Mon, 08 Aug 2011 22:14:34 +0200
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <CA+XVXfd8=tz8o8o1fd9o_FzmZs3wEDrXCpWKQZeUVdjxN=r0KA@mail.gmail.com>
	(sfid-20110808_212135_986357_225FBB49)
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
	<20110807072621.GA1890@jm.kir.nu>
	<CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
	<1312787739.4372.1.camel@jlt3.sipsolutions.net>
	<CA+XVXfd8=tz8o8o1fd9o_FzmZs3wEDrXCpWKQZeUVdjxN=r0KA@mail.gmail.com>
	(sfid-20110808_212135_986357_225FBB49)
Message-ID: <1312834474.4372.41.camel@jlt3.sipsolutions.net>

On Mon, 2011-08-08 at 22:20 +0300, Arik Nemtsov wrote:
> On Mon, Aug 8, 2011 at 10:15, Johannes Berg <johannes at sipsolutions.net> wrote:
> > On Sun, 2011-08-07 at 22:09 +0300, Arik Nemtsov wrote:
> >
> >> The features enabled are of course card/driver specific. I'm afraid
> >> there's no "catch-all" set I can think of.
> >>
> >> For instance, the features required for wl12xx cards are:
> >> HT_CAP_INFO_GREEN_FIELD, HT_CAP_INFO_SHORT_GI20MHZ, HT_CAP_INFO_RX_STBC_1
> >
> > Why no catch-all? I mean, it's pretty obvious which ones are symmetric
> > in this sense. We also have similar code in mac80211 when masking the
> > capabilities of the peer.
> >
> 
> I'm not sure I'm following. This patch is about the HT capabilities of
> the GO, not the ones of its peers.
> I assume you're referring to ieee80211_ht_cap_ie_to_sta_ht_cap(), but
> do we really want to do the same thing as GO? support only the subset
> of HT-capabilities supported by all connected peers?

Of course not, but it's similar in spirit, no?

johannes



From j  Mon Aug  8 16:15:17 2011
From: j (Jouni Malinen)
Date: Tue, 9 Aug 2011 02:15:17 +0300
Subject: [PATCH 1/2] hostap: set ht_capab from wiphy when in P2P GO mode
In-Reply-To: <CA+XVXfduLT3KBNkGOe9YGN_UCwESZ2s4AiGaLLAo+h0YWT-igg@mail.gmail.com>
References: <1312137905-16621-1-git-send-email-arik@wizery.com>
	<20110806191529.GF26681@jm.kir.nu>
	<CA+XVXffmXhsuo6Uyo=Wh9FWnk6BDe9QXxHvNeCW3YD+khCX56w@mail.gmail.com>
	<20110807072621.GA1890@jm.kir.nu>
	<CA+XVXfc5+sdmre6X5L=qdRRs3-PWChrswDaCBKM4HZEh3Gpa_w@mail.gmail.com>
	<20110808080759.GA2233@jm.kir.nu>
	<CA+XVXfduLT3KBNkGOe9YGN_UCwESZ2s4AiGaLLAo+h0YWT-igg@mail.gmail.com>
Message-ID: <20110808231517.GA20900@jm.kir.nu>

On Mon, Aug 08, 2011 at 10:11:48PM +0300, Arik Nemtsov wrote:
> Greenfield should be enabled for cards supported by the
> mac80211+wl12xx driver. These always support receiving PPDUs in
> Greenfield format. IIUC, this bit shouldn't change according to
> network operating conditions.

Ah, it is only for indicating support to receive greenfield format. Ok,
in that case, it sounds fine to include that in the mask (and same for
Short GI for 20/40 MHz and I guess, Rx STBC for that matter; I guess max
A-MSDU length could be included, too, should someone care about it). In
other words, yes, I'm fine with including RX only features in this way
when they do not cause issues for STAs that do not support matching
functionality.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Mon Aug  8 16:17:46 2011
From: j (Jouni Malinen)
Date: Tue, 9 Aug 2011 02:17:46 +0300
Subject: Compiling wpa_supplicant for OS X (10.6, 10.7)
In-Reply-To: <CAEnJkF56bdU5pFJgiacSaH7uTNxGx8m8prPgnUdeK1fquDx3YA@mail.gmail.com>
References: <CAEnJkF6t-cayMVyb9=QZpMhQQDM-L1v8K7j+WUCDzyr_1yjSWw@mail.gmail.com>
	<20110806181127.GA25795@jm.kir.nu>
	<CAEnJkF56bdU5pFJgiacSaH7uTNxGx8m8prPgnUdeK1fquDx3YA@mail.gmail.com>
Message-ID: <20110808231746.GB20900@jm.kir.nu>

On Mon, Aug 08, 2011 at 11:34:04AM -0700, Felix Sargent wrote:
> I'm getting this error now, which seems a lot more troubling:
> 
> Undefined symbols for architecture x86_64:
>   "_sme_state_changed", referenced from:
>       _wpas_notify_state_changed in notify.o
...

> Anything I can do?

make clean; make
(the build dependencies do not force a full build after .config changes)

-- 
Jouni Malinen                                            PGP id EFC895FA


From felix.sargent  Mon Aug  8 16:39:27 2011
From: felix.sargent (Felix Sargent)
Date: Mon, 8 Aug 2011 16:39:27 -0700
Subject: Compiling wpa_supplicant for OS X (10.6, 10.7)
In-Reply-To: <20110808231746.GB20900@jm.kir.nu>
References: <CAEnJkF6t-cayMVyb9=QZpMhQQDM-L1v8K7j+WUCDzyr_1yjSWw@mail.gmail.com>
	<20110806181127.GA25795@jm.kir.nu>
	<CAEnJkF56bdU5pFJgiacSaH7uTNxGx8m8prPgnUdeK1fquDx3YA@mail.gmail.com>
	<20110808231746.GB20900@jm.kir.nu>
Message-ID: <CAEnJkF6BeQ-K8=u+ri8s=PYARcrYpSvYoANPOT31S8hYBbCYwg@mail.gmail.com>

Thanks -- that worked well. The more you know (about make).

Felix Sargent

On Mon, Aug 8, 2011 at 4:17 PM, Jouni Malinen <j at w1.fi> wrote:

> On Mon, Aug 08, 2011 at 11:34:04AM -0700, Felix Sargent wrote:
> > I'm getting this error now, which seems a lot more troubling:
> >
> > Undefined symbols for architecture x86_64:
> >   "_sme_state_changed", referenced from:
> >       _wpas_notify_state_changed in notify.o
> ...
>
> > Anything I can do?
>
> make clean; make
> (the build dependencies do not force a full build after .config changes)
>
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110808/ea23dd37/attachment.htm 


From arik  Mon Aug  8 22:08:46 2011
From: arik (Arik Nemtsov)
Date: Tue,  9 Aug 2011 08:08:46 +0300
Subject: [PATCH v2] hostap: set ht_capab from wiphy when in P2P GO mode
Message-ID: <1312866526-10871-1-git-send-email-arik@wizery.com>

Set the HT capabilities of a P2P GO according to the wiphy supported
ones. Mask-in a white-list of HT capabilities that won't cause problems
for non-supporting stations.

Signed-off-by: Arik Nemtsov <arik at wizery.com>
---
 wpa_supplicant/ap.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 9eb2ba6..3a20640 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -87,9 +87,10 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
 
 #ifdef CONFIG_IEEE80211N
 	/*
-	 * Enable HT20 if the driver supports it, by setting conf->ieee80211n.
+	 * Enable HT20 if the driver supports it, by setting conf->ieee80211n
+	 * and a mask of allowed capabilities within conf->ht_capab.
 	 * Using default config settings for: conf->ht_op_mode_fixed,
-	 * conf->ht_capab, conf->secondary_channel, conf->require_ht
+	 * conf->secondary_channel, conf->require_ht
 	 */
 	modes = wpa_drv_get_hw_feature_data(wpa_s, &num_modes, &flags);
 	if (modes) {
@@ -101,8 +102,20 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
 				break;
 			}
 		}
-		if (mode && mode->ht_capab)
+		if (mode && mode->ht_capab) {
 			conf->ieee80211n = 1;
+
+			/*
+			 * white-list capabilities that won't cause issues
+			 * to connecting stations.
+			 */
+			conf->ht_capab = mode->ht_capab &
+					 (HT_CAP_INFO_GREEN_FIELD |
+					 HT_CAP_INFO_SHORT_GI20MHZ |
+					 HT_CAP_INFO_SHORT_GI40MHZ |
+					 HT_CAP_INFO_RX_STBC_MASK |
+					 HT_CAP_INFO_MAX_AMSDU_SIZE);
+		}
 		ieee80211_sta_free_hw_features(modes, num_modes);
 		modes = NULL;
 	}
-- 
1.7.4.1



From sami.m.ahokas  Mon Aug  8 22:45:04 2011
From: sami.m.ahokas (sami ahokas)
Date: Tue, 9 Aug 2011 08:45:04 +0300
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <20110805220157.613355a3@mj>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
	<20110805220157.613355a3@mj>
Message-ID: <CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>

2011/8/6 Pavel Roskin <proski at gnu.org>:
> On Fri, 5 Aug 2011 09:48:42 +0300
> sami ahokas <sami.m.ahokas at gmail.com> wrote:
>
>> I don't know if my issue is related to ath9k driver or hostapd so I'm
>> sending this to both lists.
> ...
>> If I reboot my board after this, AP role works right from the start.
>> But if I toggle the power of my board, AP mode gets broken again. What
>> could cause this kind of behavior? Is there something in AR5418
>> registers that is left uninitialized in AP mode in the driver or
>> hostapd?
>
> That's clearly something in the hardware, so hostapd is irrelevant here.
>
>> I'm using Linux kernel version 2.6.33 on powerpc platform. Hostapd
>> version is 0.7.3 and wpa_supplicant is 0.7.3 too.
>
> The first thing should be to test the card with the latest kernel or
> with compat-wireless. ?For Linux wireless drivers, 2.6.33 is stone
> age :)
>
> You can also check the card with MadWifi trunk snapshot. ?If that works
> fine, chances are that ath9k does something wrong, otherwise I would
> suspect the hardware.
>
> --
> Regards,
> Pavel Roskin
>

Hi,

Thanks for your reply. I chose to try the MadWifi driver, but now I'm
not able to set interface to master mode. Here is what hostapd gives
me when I try start it:

root at samia:~# hostapd -B -P /var/run/hostapd.pid /var/run/wlan_ap.conf
Configuration file: /var/run/wlan_ap.conf
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to master mode!
madwifi driver initialization failed.
rmdir[ctrl_interface]: No such file or directory
ELOOP: remaining socket: sock=6 eloop_data=0x106677a0 user_data=(nil)
handler=0x100338a4

Some ioctl command seems to be the problem. Could there be something
missing from my environment? I attach my hostapd config file here too:

cat /var/run/wlan_ap.conf
interface=ath0
bridge=br0
driver=madwifi
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
country_code=FI
beacon_int=100
dtim_period=2
max_num_sta=255
wmm_enabled=0
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
hw_mode=g
channel=4
eapol_version=2
ssid=test_wlan
ignore_broadcast_ssid=0
auth_algs=1
wpa=1
wpa_passphrase=xyxyxyxyxyxyxy
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP

I haven't been using MadWifi driver before so this might be some
stupid newbie configuration mistake. But if someone could steer me to
right direction I would appreciate that.

Sami


From yoni.divinsky  Tue Aug  9 00:42:04 2011
From: yoni.divinsky (Yoni Divinsky)
Date: Tue,  9 Aug 2011 10:42:04 +0300
Subject: [PATCH] hostap: send the driver the new gtk after mic failure
Message-ID: <1312875724-7188-1-git-send-email-yoni.divinsky@ti.com>

The GTK is renewed in the hostapd after a MIC attack 
dissassociation without informing the driver, 
causing decryption failures. 
This patch sends the new gtk to the driver after it
is updated by the hostapd.

Signed-off-by: Yoni Divinsky <yoni.divinsky at ti.com>
---
 src/ap/wpa_auth.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index 3fbb88b..fb9242f 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -2466,6 +2466,9 @@ void wpa_gtk_rekey(struct wpa_authenticator *wpa_auth)
 #endif /* CONFIG_IEEE80211W */
 		wpa_gtk_update(wpa_auth, group);
 	}
+	/* Send the Key to the device */
+	wpa_group_setkeysdone (wpa_auth,wpa_auth->group);
 }
 
 
-- 
1.7.0.4



From proski  Tue Aug  9 05:27:28 2011
From: proski (Pavel Roskin)
Date: Tue, 09 Aug 2011 08:27:28 -0400
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
	<20110805220157.613355a3@mj>
	<CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>
Message-ID: <20110809082728.o8imtnc68gc0cswc-cebfxv@webmail.spamcop.net>

Quoting sami ahokas <sami.m.ahokas at gmail.com>:

> Thanks for your reply. I chose to try the MadWifi driver, but now I'm
> not able to set interface to master mode.

When loading the module, use "modprobe ath_pci autocreate=ap"

That will create an interface in AP mode.  It's easy to get used to  
the niceties of the kernel drivers that can change the mode of an  
existing interface.

-- 
Regards,
Pavel Roskin


From olivier  Tue Aug  9 15:02:02 2011
From: olivier (Olivier Sobrie)
Date: Wed, 10 Aug 2011 00:02:02 +0200
Subject: [PATCH] WPS: Send the credential when learning AP params in registrar
	role
Message-ID: <1312927322-11576-1-git-send-email-olivier@sobrie.be>

When the supplicant acts as a registrar to learn the access point
parameters then send the credentials to the wpa_cli interface after
receiving the 7th message.
When setting the option 'wps_cred_processing' to 1 or 2 in the
wpa_supplicant.conf you should receive the credential through the
wpa control interface.

Without this patch, after the 7th message you got the WPS-CRED-RECEIVED
notification without the credentials. This was because the cred_attr and
cred_attr_len were not filled in in the wps structure.

Signed-off-by: Olivier Sobrie <olivier at sobrie.be>
---
 src/wps/wps_registrar.c |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index 2d7f632..1f964e7 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -1592,6 +1592,29 @@ static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *msg)
 	return 0;
 }
 
+static int wps_build_ap_cred(struct wps_data *wps, struct wpabuf *msg)
+{
+	struct wpabuf *plain;
+
+	plain = wpabuf_alloc(200);
+	if (plain == NULL)
+		return -1;
+
+	if (wps_build_ap_settings(wps, plain)) {
+		wpabuf_free(plain);
+		return -1;
+	}
+
+	wpabuf_put_be16(msg, ATTR_CRED);
+	wpabuf_put_be16(msg, wpabuf_len(plain));
+	wpabuf_put_buf(msg, plain);
+	wpabuf_free(plain);
+
+	wps->cred.cred_attr = wpabuf_head(msg);
+	wps->cred.cred_attr_len = wpabuf_len(msg);
+
+	return 0;
+}
 
 static struct wpabuf * wps_build_m2(struct wps_data *wps)
 {
@@ -2551,6 +2574,8 @@ static void wps_cred_update(struct wps_credential *dst,
 static int wps_process_ap_settings_r(struct wps_data *wps,
 				     struct wps_parse_attr *attr)
 {
+	struct wpabuf *msg;
+
 	if (wps->wps->ap || wps->er)
 		return 0;
 
@@ -2577,12 +2602,23 @@ static int wps_process_ap_settings_r(struct wps_data *wps,
 		 */
 		wps_registrar_pin_completed(wps->wps->registrar);
 
+		msg = wpabuf_alloc(1000);
+		if (msg == NULL)
+			return -1;
+
+		if (wps_build_ap_cred(wps, msg)) {
+			wpabuf_free(msg);
+			return -1;
+		}
+
 		if (wps->ap_settings_cb) {
 			wps->ap_settings_cb(wps->ap_settings_cb_ctx,
 					    &wps->cred);
+			wpabuf_free(msg);
 			return 1;
 		}
 		wps_sta_cred_cb(wps);
+		wpabuf_free(msg);
 		return 1;
 	}
 }
-- 
1.7.6



From sami.m.ahokas  Tue Aug  9 23:30:27 2011
From: sami.m.ahokas (sami ahokas)
Date: Wed, 10 Aug 2011 09:30:27 +0300
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <20110809082728.o8imtnc68gc0cswc-cebfxv@webmail.spamcop.net>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
	<20110805220157.613355a3@mj>
	<CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>
	<20110809082728.o8imtnc68gc0cswc-cebfxv@webmail.spamcop.net>
Message-ID: <CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ@mail.gmail.com>

2011/8/9 Pavel Roskin <proski at gnu.org>:
> Quoting sami ahokas <sami.m.ahokas at gmail.com>:
>
>> Thanks for your reply. I chose to try the MadWifi driver, but now I'm
>> not able to set interface to master mode.
>
> When loading the module, use "modprobe ath_pci autocreate=ap"
>
> That will create an interface in AP mode. ?It's easy to get used to the
> niceties of the kernel drivers that can change the mode of an existing
> interface.
>
> --
> Regards,
> Pavel Roskin
>

Thanks again for your help. But now I have next problem and quick
googling didn't give me any answers. Here is what I get from hostapd:

ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
ath0: DRIVER Error enabling WPA/802.1X!
IEEE 802.1X initialization failed.
ath0: Unable to setup interface.
rmdir[ctrl_interface]: No such file or directory

Why is it complaining about 802.1X? My setup is using WPA-PSK, not
802.1X. Do I miss some modules or have I compiled hostapd or madwifi
driver with wrong parameters?

Sami


From sami.m.ahokas  Wed Aug 10 04:41:53 2011
From: sami.m.ahokas (sami ahokas)
Date: Wed, 10 Aug 2011 14:41:53 +0300
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ@mail.gmail.com>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
	<20110805220157.613355a3@mj>
	<CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>
	<20110809082728.o8imtnc68gc0cswc-cebfxv@webmail.spamcop.net>
	<CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ@mail.gmail.com>
Message-ID: <CAL-=UpQFCKUS9X_qoB87U1ZokAkTFs829p3K2wBgJ7qe7F7PEA@mail.gmail.com>

2011/8/10 sami ahokas <sami.m.ahokas at gmail.com>:
> 2011/8/9 Pavel Roskin <proski at gnu.org>:
>> Quoting sami ahokas <sami.m.ahokas at gmail.com>:
>>
>>> Thanks for your reply. I chose to try the MadWifi driver, but now I'm
>>> not able to set interface to master mode.
>>
>> When loading the module, use "modprobe ath_pci autocreate=ap"
>>
>> That will create an interface in AP mode. ?It's easy to get used to the
>> niceties of the kernel drivers that can change the mode of an existing
>> interface.
>>
>> --
>> Regards,
>> Pavel Roskin
>>
>
> Thanks again for your help. But now I have next problem and quick
> googling didn't give me any answers. Here is what I get from hostapd:
>
> ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
> ath0: DRIVER Error enabling WPA/802.1X!
> IEEE 802.1X initialization failed.
> ath0: Unable to setup interface.
> rmdir[ctrl_interface]: No such file or directory
>
> Why is it complaining about 802.1X? My setup is using WPA-PSK, not
> 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
> driver with wrong parameters?
>
> Sami
>

I got that one fixed myself. Some of the kernel modules wasn't copied
to my target and therefore those errors. So I finally got hostapd
running but I got lot of messages about Stuck beacon:

wifi0: ath_bstuck_tasklet: Stuck beacon; resetting (beacon miss count: 11)

Have I understand correctly that this is a persistent bug that no one
has managed to solve? At least at madwifi project page there is a
story about stuck beacon problem that seems to be open.

Sami


From kaniki.uday  Wed Aug 10 05:11:39 2011
From: kaniki.uday (uday kiran)
Date: Wed, 10 Aug 2011 17:41:39 +0530
Subject: Help on simulation
Message-ID: <CAOeh9Mur5CF5d+FXo6iOo_ZjvRYFAddvg7mQCajR6gCizw4Bpw@mail.gmail.com>

Hi all

I am a newbie to Wi-Fi. Currently i dont have the wi-fi hardware available
with me. So I want to try out hostapd and wpa_supplicant in some kind of
simulation environment. Could some one please suggest me how to set up a
simulation environment ?

-Uday
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110810/3b401c0d/attachment.htm 


From dsd  Wed Aug 10 09:52:06 2011
From: dsd (Daniel Drake)
Date: Wed, 10 Aug 2011 17:52:06 +0100 (BST)
Subject: [PATCH] dbus: Raise PropertiesChanged on
	org.freedesktop.DBus.Properties
Message-ID: <20110810165206.4A41D9D401C@zog.reactivated.net>

wpa_supplicant dbus objects are currently difficult to use with
GDBusProxy. This is because they do not follow the dbus standard in
emitting the PropertiesChanged signal on the standard D-Bus properties
interface, so GDBusProxy stores stale property values.

Fix this by raising PropertiesChanged on the standard interface.
For backwards compatibility, the existing custom PropertiesChanged
signals are not removed; I anticipate them being removed in a future
major release.

See
http://lists.freedesktop.org/archives/dbus/2011-August/014593.html
for more info.

Signed-off-by: Daniel Drake <dsd at laptop.org>
---
 wpa_supplicant/dbus/dbus_new.c         |    5 ++
 wpa_supplicant/dbus/dbus_new_helpers.c |   79 ++++++++++++++++++++++++++++++--
 2 files changed, 80 insertions(+), 4 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index e488937..1f56aba 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -1697,6 +1697,7 @@ static const struct wpa_dbus_signal_desc wpas_dbus_global_signals[] = {
 		  END_ARGS
 	  }
 	},
+	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
 	{ "PropertiesChanged", WPAS_DBUS_NEW_INTERFACE,
 	  {
 		  { "properties", "a{sv}", ARG_OUT },
@@ -1785,6 +1786,7 @@ static const struct wpa_dbus_property_desc wpas_dbus_network_properties[] = {
 
 
 static const struct wpa_dbus_signal_desc wpas_dbus_network_signals[] = {
+	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
 	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_NETWORK,
 	  {
 		  { "properties", "a{sv}", ARG_OUT },
@@ -1962,6 +1964,7 @@ static const struct wpa_dbus_property_desc wpas_dbus_bss_properties[] = {
 
 
 static const struct wpa_dbus_signal_desc wpas_dbus_bss_signals[] = {
+	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
 	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_BSS,
 	  {
 		  { "properties", "a{sv}", ARG_OUT },
@@ -2486,6 +2489,7 @@ static const struct wpa_dbus_signal_desc wpas_dbus_interface_signals[] = {
 		  END_ARGS
 	  }
 	},
+	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
 	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_INTERFACE,
 	  {
 		  { "properties", "a{sv}", ARG_OUT },
@@ -2506,6 +2510,7 @@ static const struct wpa_dbus_signal_desc wpas_dbus_interface_signals[] = {
 		  END_ARGS
 	  }
 	},
+	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
 	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_WPS,
 	  {
 		  { "properties", "a{sv}", ARG_OUT },
diff --git a/wpa_supplicant/dbus/dbus_new_helpers.c b/wpa_supplicant/dbus/dbus_new_helpers.c
index 342ad2d..4c1db88 100644
--- a/wpa_supplicant/dbus/dbus_new_helpers.c
+++ b/wpa_supplicant/dbus/dbus_new_helpers.c
@@ -610,7 +610,7 @@ int wpa_dbus_unregister_object_per_iface(
 
 static dbus_bool_t put_changed_properties(
 	const struct wpa_dbus_object_desc *obj_dsc, const char *interface,
-	DBusMessageIter *dict_iter)
+	DBusMessageIter *dict_iter, int clear_changed)
 {
 	DBusMessageIter entry_iter;
 	const struct wpa_dbus_property_desc *dsc;
@@ -624,7 +624,8 @@ static dbus_bool_t put_changed_properties(
 			continue;
 		if (os_strcmp(dsc->dbus_interface, interface) != 0)
 			continue;
-		obj_dsc->prop_changed_flags[i] = 0;
+		if (clear_changed)
+			obj_dsc->prop_changed_flags[i] = 0;
 
 		if (!dbus_message_iter_open_container(dict_iter,
 						      DBUS_TYPE_DICT_ENTRY,
@@ -660,7 +661,56 @@ static dbus_bool_t put_changed_properties(
 }
 
 
-static void send_prop_changed_signal(
+static void do_send_prop_changed_signal(
+	DBusConnection *con, const char *path, const char *interface,
+	const struct wpa_dbus_object_desc *obj_dsc)
+{
+	DBusMessage *msg;
+	DBusMessageIter signal_iter, dict_iter;
+
+	msg = dbus_message_new_signal(path, DBUS_INTERFACE_PROPERTIES,
+				      "PropertiesChanged");
+	if (msg == NULL)
+		return;
+
+	dbus_message_iter_init_append(msg, &signal_iter);
+
+	if (!dbus_message_iter_append_basic(&signal_iter, DBUS_TYPE_STRING,
+					    &interface))
+		goto err;
+
+	/* Changed properties dict */
+	if (!dbus_message_iter_open_container(&signal_iter, DBUS_TYPE_ARRAY,
+					      "{sv}", &dict_iter))
+		goto err;
+
+	if (!put_changed_properties(obj_dsc, interface, &dict_iter, 0))
+		goto err;
+
+	if (!dbus_message_iter_close_container(&signal_iter, &dict_iter))
+		goto err;
+
+	/* Invalidated properties array (empty) */
+	if (!dbus_message_iter_open_container(&signal_iter, DBUS_TYPE_ARRAY,
+					      "s", &dict_iter))
+		goto err;
+
+	if (!dbus_message_iter_close_container(&signal_iter, &dict_iter))
+		goto err;
+
+	dbus_connection_send(con, msg, NULL);
+
+out:
+	dbus_message_unref(msg);
+	return;
+
+err:
+	wpa_printf(MSG_DEBUG, "dbus: %s: Failed to construct signal",
+		   __func__);
+	goto out;
+}
+
+static void do_send_deprecated_prop_changed_signal(
 	DBusConnection *con, const char *path, const char *interface,
 	const struct wpa_dbus_object_desc *obj_dsc)
 {
@@ -677,7 +727,7 @@ static void send_prop_changed_signal(
 					      "{sv}", &dict_iter))
 		goto err;
 
-	if (!put_changed_properties(obj_dsc, interface, &dict_iter))
+	if (!put_changed_properties(obj_dsc, interface, &dict_iter, 1))
 		goto err;
 
 	if (!dbus_message_iter_close_container(&signal_iter, &dict_iter))
@@ -695,6 +745,27 @@ err:
 	goto out;
 }
 
+static void send_prop_changed_signal(
+	DBusConnection *con, const char *path, const char *interface,
+	const struct wpa_dbus_object_desc *obj_dsc)
+{
+	/*
+	 * First, send property change notification on the standardized
+	 * org.freedesktop.DBus.Properties interface. This call will not
+	 * clear the property change bits, so that they are preserved for
+	 * the call that follows.
+	 */
+	do_send_prop_changed_signal(con, path, interface, obj_dsc);
+
+	/*
+	 * Now send PropertiesChanged on our own interface for backwards
+	 * compatibility. This is deprecated and will be removed in a future
+	 * release.
+	 */
+	do_send_deprecated_prop_changed_signal(con, path, interface, obj_dsc);
+
+	/* Property change bits have now been cleared. */
+}
 
 static void flush_object_timeout_handler(void *eloop_ctx, void *timeout_ctx)
 {
-- 
1.7.6



From j  Wed Aug 10 13:34:15 2011
From: j (Jouni Malinen)
Date: Wed, 10 Aug 2011 23:34:15 +0300
Subject: Help on simulation
In-Reply-To: <CAOeh9Mur5CF5d+FXo6iOo_ZjvRYFAddvg7mQCajR6gCizw4Bpw@mail.gmail.com>
References: <CAOeh9Mur5CF5d+FXo6iOo_ZjvRYFAddvg7mQCajR6gCizw4Bpw@mail.gmail.com>
Message-ID: <20110810203415.GA23328@jm.kir.nu>

On Wed, Aug 10, 2011 at 05:41:39PM +0530, uday kiran wrote:
> I am a newbie to Wi-Fi. Currently i dont have the wi-fi hardware available
> with me. So I want to try out hostapd and wpa_supplicant in some kind of
> simulation environment. Could some one please suggest me how to set up a
> simulation environment ?

http://linuxwireless.org/en/users/Drivers/mac80211_hwsim

-- 
Jouni Malinen                                            PGP id EFC895FA


From proski  Wed Aug 10 15:11:24 2011
From: proski (Pavel Roskin)
Date: Wed, 10 Aug 2011 18:11:24 -0400
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ@mail.gmail.com>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
	<20110805220157.613355a3@mj>
	<CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>
	<20110809082728.o8imtnc68gc0cswc-cebfxv@webmail.spamcop.net>
	<CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ@mail.gmail.com>
Message-ID: <20110810181124.1e303ad6@mj>

On Wed, 10 Aug 2011 09:30:27 +0300
sami ahokas <sami.m.ahokas at gmail.com> wrote:

> Thanks again for your help. But now I have next problem and quick
> googling didn't give me any answers. Here is what I get from hostapd:
> 
> ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument

It looks like you are using some different driver on ath0.  Run

readlink /sys/class/net/ath0/device/driver

> ath0: DRIVER Error enabling WPA/802.1X!
> IEEE 802.1X initialization failed.
> ath0: Unable to setup interface.
> rmdir[ctrl_interface]: No such file or directory
> 
> Why is it complaining about 802.1X? My setup is using WPA-PSK, not
> 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
> driver with wrong parameters?

The message comes from driver_madwifi.c and can be easily improved, but
I don't see much point in that.  WPA was mentioned after all.

-- 
Regards,
Pavel Roskin


From xpto09  Wed Aug 10 15:25:46 2011
From: xpto09 (xpto09)
Date: Wed, 10 Aug 2011 19:25:46 -0300
Subject: unsubscriber
Message-ID: <CANs6Q6UiziyShZFj7c5hY_zFkf2CJTy4-cmXEvzbZQot1jCXaQ@mail.gmail.com>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110810/995af9aa/attachment.htm 


From janusz.dziedzic  Thu Aug 11 05:29:27 2011
From: janusz.dziedzic (Janusz Dziedzic)
Date: Thu, 11 Aug 2011 14:29:27 +0200
Subject: nl80211: how to check if that is p2p go or client
Message-ID: <CAFED-jkuVeoDFu6ZiK4_kSbi=xn8iAnBKh0T3AHZWXq3O40weQ@mail.gmail.com>

Hello,

Seems wpa_supplicant when calling set_interface
(nl80211_set_interface) never set:
  NL80211_IFTYPE_P2P_GO
  NL80211_IFTYPE_P2P_CLIENT

Change this into:
  NL80211_IFTYPE_AP
  NL80211_IFTYPE_STATION

How to check if that is p2p connection in the nl80211/cfg80211 driver based?

I see in mac80211 there is a flag vif->p2p, but is never set now,
because supplicant not using this P2P_GO, P2P_CLIENT enums.
-- 
Janusz Dziedzic


From kaniki.uday  Thu Aug 11 07:50:55 2011
From: kaniki.uday (uday kiran)
Date: Thu, 11 Aug 2011 20:20:55 +0530
Subject: Help on simulation
Message-ID: <CAOeh9MsHCCMP7oyDesc6U5ujsskiHaWDbXyX=KtBPurZwfmTzw@mail.gmail.com>

Thanks Jouni Malinen. I have visited the link you have referred.

When i run hostapd with the specific .conf file, i have specfied
driver=madwifi in the conf file. But it is throwing error as "Line 2:
invalid/unknown driver 'madwifi' ".

Will mac80211_hwsim run without any driver dependency ?

Thanks for your time.

-Uday

On Wed, Aug 10, 2011 at 9:30 PM, <hostap-request at lists.shmoo.com> wrote:

> Send HostAP mailing list submissions to
>        hostap at lists.shmoo.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.shmoo.com/mailman/listinfo/hostap
> or, via email, send a message with subject or body 'help' to
>        hostap-request at lists.shmoo.com
>
> You can reach the person managing the list at
>        hostap-owner at lists.shmoo.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of HostAP digest..."
>
>
> Today's Topics:
>
>   1. [PATCH] WPS: Send the credential when learning AP params in
>      registrar role (Olivier Sobrie)
>   2. Re: [ath9k-devel] DWA-556 not working as AP (sami ahokas)
>   3. Re: [ath9k-devel] DWA-556 not working as AP (sami ahokas)
>   4. Help on simulation (uday kiran)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 10 Aug 2011 00:02:02 +0200
> From: Olivier Sobrie <olivier at sobrie.be>
> Subject: [PATCH] WPS: Send the credential when learning AP params in
>        registrar       role
> To: Jouni Malinen <j at w1.fi>
> Cc: hostap at lists.shmoo.com
> Message-ID: <1312927322-11576-1-git-send-email-olivier at sobrie.be>
>
> When the supplicant acts as a registrar to learn the access point
> parameters then send the credentials to the wpa_cli interface after
> receiving the 7th message.
> When setting the option 'wps_cred_processing' to 1 or 2 in the
> wpa_supplicant.conf you should receive the credential through the
> wpa control interface.
>
> Without this patch, after the 7th message you got the WPS-CRED-RECEIVED
> notification without the credentials. This was because the cred_attr and
> cred_attr_len were not filled in in the wps structure.
>
> Signed-off-by: Olivier Sobrie <olivier at sobrie.be>
> ---
>  src/wps/wps_registrar.c |   36 ++++++++++++++++++++++++++++++++++++
>  1 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
> index 2d7f632..1f964e7 100644
> --- a/src/wps/wps_registrar.c
> +++ b/src/wps/wps_registrar.c
> @@ -1592,6 +1592,29 @@ static int wps_build_ap_settings(struct wps_data
> *wps, struct wpabuf *msg)
>        return 0;
>  }
>
> +static int wps_build_ap_cred(struct wps_data *wps, struct wpabuf *msg)
> +{
> +       struct wpabuf *plain;
> +
> +       plain = wpabuf_alloc(200);
> +       if (plain == NULL)
> +               return -1;
> +
> +       if (wps_build_ap_settings(wps, plain)) {
> +               wpabuf_free(plain);
> +               return -1;
> +       }
> +
> +       wpabuf_put_be16(msg, ATTR_CRED);
> +       wpabuf_put_be16(msg, wpabuf_len(plain));
> +       wpabuf_put_buf(msg, plain);
> +       wpabuf_free(plain);
> +
> +       wps->cred.cred_attr = wpabuf_head(msg);
> +       wps->cred.cred_attr_len = wpabuf_len(msg);
> +
> +       return 0;
> +}
>
>  static struct wpabuf * wps_build_m2(struct wps_data *wps)
>  {
> @@ -2551,6 +2574,8 @@ static void wps_cred_update(struct wps_credential
> *dst,
>  static int wps_process_ap_settings_r(struct wps_data *wps,
>                                     struct wps_parse_attr *attr)
>  {
> +       struct wpabuf *msg;
> +
>        if (wps->wps->ap || wps->er)
>                return 0;
>
> @@ -2577,12 +2602,23 @@ static int wps_process_ap_settings_r(struct
> wps_data *wps,
>                 */
>                wps_registrar_pin_completed(wps->wps->registrar);
>
> +               msg = wpabuf_alloc(1000);
> +               if (msg == NULL)
> +                       return -1;
> +
> +               if (wps_build_ap_cred(wps, msg)) {
> +                       wpabuf_free(msg);
> +                       return -1;
> +               }
> +
>                if (wps->ap_settings_cb) {
>                        wps->ap_settings_cb(wps->ap_settings_cb_ctx,
>                                            &wps->cred);
> +                       wpabuf_free(msg);
>                        return 1;
>                }
>                wps_sta_cred_cb(wps);
> +               wpabuf_free(msg);
>                return 1;
>        }
>  }
> --
> 1.7.6
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 10 Aug 2011 09:30:27 +0300
> From: sami ahokas <sami.m.ahokas at gmail.com>
> Subject: Re: [ath9k-devel] DWA-556 not working as AP
> To: Pavel Roskin <proski at gnu.org>
> Cc: ath9k-devel at lists.ath9k.org, hostap at lists.shmoo.com
> Message-ID:
>        <CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ at mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> 2011/8/9 Pavel Roskin <proski at gnu.org>:
> > Quoting sami ahokas <sami.m.ahokas at gmail.com>:
> >
> >> Thanks for your reply. I chose to try the MadWifi driver, but now I'm
> >> not able to set interface to master mode.
> >
> > When loading the module, use "modprobe ath_pci autocreate=ap"
> >
> > That will create an interface in AP mode. ?It's easy to get used to the
> > niceties of the kernel drivers that can change the mode of an existing
> > interface.
> >
> > --
> > Regards,
> > Pavel Roskin
> >
>
> Thanks again for your help. But now I have next problem and quick
> googling didn't give me any answers. Here is what I get from hostapd:
>
> ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
> ath0: DRIVER Error enabling WPA/802.1X!
> IEEE 802.1X initialization failed.
> ath0: Unable to setup interface.
> rmdir[ctrl_interface]: No such file or directory
>
> Why is it complaining about 802.1X? My setup is using WPA-PSK, not
> 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
> driver with wrong parameters?
>
> Sami
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 10 Aug 2011 14:41:53 +0300
> From: sami ahokas <sami.m.ahokas at gmail.com>
> Subject: Re: [ath9k-devel] DWA-556 not working as AP
> To: Pavel Roskin <proski at gnu.org>
> Cc: ath9k-devel at lists.ath9k.org, hostap at lists.shmoo.com
> Message-ID:
>        <CAL-=UpQFCKUS9X_qoB87U1ZokAkTFs829p3K2wBgJ7qe7F7PEA at mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> 2011/8/10 sami ahokas <sami.m.ahokas at gmail.com>:
> > 2011/8/9 Pavel Roskin <proski at gnu.org>:
> >> Quoting sami ahokas <sami.m.ahokas at gmail.com>:
> >>
> >>> Thanks for your reply. I chose to try the MadWifi driver, but now I'm
> >>> not able to set interface to master mode.
> >>
> >> When loading the module, use "modprobe ath_pci autocreate=ap"
> >>
> >> That will create an interface in AP mode. ?It's easy to get used to the
> >> niceties of the kernel drivers that can change the mode of an existing
> >> interface.
> >>
> >> --
> >> Regards,
> >> Pavel Roskin
> >>
> >
> > Thanks again for your help. But now I have next problem and quick
> > googling didn't give me any answers. Here is what I get from hostapd:
> >
> > ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
> > ath0: DRIVER Error enabling WPA/802.1X!
> > IEEE 802.1X initialization failed.
> > ath0: Unable to setup interface.
> > rmdir[ctrl_interface]: No such file or directory
> >
> > Why is it complaining about 802.1X? My setup is using WPA-PSK, not
> > 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
> > driver with wrong parameters?
> >
> > Sami
> >
>
> I got that one fixed myself. Some of the kernel modules wasn't copied
> to my target and therefore those errors. So I finally got hostapd
> running but I got lot of messages about Stuck beacon:
>
> wifi0: ath_bstuck_tasklet: Stuck beacon; resetting (beacon miss count: 11)
>
> Have I understand correctly that this is a persistent bug that no one
> has managed to solve? At least at madwifi project page there is a
> story about stuck beacon problem that seems to be open.
>
> Sami
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 10 Aug 2011 17:41:39 +0530
> From: uday kiran <kaniki.uday at gmail.com>
> Subject: Help on simulation
> To: hostap at lists.shmoo.com
> Message-ID:
>        <CAOeh9Mur5CF5d+FXo6iOo_ZjvRYFAddvg7mQCajR6gCizw4Bpw at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all
>
> I am a newbie to Wi-Fi. Currently i dont have the wi-fi hardware available
> with me. So I want to try out hostapd and wpa_supplicant in some kind of
> simulation environment. Could some one please suggest me how to set up a
> simulation environment ?
>
> -Uday
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.shmoo.com/pipermail/hostap/attachments/20110810/3b401c0d/attachment.html
>
> ------------------------------
>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
>
> End of HostAP Digest, Vol 100, Issue 14
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110811/98deed31/attachment-0001.htm 


From aurelien.geron  Thu Aug 11 09:24:49 2011
From: aurelien.geron (=?iso-8859-1?Q?Aur=E9lien_Geron?=)
Date: Thu, 11 Aug 2011 18:24:49 +0200
Subject: Open source 802.1x authenticator
Message-ID: <F7E0DA29-C27C-4C2F-81C5-AD2EAC1B9A01@gmail.com>

Hi,

I am looking for an open source 802.1x authenticator for wired access control that runs on Linux (if possible Debian).

I have two Windows PCs with 802.1x activated on their ethernet ports, and they are connected directly to a Linux box, which is itself connected to a RADIUS server and to the Internet.  I want the Linux box to play the role of the 802.1x authenticator (block all traffic until proper 802.1x authentication has succeeded, with the user being authenticated by the RADIUS server).

Here's a bit more details: http://superuser.com/questions/321461/is-there-an-open-source-software-to-run-a-802-1x-authenticator-ie-nas-within-l

Apparently hostapd is more for WiFi access, but it seems to include a 802.1x authenticator.  Is it possible to use hostapd purely for 802.1x access control, without using WiFi at all?

Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110811/ba860787/attachment.htm 


From vamsi531  Thu Aug 11 11:17:53 2011
From: vamsi531 (vamsi krishna)
Date: Thu, 11 Aug 2011 23:47:53 +0530
Subject: support for lable method in wpa_supplicant-0.7.3 in AP mode???
Message-ID: <CAL+ajOBh_Ye_J0ULmxbXXignHGgEeX5x4Gk5XuGE-BZ-UqnytA@mail.gmail.com>

Hi All,

Please let me know whether wpa_supplicant-0.7.3 has support for WPS
lable method in AP mode.

If it supports, let me know how to enable it and use it. Please point
me if there is any document available on WPS lable method usage.

Thanks in advance,
- Vamsi.


From eduardgv  Thu Aug 11 12:58:33 2011
From: eduardgv (Eduard GV)
Date: Thu, 11 Aug 2011 12:58:33 -0700
Subject: Data rates if slow stations present
In-Reply-To: <7742C7FB-7F59-4555-A1ED-5634BFC1A6B2@zinkconsulting.com>
References: <20110805075250.21340@gmx.net>
	<7742C7FB-7F59-4555-A1ED-5634BFC1A6B2@zinkconsulting.com>
Message-ID: <CAGD4+97K_uquJWo93jUSUaTvBOAaSxgV-ogfLaeKAA7Eu_tv1A@mail.gmail.com>

Hi,

I agree with everything but the 50% airtime share thing.
If no QoS enhancement is used (802.11e), the 802.11's CSMA grants a
long term fairness in terms of access probability, not in time share.
In other words, both the fast and the slow stations will be able to
send the same number of frames, and hence they will measure the same
throughput. That is, if a 1Mbps STA competes with a 300 Mbps STA, both
will obtain about 850kbps (!!). If the 11n station activates
aggregation, multiply those 850kbps by the number of frames
aggregated. Moral: configure QoS and use 11n aggregation if you can't
avoid old 11b/g devices.

This behavior is due to the fact that slow transmissions will capture
the medium during longer periods and, in consequence, the performance
of fast links is effectively dragged down by slow links. This is
usually defined as "performance anomaly".


Regards

2011/8/5 Galen <galenz at zinkconsulting.com>:
> Tobias,
>
> Here's the basics:
>
> 1) When make an 802.11n AP compatible with 802.11g, you loose some performance.
>
> 2) When you make 802.11n AP compatible with 802.11b, you lose even more performance.
>
> Basically, every layer of backwards compatibility adds to the operating overhead, even if there are no legacy devices actively using bandwidth.
>
> When slower devices come onto the network, the bandwidth is shared by time. Let's say that you have an 802.11n and 802.11b device both active on an AP. If they are both actively transmitting data as fast as they can, each will take around 50% of the airtime. This means that if you have an 802.11n client at 150 megabits and another at 1 megabit, each will get around 50% of the maximum throughput.
>
> This is of course a gross simplification, but it should give you an idea as to how things work approximately. There's so much variance in implementation, client functionality, etc. that these are VERY VERY rough approximations.
>
> I think that it would be helpful to provide additional context as to why you're asking this question. I could provide you with lots of links, but it would likely down you documentation.
>
> -Galen
>
> On Aug 5, 2011, at 12:52 AM, Tobias Gunkel wrote:
>
>> Hello,
>>
>> I have a general question regarding the behavior of an AP if slow stations are present.
>> Imagine there are two stations - one 802.11n capable station and one that is capable of only 802.11b.
>> Now the 802.11n station connects to an AP and is able to transfer data with the lets say 150 MBit/s.
>> After a while the 11b only station connects to the AP but as the SNR is very bad it can only transfer at a 1 MBit/s rate.
>>
>> What happens now with the data-rate of the 11n station? Will this station switch to 11b two or is an AP able to manage stations in different modes at the "same" time? At least the 11b station will occupy the channel for some time so that the 11n station will have less time-slots for data transfers so the data rate will drop at least 1 MBit/s (probably more because the 11b station needs more time for transferring 1 MBit than the 11n station).
>>
>> Is the behavior of the AP standardized? I already had a look into the 802.11 standard but could not find a description of the behavior of AP stations (there is only a very short Annex N: AP functional description).
>> What is the behavior of hostAP in this case?
>>
>> Thanks in advance for answers or pointers to other sites, standards, ...
>>
>> Regards,
>> Tobias Gunkel
>> _______________________________________________
>> HostAP mailing list
>> HostAP at lists.shmoo.com
>> http://lists.shmoo.com/mailman/listinfo/hostap
>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>


From stonezju  Fri Aug 12 01:33:44 2011
From: stonezju (Stone)
Date: Fri, 12 Aug 2011 16:33:44 +0800
Subject: support for lable method in wpa_supplicant-0.7.3 in AP mode???
In-Reply-To: <CAL+ajOBh_Ye_J0ULmxbXXignHGgEeX5x4Gk5XuGE-BZ-UqnytA@mail.gmail.com>
References: <CAL+ajOBh_Ye_J0ULmxbXXignHGgEeX5x4Gk5XuGE-BZ-UqnytA@mail.gmail.com>
Message-ID: <CAKH3SjtC==GQRVc4_RcjjEMmf9kFuWD-Q71EerynMW5wXZJzvQ@mail.gmail.com>

hi vamsi krishna,
Do you mean WPS pin method with wpa_supplicant working as AP? I am not very
sure about 0.7.3, while wpa_supplicant 0.8.x latest code supports this. If
you want to use wpa_supplicant working as AP, you can use cmd in wpa_cli
"set_network 0 mode 2" to enable AP mode. You can refer to README-WPS about
WPS pin method usage.


2011/8/12 vamsi krishna <vamsi531 at gmail.com>

> Hi All,
>
> Please let me know whether wpa_supplicant-0.7.3 has support for WPS
> lable method in AP mode.
>
> If it supports, let me know how to enable it and use it. Please point
> me if there is any document available on WPS lable method usage.
>
> Thanks in advance,
> - Vamsi.
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110812/fc86414c/attachment.htm 


From hk5patel  Fri Aug 12 03:37:39 2011
From: hk5patel (hardik patel)
Date: Fri, 12 Aug 2011 16:07:39 +0530
Subject: nl80211: how to check if that is p2p go or client
In-Reply-To: <CAFED-jkuVeoDFu6ZiK4_kSbi=xn8iAnBKh0T3AHZWXq3O40weQ@mail.gmail.com>
References: <CAFED-jkuVeoDFu6ZiK4_kSbi=xn8iAnBKh0T3AHZWXq3O40weQ@mail.gmail.com>
Message-ID: <CAKHmZoDxq2VHG==UH_Mcbr4QSzw6skyCnWVa5m=jvt0nT=p6zQ@mail.gmail.com>

Hi ,

Which supplicant version you are using ? I think in latest supplicant
it is taken care by driver_nl80211.c file in supplicant. Which will
set proper interface for p2p.

In cfg80211 driver, In cfg80211_change_iface callback driver function
you can check type which is nothing but "enum nl80211_iftype"
variable. this tell you whether it is p2p_client or p2p_GO

Thanks,
Hardik

On Thu, Aug 11, 2011 at 5:59 PM, Janusz Dziedzic
<janusz.dziedzic at gmail.com> wrote:
> Hello,
>
> Seems wpa_supplicant when calling set_interface
> (nl80211_set_interface) never set:
> ?NL80211_IFTYPE_P2P_GO
> ?NL80211_IFTYPE_P2P_CLIENT
>
> Change this into:
> ?NL80211_IFTYPE_AP
> ?NL80211_IFTYPE_STATION
>
> How to check if that is p2p connection in the nl80211/cfg80211 driver based?
>
> I see in mac80211 there is a flag vif->p2p, but is never set now,
> because supplicant not using this P2P_GO, P2P_CLIENT enums.
> --
> Janusz Dziedzic
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>



-- 
Regards,
Hardik

"If you are doing what you have always been doing then expect what you
have always been getting."


From kaniki.uday  Fri Aug 12 04:19:45 2011
From: kaniki.uday (uday kiran)
Date: Fri, 12 Aug 2011 16:49:45 +0530
Subject: Configuring hwsim0 using hostapd
Message-ID: <CAOeh9MvBRNV6yMd+10=e4aUmFKrH3URmHBoLOPMuYWmHG4ao0A@mail.gmail.com>

Hi

I have a config file as below.

interface=hwsim0
driver=madwifi
ssid=madwifi test

i have installed hostapd0.7.3 and madwifi 0.9.4

When I run the conf with hostapd (./hostapd simple_test.conf), I got the
following error.
====== Configuration file: ../hostapd-0.7.3/hostapd/host.conf
====== ioctl[SIOCSIWMODE]: Operation not supported
====== Could not set interface to master mode!
====== madwifi driver initialization failed.

Could some one help me out , in resolving this issue ?

Please refer attachment for additional info.

Thanks in advance.

-Uday
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110812/d371045f/attachment.htm 
-------------- next part --------------
Additional info:
===========

OS : fedora 2.6.33
hwsim0    Link encap:UNSPEC  HWaddr 12-00-00-00-00-00-A1-A2-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lsmod output
==========
Module                  Size  Used by
xfrm4_tunnel            1359  0
tunnel4                 1887  1 xfrm4_tunnel
ipcomp                  1435  0
xfrm_ipcomp             3134  1 ipcomp
esp4                    3960  0
ah4                     3777  0
af_key                 22493  0
ath                     6974  0
arc4                    1041  4
ecb                     1491  4
mac80211_hwsim          9667  0
mac80211              163458  1 mac80211_hwsim
cfg80211               97351  3 ath,mac80211_hwsim,mac80211
rfkill                 12905  1 cfg80211
ath_pci               138358  0
wlan                  177898  1 ath_pci
ath_hal               350382  1 ath_pci
fuse                   46663  2
ip6table_filter         2191  1
ip6_tables              9211  1 ip6table_filter
xt_physdev              1363  1
bridge                 37420  0
stp                     1367  1 bridge
llc                     3545  2 bridge,stp
sunrpc                159624  1
p4_clockmod             2943  0



From janusz.dziedzic  Fri Aug 12 06:58:12 2011
From: janusz.dziedzic (Janusz Dziedzic)
Date: Fri, 12 Aug 2011 15:58:12 +0200
Subject: nl80211: how to check if that is p2p go or client
In-Reply-To: <CAKHmZoDxq2VHG==UH_Mcbr4QSzw6skyCnWVa5m=jvt0nT=p6zQ@mail.gmail.com>
References: <CAFED-jkuVeoDFu6ZiK4_kSbi=xn8iAnBKh0T3AHZWXq3O40weQ@mail.gmail.com>
	<CAKHmZoDxq2VHG==UH_Mcbr4QSzw6skyCnWVa5m=jvt0nT=p6zQ@mail.gmail.com>
Message-ID: <CAFED-jkH5KEsPwn7q+Wvh_fz3pVyrFj4mYqBz-MC=OEqnxqnaQ@mail.gmail.com>

2011/8/12 hardik patel <hk5patel at gmail.com>:
> Hi ,
>
> Which supplicant version you are using ? I think in latest supplicant
> it is taken care by driver_nl80211.c file in supplicant. Which will
> set proper interface for p2p.
>
> In cfg80211 driver, In cfg80211_change_iface callback driver function
> you can check type which is nothing but "enum nl80211_iftype"
> variable. this tell you whether it is p2p_client or p2p_GO
>

I am using current wpa_supplicant.
P2P_GO or P2P_CLIENT is never send in set_interface callback.

wpa_driver_nl80211_set_mode()  function from driver_nl80211.c set only:
NL80211_IFTYPE_STATION
NL80211_IFTYPE_ADHOC
NL80211_IFTYPE_AP

I see in cfg80211 layer - we never set P2P_GO, P2P_CLIENT nl80211
enums in set_interface().



BR
Janusz


From hk5patel  Fri Aug 12 08:25:11 2011
From: hk5patel (hardik patel)
Date: Fri, 12 Aug 2011 20:55:11 +0530
Subject: nl80211: how to check if that is p2p go or client
In-Reply-To: <CAFED-jkH5KEsPwn7q+Wvh_fz3pVyrFj4mYqBz-MC=OEqnxqnaQ@mail.gmail.com>
References: <CAFED-jkuVeoDFu6ZiK4_kSbi=xn8iAnBKh0T3AHZWXq3O40weQ@mail.gmail.com>
	<CAKHmZoDxq2VHG==UH_Mcbr4QSzw6skyCnWVa5m=jvt0nT=p6zQ@mail.gmail.com>
	<CAFED-jkH5KEsPwn7q+Wvh_fz3pVyrFj4mYqBz-MC=OEqnxqnaQ@mail.gmail.com>
Message-ID: <CAKHmZoBdpjTmQOENsj7ZJpDgyOkzbivN6mw+46AsJ8S8c+PwAA@mail.gmail.com>

Hi,

Check below patch for driver_nl80211.c file in supplicant which set
nlmode as NL80211_IFTYPE_P2P_GO

http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commit;h=b1f625e0d81b76bb2380d0b47b95f5ad61123ba5


Use supplicant version 0.8.x which have good support for P2P (wifi-direct)

Get latest supplicant from below :

http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;h=refs/heads/master;hb=refs/heads/master

Thanks,
Hardik

On Fri, Aug 12, 2011 at 7:28 PM, Janusz Dziedzic
<janusz.dziedzic at gmail.com> wrote:
> 2011/8/12 hardik patel <hk5patel at gmail.com>:
>> Hi ,
>>
>> Which supplicant version you are using ? I think in latest supplicant
>> it is taken care by driver_nl80211.c file in supplicant. Which will
>> set proper interface for p2p.
>>
>> In cfg80211 driver, In cfg80211_change_iface callback driver function
>> you can check type which is nothing but "enum nl80211_iftype"
>> variable. this tell you whether it is p2p_client or p2p_GO
>>
>
> I am using current wpa_supplicant.
> P2P_GO or P2P_CLIENT is never send in set_interface callback.
>
> wpa_driver_nl80211_set_mode() ?function from driver_nl80211.c set only:
> NL80211_IFTYPE_STATION
> NL80211_IFTYPE_ADHOC
> NL80211_IFTYPE_AP
>
> I see in cfg80211 layer - we never set P2P_GO, P2P_CLIENT nl80211
> enums in set_interface().
>
>
>
> BR
> Janusz
>



-- 
Regards,
Hardik

"If you are doing what you have always been doing then expect what you
have always been getting."


From janusz.dziedzic  Fri Aug 12 09:09:05 2011
From: janusz.dziedzic (Janusz Dziedzic)
Date: Fri, 12 Aug 2011 18:09:05 +0200
Subject: nl80211: how to check if that is p2p go or client
In-Reply-To: <CAKHmZoBdpjTmQOENsj7ZJpDgyOkzbivN6mw+46AsJ8S8c+PwAA@mail.gmail.com>
References: <CAFED-jkuVeoDFu6ZiK4_kSbi=xn8iAnBKh0T3AHZWXq3O40weQ@mail.gmail.com>
	<CAKHmZoDxq2VHG==UH_Mcbr4QSzw6skyCnWVa5m=jvt0nT=p6zQ@mail.gmail.com>
	<CAFED-jkH5KEsPwn7q+Wvh_fz3pVyrFj4mYqBz-MC=OEqnxqnaQ@mail.gmail.com>
	<CAKHmZoBdpjTmQOENsj7ZJpDgyOkzbivN6mw+46AsJ8S8c+PwAA@mail.gmail.com>
Message-ID: <CAFED-jmmoj7y2rPuyBroXOqab8z489-jnt2Tjjgwv4wPo1=iwA@mail.gmail.com>

2011/8/12 hardik patel <hk5patel at gmail.com>:
> Hi,
>
> Check below patch for driver_nl80211.c file in supplicant which set
> nlmode as NL80211_IFTYPE_P2P_GO
>
> http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commit;h=b1f625e0d81b76bb2380d0b47b95f5ad61123ba5
>
>
> Use supplicant version 0.8.x which have good support for P2P (wifi-direct)
>
> Get latest supplicant from below :
>
> http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;h=refs/heads/master;hb=refs/heads/master
>

Hello,

Thanks. Seems I had older version -from begining of July :)
After git pull I see this changes.

Thanks for help.

BR
Janusz


From j  Fri Aug 12 10:11:58 2011
From: j (Jouni Malinen)
Date: Fri, 12 Aug 2011 20:11:58 +0300
Subject: Open source 802.1x authenticator
In-Reply-To: <F7E0DA29-C27C-4C2F-81C5-AD2EAC1B9A01@gmail.com>
References: <F7E0DA29-C27C-4C2F-81C5-AD2EAC1B9A01@gmail.com>
Message-ID: <20110812171158.GA5375@jm.kir.nu>

On Thu, Aug 11, 2011 at 06:24:49PM +0200, Aur?lien Geron wrote:
> Apparently hostapd is more for WiFi access, but it seems to include a 802.1x authenticator.  Is it possible to use hostapd purely for 802.1x access control, without using WiFi at all?

Yes. Though, you would most likely need to add some code to actually
implement port control (i.e., unauthorize/authorize ports) depending on
what kind of policy you want to have on forwarding actual data frames.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Fri Aug 12 10:14:47 2011
From: j (Jouni Malinen)
Date: Fri, 12 Aug 2011 20:14:47 +0300
Subject: Help on simulation
In-Reply-To: <CAOeh9MsHCCMP7oyDesc6U5ujsskiHaWDbXyX=KtBPurZwfmTzw@mail.gmail.com>
References: <CAOeh9MsHCCMP7oyDesc6U5ujsskiHaWDbXyX=KtBPurZwfmTzw@mail.gmail.com>
Message-ID: <20110812171447.GB5375@jm.kir.nu>

On Thu, Aug 11, 2011 at 08:20:55PM +0530, uday kiran wrote:
> When i run hostapd with the specific .conf file, i have specfied
> driver=madwifi in the conf file. But it is throwing error as "Line 2:
> invalid/unknown driver 'madwifi' ".

mac80211_hwsim has nothing to do with madwifi.

> Will mac80211_hwsim run without any driver dependency ?

Yes, but you will need to use driver=nl80211 in hostapd.conf to
interface with it.

-- 
Jouni Malinen                                            PGP id EFC895FA


From harshal  Fri Aug 12 11:03:19 2011
From: harshal (Harshal Chhaya)
Date: Fri, 12 Aug 2011 13:03:19 -0500
Subject: Relevance of GTK key index?
Message-ID: <CAJ8GFOh2RD_DeTe-MMHAKCufy1fNRN_w96feCfZ_nHSEY0BbOg@mail.gmail.com>

Hello,

Should the key index used for the GTK (with WPA2-PEAP) matter?

I am seeing that my clients have problems if the GTK is at index 2 but
connect just fine if the GTK is at index 1. The connection manager on
these clients (custom code), restarts the connection process if the
GTK is at index 2 because it seems that the radio firmware expects the
GTK at index 1. After a few such tries, the connection succeeds
because hostapd somehow switches the GTK index to 1 and my connection
manager is happy.

BTW, the PTK is always set at index 0.

I am trying to understand what causes hostapd to use a different index
and if I can influence it to use index 1 to start with? This will
avoid all the retries and improve the connection time.

Thanks,
- Harshal


From vamsi531  Sat Aug 13 08:59:06 2011
From: vamsi531 (vamsi krishna)
Date: Sat, 13 Aug 2011 21:29:06 +0530
Subject: support for lable method in wpa_supplicant-0.7.3 in AP mode???
In-Reply-To: <CAKH3SjtC==GQRVc4_RcjjEMmf9kFuWD-Q71EerynMW5wXZJzvQ@mail.gmail.com>
References: <CAL+ajOBh_Ye_J0ULmxbXXignHGgEeX5x4Gk5XuGE-BZ-UqnytA@mail.gmail.com>
	<CAKH3SjtC==GQRVc4_RcjjEMmf9kFuWD-Q71EerynMW5wXZJzvQ@mail.gmail.com>
Message-ID: <CAL+ajOA6e960CRPadCmJhpLOoVbW495myM==TFxVWU6R086Lag@mail.gmail.com>

Hi,

Thanks for your reply Stone.

0.7.3 also supports WPS pin method. But I am particular about the
lable configuration method.
If it supports lable configuration method also, please let me know how
should I configure wpa_supplicant on AP side with a constant lable
PIN.

Thanks,
Vamsi.

On 12 August 2011 14:03, Stone <stonezju at gmail.com> wrote:
> hi vamsi krishna,
> Do you mean WPS pin method with wpa_supplicant working as AP? I am not very
> sure about 0.7.3, while wpa_supplicant 0.8.x latest code supports this. If
> you want to use wpa_supplicant working as AP, you?can use cmd in wpa_cli
> "set_network 0 mode 2" to enable AP mode. You can refer to README-WPS about
> WPS pin method usage.
>
> 2011/8/12 vamsi krishna <vamsi531 at gmail.com>
>>
>> Hi All,
>>
>> Please let me know whether wpa_supplicant-0.7.3 has support for WPS
>> lable method in AP mode.
>>
>> If it supports, let me know how to enable it and use it. Please point
>> me if there is any document available on WPS lable method usage.
>>
>> Thanks in advance,
>> - Vamsi.
>> _______________________________________________
>> HostAP mailing list
>> HostAP at lists.shmoo.com
>> http://lists.shmoo.com/mailman/listinfo/hostap
>
>


From chunkeey  Sat Aug 13 13:12:54 2011
From: chunkeey (Christian Lamparter)
Date: Sat, 13 Aug 2011 22:12:54 +0200
Subject: Relevance of GTK key index?
In-Reply-To: <CAJ8GFOh2RD_DeTe-MMHAKCufy1fNRN_w96feCfZ_nHSEY0BbOg@mail.gmail.com>
References: <CAJ8GFOh2RD_DeTe-MMHAKCufy1fNRN_w96feCfZ_nHSEY0BbOg@mail.gmail.com>
Message-ID: <201108132212.55842.chunkeey@googlemail.com>

On Friday 12 August 2011 20:03:19 Harshal Chhaya wrote:
> Should the key index used for the GTK (with WPA2-PEAP) matter?
> 
> I am seeing that my clients have problems if the GTK is at index 2 but
> connect just fine if the GTK is at index 1. The connection manager on
> these clients (custom code), restarts the connection process if the
> GTK is at index 2 because it seems that the radio firmware expects the
> GTK at index 1. After a few such tries, the connection succeeds
> because hostapd somehow switches the GTK index to 1 and my connection
> manager is happy.
>
> I am trying to understand what causes hostapd to use a different index
> and if I can influence it to use index 1 to start with? This will
> avoid all the retries and improve the connection time.
Please, take a look at the spec. It's easy to find the right answers there.

802.11-2007 8.5.6 :
"Because there are two GTKs, the responsibility for updating these keys is
given to the group key state machine (see Figure 8-39). In other words, this
state machine determines which GTK is use at any time."


Regards,
	Chr


From emailgrant  Sat Aug 13 13:22:53 2011
From: emailgrant (Grant)
Date: Sat, 13 Aug 2011 13:22:53 -0700
Subject: 802.11a/n
Message-ID: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>

I'm using a Ubiquiti SR71-E 802.11abgn card and I've tried specifying
many different channels for 802.11a mode but I always get this error:

wlan0: IEEE 802.11 Configured channel (36) not found from the channel
list of current mode (2) IEEE 802.11a
wlan0: IEEE 802.11 Hardware does not support configured channel

Also, it seems strange to specify both hw_mode=g (for example) and
ieee80211n=1.  Is that the correct config for 802.11n?

- Grant


From guy  Sun Aug 14 10:22:46 2011
From: guy (Guy Eilam)
Date: Sun, 14 Aug 2011 20:22:46 +0300
Subject: [RFC] WPS2: Add WPS IE to Assoc Resp for cases of WLAN_STA_MAYBE_WPS
Message-ID: <1313342566-12357-1-git-send-email-guy@wizery.com>

Add a WPS IE to the Association Response even when
the STA is only maybe trying to connect using WPS.
This change is needed according to test 4.2.12 in the WSC 2.0
Testplan.
A WPS IE is needed even in cases that a station which supports
WPS1 tries to connect and doesn't have any WPS IE, RSN IE and WPA IE.

This change might cause the WPS IE to be sent also in an Association
Response when a STA tries to connect to an Open Network AP (which
is configured to WPS).

Signed-off-by: Guy Eilam <guy at wizery.com>
---
 src/ap/ieee802_11.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 1855531..2583d57 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -998,7 +998,14 @@ static void send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
 		p = hostapd_eid_wmm(hapd, p);
 
 #ifdef CONFIG_WPS
+#ifdef CONFIG_WPS2
+	/* WPS2 must have a WPS IE in the Assoc Resp
+	 * even if there's only a small chance that the STA
+	 * tries to connect using WPS */
+	if (sta->flags & (WLAN_STA_WPS | WLAN_STA_MAYBE_WPS)) {
+#else /* CONFIG_WPS2 */
 	if (sta->flags & WLAN_STA_WPS) {
+#endif /* CONFIG_WPS2 */
 		struct wpabuf *wps = wps_build_assoc_resp_ie();
 		if (wps) {
 			os_memcpy(p, wpabuf_head(wps), wpabuf_len(wps));
-- 
1.7.4.1



From j  Mon Aug 15 06:06:25 2011
From: j (Jouni Malinen)
Date: Mon, 15 Aug 2011 06:06:25 -0700
Subject: 802.11a/n
In-Reply-To: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
Message-ID: <20110815130625.GA4770@jm.kir.nu>

On Sat, Aug 13, 2011 at 01:22:53PM -0700, Grant wrote:
> I'm using a Ubiquiti SR71-E 802.11abgn card and I've tried specifying
> many different channels for 802.11a mode but I always get this error:
> 
> wlan0: IEEE 802.11 Configured channel (36) not found from the channel
> list of current mode (2) IEEE 802.11a
> wlan0: IEEE 802.11 Hardware does not support configured channel

It sounds like your card could be calibrated as a world roaming card and
it does not allow AP mode to be started on 5 GHz channels. You can check
the available channel list with "iw list". The channels that are marked
"disabled" or "passive scanning" won't be available for hostapd to use
in AP mode.

> Also, it seems strange to specify both hw_mode=g (for example) and
> ieee80211n=1.  Is that the correct config for 802.11n?

Yes.

-- 
Jouni Malinen                                            PGP id EFC895FA


From rk-list  Mon Aug 15 08:03:23 2011
From: rk-list (Roland Koebler)
Date: Mon, 15 Aug 2011 17:03:23 +0200
Subject: Ad-Hoc/IBSS + WPA??
Message-ID: <20110815150323.GA31701@localhost>

Hi,

I would like to set up an encrypted WLAN Ad-hoc network. Unfortunately,
it did not work as described in the wpa_supplicant documentation, and
even reading lots of webpages did not help. :(
Until now, I was only able to set up a working unencrypted Ad-hoc network,
and a non-working WEP-encrypted one.

So:
- Has anyone here successfully set up an encrypted WLAN Ad-hoc network?
  If yes: Can you tell me how?
- Which encryption can be used? WEP, WPA or even WPA2?

Can you give me any hints?


Details:
I'm using Debian Squeeze, with kernel 2.6.32 and wpa_supplicant 0.6.10,
and 2 computers with RaLink or Intel WLAN-chipset and the same configuration
(except that they have different IP-adresses ;)).

What I've done so far:

1. unencrypted Ad-hoc network between 2 computers: works.
   $ iwconfig wlan0 mode ad-hoc
   $ iwconfig wlan0 essid TEST0
   $ iwconfig wlan0 channel 1
   $ ifconfig wlan0 192.168.2.50 up

   After doing the same on the other computer with a different IP,
   ping works between these computers. Everything ok here.

2. WEP encryption: starts, but no ping.

   wpa_supplicant.conf:
        ap_scan=2
        network={
            ssid="test01"
            mode=1
            frequency=2412
            key_mgmt=NONE
            wep_key0="abcdexy"
            wep_tx_keyidx=0
        }

    $ wpa_supplicant -c wpa_supplicant.conf -i wlan0
    ioctl[SIOCSIWPMKSA]: Invalid argument
    Trying to associate with SSID 'test01'
    ioctl[SIOCSIWENCODEEXT]: Invalid argument
    ioctl[SIOCSIWGENIE]: Operation not supported
    Association request to the driver failed
    l2_packet_receive - recvfrom: Network is down
    Associated with 2a:e0:e7:e6:ab:d7
    CTRL-EVENT-CONNECTED - Connection to 2a:e0:e7:e6:ab:d7 completed (auth) [id=0 id_str=]

    $ iwconfig
    wlan0     IEEE 802.11bgn  ESSID:"test01"
              Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 2A:E0:E7:E6:AB:D7
              Tx-Power=15 dBm
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Encryption key:off
              Power Management:off
    $ iwlist scan
    wlan0     Scan completed :
              Cell 01 - Address: 2A:E0:E7:E6:AB:D7
                        Channel:1
                        Frequency:2.412 GHz (Channel 1)
                        Quality=67/70  Signal level=-43 dBm  
                        Encryption key:on
                        ESSID:"test01"
                        Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                                  9 Mb/s; 12 Mb/s; 18 Mb/s
                        Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                        Mode:Ad-Hoc
			Extra:tsf=00000000025fd339
			Extra: Last beacon: 27568ms ago
			IE: Unknown: 0006746573743031
			IE: Unknown: 010882840B160C121824
			IE: Unknown: 030101
			IE: Unknown: 06020000
			IE: Unknown: 32043048606C
    $ ping 192.168.2.52
    PING 192.168.2.52 (192.168.2.52) 56(84) bytes of data.
    From 192.168.2.51 icmp_seq=1 Destination Host Unreachable
    ...

    Questions:
    - Where can I find where the SIOCSIWPMKSA, SIOCSIWENCODEEXT,
      SIOCSIWGENIE errors come from?
    - Why does iwconfig report "Encryption key:off" but iwlist scan
      say "Encryption key:on"??
    - Both computers are associated with the same cell -- but ping
      reports "Destination Host Unreachable". Why?

3. WPA: starts, but with WEP (?!) and no ping
   wpa_supplicant.conf: (from the wpa_supplicant examples)
        ap_scan=2
        network={
            ssid="test_adhoc"
            mode=1
            frequency=2412
            proto=WPA
            key_mgmt=WPA-NONE
            pairwise=NONE
            group=TKIP
            psk="secret_passphrase"
        }

    $ wpa_supplicant -c wpa_supplicant.conf -i wlan0
    ioctl[SIOCSIWPMKSA]: Invalid argument
    Trying to associate with SSID 'test_adhoc'
    ioctl[SIOCSIWGENIE]: Operation not supported
    Association request to the driver failed
    CTRL-EVENT-CONNECTED - Connection to 00:00:00:00:00:00 completed (auth) [id=-1 id_str=]
    l2_packet_receive - recvfrom: Network is down
    Associated with a2:c9:33:96:6f:c2
    CTRL-EVENT-CONNECTED - Connection to a2:c9:33:96:6f:c2 completed (reauth) [id=0 id_str=]

    $ iwconfig
    wlan0     IEEE 802.11bgn  ESSID:"test_adhoc"  
              Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: A2:C9:33:96:6F:C2   
              Tx-Power=20 dBm   
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Encryption key:410C-2C46-BB22-552B-9BEA-C15F-2917-22A2-9CA7-5B9E-9BD5-2CF3-9CA7-5B9E-9BD5-2CF3
              Power Management:on
    $ iwlist scan
    wlan0     Scan completed :
              Cell 01 - Address: A2:C9:33:96:6F:C2
                        Channel:1
                        Frequency:2.412 GHz (Channel 1)
                        Quality=67/70  Signal level=-43 dBm  
                        Encryption key:on
                        ESSID:"test_adhoc"
                        Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                                  9 Mb/s; 12 Mb/s; 18 Mb/s
                        Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                        Mode:Ad-Hoc
                        Extra:tsf=000000000416e410
                        Extra: Last beacon: 16ms ago
                        IE: Unknown: 000A746573745F6164686F63
                        IE: Unknown: 010882840B160C121824
                        IE: Unknown: 030101
                        IE: Unknown: 06020000
                        IE: Unknown: 32043048606C
    $ ping 192.168.2.52
    PING 192.168.2.52 (192.168.2.52) 56(84) bytes of data.
    From 192.168.2.51 icmp_seq=9 Destination Host Unreachable
    ...

    Questions:
    - The network still seems WEP-encrypted (instead of WPA), or am I wrong?
    - As before, ping does not work, and I have no idea why. :(
      Any ideas?
    - I tested the same with wpa_supplicant 0.7.3 -- this resulted in a
      completely *unencrypted* network, although I used exactly the same
      wpa_supplicant.conf. Why??


best regards,
Roland



From gmorain  Fri Aug  5 16:23:12 2011
From: gmorain (Gary Morain)
Date: Fri, 5 Aug 2011 16:23:12 -0700
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz networks.
Message-ID: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>

In scan.c, merge a channel's noise value into the scan results.  When comparing
scan results, compute the signal-to-noise ratio and use it when available.
Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR is
relatively close to the other network's.

---
 src/drivers/driver.h              |   15 +++++++
 src/drivers/driver_nl80211.c      |   76 +++++++++++++++++++++++++++++++++++++
 wpa_supplicant/driver_i.h         |    8 ++++
 wpa_supplicant/scan.c             |   30 ++++++++++++---
 wpa_supplicant/wpa_supplicant_i.h |   10 +++++
 5 files changed, 133 insertions(+), 6 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index e2d0f8b..1c118fb 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1250,6 +1250,21 @@ struct wpa_driver_ops {
 	 struct wpa_scan_results * (*get_scan_results2)(void *priv);
 
 	/**
+	 * get_noise_for_scan_results - Sets the 'noise' field of struct
+	 * wpa_scan_res
+	 * @priv: private driver interface data
+	 * @scan_results: Can results obtained through get_scan_results2.
+	 *
+	 * This function gets the survey results from the driver.  For each
+	 * frequency in the scan results, the noise is updated if the survey
+	 * results have a noise value for that frequency.
+	 *
+	 * Returns: 0 on success. -1 on failure.
+	 */
+	int (*get_noise_for_scan_results)(void *priv,
+					  struct wpa_scan_results *scan_results);
+
+	/**
 	 * set_country - Set country
 	 * @priv: Private driver interface data
 	 * @alpha2: country to which to switch to
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 1cb2196..2501685 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1278,6 +1278,81 @@ static int nl80211_get_link_noise(struct wpa_driver_nl80211_data *drv,
 }
 
 
+static int get_noise_for_scan_results(struct nl_msg *msg, void *arg)
+{
+	struct nlattr *tb[NL80211_ATTR_MAX + 1];
+	struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
+	struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1];
+	static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = {
+		[NL80211_SURVEY_INFO_FREQUENCY] = { .type = NLA_U32 },
+		[NL80211_SURVEY_INFO_NOISE] = { .type = NLA_U8 },
+	};
+	struct wpa_scan_results *scan_results = arg;
+	struct wpa_scan_res *scan_res;
+	size_t i;
+
+	nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
+		  genlmsg_attrlen(gnlh, 0), NULL);
+
+	if (!tb[NL80211_ATTR_SURVEY_INFO]) {
+		wpa_printf(MSG_DEBUG, "nl80211: survey data missing!");
+		return NL_SKIP;
+	}
+
+	if (nla_parse_nested(sinfo, NL80211_SURVEY_INFO_MAX,
+			     tb[NL80211_ATTR_SURVEY_INFO],
+			     survey_policy)) {
+		wpa_printf(MSG_DEBUG, "nl80211: failed to parse nested "
+			   "attributes!");
+		return NL_SKIP;
+	}
+
+	if (!sinfo[NL80211_SURVEY_INFO_NOISE])
+		return NL_SKIP;
+
+	if (!sinfo[NL80211_SURVEY_INFO_FREQUENCY])
+		return NL_SKIP;
+
+	for (i = 0; i < scan_results->num; ++i) {
+		scan_res = scan_results->res[i];
+		if (!scan_res)
+			continue;
+		if (nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]) !=
+		    scan_res->freq)
+			continue;
+		if (!(scan_res->flags & WPA_SCAN_NOISE_INVALID))
+			continue;
+		scan_res->noise = (s8) nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]);
+		scan_res->flags &= ~WPA_SCAN_NOISE_INVALID;
+	}
+
+	return NL_SKIP;
+}
+
+
+static int nl80211_get_noise_for_scan_results(void *priv,
+					      struct wpa_scan_results *scan_res)
+{
+	struct i802_bss *bss = priv;
+	struct wpa_driver_nl80211_data *drv = bss->drv;
+	struct nl_msg *msg;
+
+	msg = nlmsg_alloc();
+	if (!msg)
+		return -ENOMEM;
+
+	genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+		    NLM_F_DUMP, NL80211_CMD_GET_SURVEY, 0);
+
+	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
+
+	return send_and_recv_msgs(drv, msg, get_noise_for_scan_results,
+				  scan_res);
+ nla_put_failure:
+	return -ENOBUFS;
+}
+
+
 static void nl80211_cqm_event(struct wpa_driver_nl80211_data *drv,
 			      struct nlattr *tb[])
 {
@@ -6846,6 +6921,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
 	.set_key = wpa_driver_nl80211_set_key,
 	.scan2 = wpa_driver_nl80211_scan,
 	.get_scan_results2 = wpa_driver_nl80211_get_scan_results,
+	.get_noise_for_scan_results = nl80211_get_noise_for_scan_results,
 	.deauthenticate = wpa_driver_nl80211_deauthenticate,
 	.disassociate = wpa_driver_nl80211_disassociate,
 	.authenticate = wpa_driver_nl80211_authenticate,
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index 79fdddd..b72d23f 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -87,6 +87,14 @@ static inline struct wpa_scan_results * wpa_drv_get_scan_results2(
 	return NULL;
 }
 
+static inline void wpa_drv_get_noise_for_scan_results(
+	struct wpa_supplicant *wpa_s, struct wpa_scan_results *scan_results)
+{
+	if (wpa_s->driver->get_noise_for_scan_results)
+		wpa_s->driver->get_noise_for_scan_results(wpa_s->drv_priv,
+							  scan_results);
+}
+
 static inline int wpa_drv_get_bssid(struct wpa_supplicant *wpa_s, u8 *bssid)
 {
 	if (wpa_s->driver->get_bssid) {
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 7689ff6..c6340ea 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -686,11 +686,15 @@ struct wpabuf * wpa_scan_get_vendor_ie_multi_beacon(
  * better. */
 static int wpa_scan_result_compar(const void *a, const void *b)
 {
+#define IS_5GHZ(n) (n > 4000)
+#define MIN(a,b) a < b ? a : b
+
 	struct wpa_scan_res **_wa = (void *) a;
 	struct wpa_scan_res **_wb = (void *) b;
 	struct wpa_scan_res *wa = *_wa;
 	struct wpa_scan_res *wb = *_wb;
 	int wpa_a, wpa_b, maxrate_a, maxrate_b;
+	int snr_a, snr_b;
 
 	/* WPA/WPA2 support preferred */
 	wpa_a = wpa_scan_get_vendor_ie(wa, WPA_IE_VENDOR_TYPE) != NULL ||
@@ -711,23 +715,36 @@ static int wpa_scan_result_compar(const void *a, const void *b)
 	    (wb->caps & IEEE80211_CAP_PRIVACY) == 0)
 		return -1;
 
-	/* best/max rate preferred if signal level close enough XXX */
-	if ((wa->level && wb->level && abs(wb->level - wa->level) < 5) ||
+	snr_a = MIN(wa->level - wa->noise, GREAT_SNR);
+	snr_b = MIN(wb->level - wb->noise, GREAT_SNR);
+
+        wpa_printf(MSG_DEBUG, "Channel a: freq:%d level:%d noise:%d snr:%d",
+		   wa->freq, wa->level, wa->noise, snr_a);
+        wpa_printf(MSG_DEBUG, "Channel b: freq:%d level:%d noise:%d snr:%d",
+		   wb->freq, wb->level, wb->noise, snr_b);
+
+
+	/* best/max rate preferred if SNR close enough XXX */
+        if ((snr_a && snr_b && abs(snr_b - snr_a) < 5) ||
 	    (wa->qual && wb->qual && abs(wb->qual - wa->qual) < 10)) {
 		maxrate_a = wpa_scan_get_max_rate(wa);
 		maxrate_b = wpa_scan_get_max_rate(wb);
 		if (maxrate_a != maxrate_b)
 			return maxrate_b - maxrate_a;
+		if (IS_5GHZ(wa->freq) ^ IS_5GHZ(wb->freq))
+			return IS_5GHZ(wa->freq) ? -1 : 1;
 	}
 
 	/* use freq for channel preference */
 
-	/* all things being equal, use signal level; if signal levels are
+	/* all things being equal, use SNR; if SNRs are
 	 * identical, use quality values since some drivers may only report
 	 * that value and leave the signal level zero */
-	if (wb->level == wa->level)
+	if (snr_b == snr_a)
 		return wb->qual - wa->qual;
-	return wb->level - wa->level;
+	return snr_b - snr_a;
+#undef MIN
+#undef IS_5GHZ
 }
 
 
@@ -778,7 +795,6 @@ static int wpa_scan_result_wps_compar(const void *a, const void *b)
 }
 #endif /* CONFIG_WPS */
 
-
 /**
  * wpa_supplicant_get_scan_results - Get scan results
  * @wpa_s: Pointer to wpa_supplicant data
@@ -807,6 +823,8 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s,
 		return NULL;
 	}
 
+	wpa_drv_get_noise_for_scan_results(wpa_s, scan_res);
+
 #ifdef CONFIG_WPS
 	if (wpas_wps_in_progress(wpa_s)) {
 		wpa_dbg(wpa_s, MSG_DEBUG, "WPS: Order scan results with WPS "
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index c1a8808..ef5760f 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -29,6 +29,16 @@ extern const char *wpa_supplicant_full_license4;
 extern const char *wpa_supplicant_full_license5;
 #endif /* CONFIG_NO_STDOUT_DEBUG */
 
+/*
+ * Channels with a great SNR can operate at full rate.  What is a great SNR?
+ * This doc https://supportforums.cisco.com/docs/DOC-12954 says, "the general
+ * rule of thumb is that any SNR above 20 is good."  This one
+ * http://www.cisco.com/en/US/tech/tk722/tk809/technologies_q_and_a_item09186a00805e9a96.shtml#qa23
+ * recommends 25 as a minimum SNR for 54 Mbps data rate.  30 is chosen here as a
+ * conservative value.
+ */
+#define GREAT_SNR 30
+
 struct wpa_sm;
 struct wpa_supplicant;
 struct ibss_rsn;
-- 
1.7.3.1



From emailgrant  Mon Aug 15 11:30:37 2011
From: emailgrant (Grant)
Date: Mon, 15 Aug 2011 11:30:37 -0700
Subject: 802.11a/n
In-Reply-To: <20110815130625.GA4770@jm.kir.nu>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110815130625.GA4770@jm.kir.nu>
Message-ID: <CAN0CFw2VLc=i3NBoyWeH1LZowKCKGVDvSu3=E=-NQL1XiA_wTg@mail.gmail.com>

>> I'm using a Ubiquiti SR71-E 802.11abgn card and I've tried specifying
>> many different channels for 802.11a mode but I always get this error:
>>
>> wlan0: IEEE 802.11 Configured channel (36) not found from the channel
>> list of current mode (2) IEEE 802.11a
>> wlan0: IEEE 802.11 Hardware does not support configured channel
>
> It sounds like your card could be calibrated as a world roaming card and
> it does not allow AP mode to be started on 5 GHz channels. You can check
> the available channel list with "iw list". The channels that are marked
> "disabled" or "passive scanning" won't be available for hostapd to use
> in AP mode.

Something must be wrong with the config on my router.  I have two of
these SR71-E cards, one in my laptop and one in my router.  The one in
the laptop says:

# dmesg|grep cfg80211
...
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA for country: US
cfg80211: Calling CRDA to update world regulatory domain
...
# iwlist wlan0 channel
wlan0     20 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 149 : 5.745 GHz
          Channel 153 : 5.765 GHz
          Channel 157 : 5.785 GHz
          Channel 161 : 5.805 GHz
          Channel 165 : 5.825 GHz
          Current Frequency:2.462 GHz (Channel 11)

The one in the router says:

# dmesg|grep cfg80211
cfg80211: Calling CRDA to update world regulatory domain
# iwlist wlan0 channel
wlan0     14 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 14 : 2.484 GHz
          Current Frequency:2.462 GHz (Channel 11)

The thing is, I've tried switching them and the US card when installed
into the router no longer says "cfg80211: Calling CRDA for country:
US".  There must be some kind of a misconfig on the router but I don't
know what it could be.  I think it used to work properly and stated
CRDA US in dmesg on the router.  crda is installed and I have
country_code=US in hostapd.conf.

- Grant


From craigdo  Mon Aug 15 14:55:22 2011
From: craigdo (Craig Dowell)
Date: Mon, 15 Aug 2011 14:55:22 -0700
Subject: Getting Started with Wi-Fi Direct
Message-ID: <1313445329.7081.6.camel@jethro>

Hi All,

I'm interested in experimenting with wi-fi direct on my Fedora 15 box.
I don't have a wireless adapter installed yet, and I am trying to figure
out what is an easily findable (say at Fry's or some Fry's equivalent)
network adapter I can buy that will support wi-fi direct.  I'm
especially interested in getting pre-association discovery working and I
want to experiment with it.

I'm not too thrilled with the prospect of debugging some new unknown
configuration, so any guidance regarding adapters that are known to work
with supplicant 0.8 and Fedora would be greatly appreciated.

If anyone has any generic words of wisdom regarding the process of
getting a card up and working WRT discovery, you would earn the people's
fame and ovation (or at least mine) forever.

Regards,

-- Craig




From emailgrant  Mon Aug 15 15:30:41 2011
From: emailgrant (Grant)
Date: Mon, 15 Aug 2011 15:30:41 -0700
Subject: 802.11a/n
In-Reply-To: <CAN0CFw2VLc=i3NBoyWeH1LZowKCKGVDvSu3=E=-NQL1XiA_wTg@mail.gmail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110815130625.GA4770@jm.kir.nu>
	<CAN0CFw2VLc=i3NBoyWeH1LZowKCKGVDvSu3=E=-NQL1XiA_wTg@mail.gmail.com>
Message-ID: <CAN0CFw3tMB=OMZLXGPFBt6x+OuUTu2vXDay6QirV=7gpGNpVyw@mail.gmail.com>

>>> I'm using a Ubiquiti SR71-E 802.11abgn card and I've tried specifying
>>> many different channels for 802.11a mode but I always get this error:
>>>
>>> wlan0: IEEE 802.11 Configured channel (36) not found from the channel
>>> list of current mode (2) IEEE 802.11a
>>> wlan0: IEEE 802.11 Hardware does not support configured channel
>>
>> It sounds like your card could be calibrated as a world roaming card and
>> it does not allow AP mode to be started on 5 GHz channels. You can check
>> the available channel list with "iw list". The channels that are marked
>> "disabled" or "passive scanning" won't be available for hostapd to use
>> in AP mode.

A lot of the info I gave below is incorrect.  I've been switching
between a bg card and the SR71-E abgn card and I forgot which one I
had installed.  The SR71-E always lists both 2.4Ghz channels and 5Ghz
channels with 'iwlist wlan0 channel' but I always get the "Configured
channel not found from the channel list of current mode" error when
trying to start hostapd with a 5Ghz channel.

- Grant


> Something must be wrong with the config on my router. ?I have two of
> these SR71-E cards, one in my laptop and one in my router. ?The one in
> the laptop says:
>
> # dmesg|grep cfg80211
> ...
> cfg80211: Calling CRDA to update world regulatory domain
> cfg80211: Calling CRDA for country: US
> cfg80211: Calling CRDA to update world regulatory domain
> ...
> # iwlist wlan0 channel
> wlan0 ? ? 20 channels in total; available frequencies :
> ? ? ? ? ?Channel 01 : 2.412 GHz
> ? ? ? ? ?Channel 02 : 2.417 GHz
> ? ? ? ? ?Channel 03 : 2.422 GHz
> ? ? ? ? ?Channel 04 : 2.427 GHz
> ? ? ? ? ?Channel 05 : 2.432 GHz
> ? ? ? ? ?Channel 06 : 2.437 GHz
> ? ? ? ? ?Channel 07 : 2.442 GHz
> ? ? ? ? ?Channel 08 : 2.447 GHz
> ? ? ? ? ?Channel 09 : 2.452 GHz
> ? ? ? ? ?Channel 10 : 2.457 GHz
> ? ? ? ? ?Channel 11 : 2.462 GHz
> ? ? ? ? ?Channel 36 : 5.18 GHz
> ? ? ? ? ?Channel 40 : 5.2 GHz
> ? ? ? ? ?Channel 44 : 5.22 GHz
> ? ? ? ? ?Channel 48 : 5.24 GHz
> ? ? ? ? ?Channel 149 : 5.745 GHz
> ? ? ? ? ?Channel 153 : 5.765 GHz
> ? ? ? ? ?Channel 157 : 5.785 GHz
> ? ? ? ? ?Channel 161 : 5.805 GHz
> ? ? ? ? ?Channel 165 : 5.825 GHz
> ? ? ? ? ?Current Frequency:2.462 GHz (Channel 11)
>
> The one in the router says:
>
> # dmesg|grep cfg80211
> cfg80211: Calling CRDA to update world regulatory domain
> # iwlist wlan0 channel
> wlan0 ? ? 14 channels in total; available frequencies :
> ? ? ? ? ?Channel 01 : 2.412 GHz
> ? ? ? ? ?Channel 02 : 2.417 GHz
> ? ? ? ? ?Channel 03 : 2.422 GHz
> ? ? ? ? ?Channel 04 : 2.427 GHz
> ? ? ? ? ?Channel 05 : 2.432 GHz
> ? ? ? ? ?Channel 06 : 2.437 GHz
> ? ? ? ? ?Channel 07 : 2.442 GHz
> ? ? ? ? ?Channel 08 : 2.447 GHz
> ? ? ? ? ?Channel 09 : 2.452 GHz
> ? ? ? ? ?Channel 10 : 2.457 GHz
> ? ? ? ? ?Channel 11 : 2.462 GHz
> ? ? ? ? ?Channel 12 : 2.467 GHz
> ? ? ? ? ?Channel 13 : 2.472 GHz
> ? ? ? ? ?Channel 14 : 2.484 GHz
> ? ? ? ? ?Current Frequency:2.462 GHz (Channel 11)
>
> The thing is, I've tried switching them and the US card when installed
> into the router no longer says "cfg80211: Calling CRDA for country:
> US". ?There must be some kind of a misconfig on the router but I don't
> know what it could be. ?I think it used to work properly and stated
> CRDA US in dmesg on the router. ?crda is installed and I have
> country_code=US in hostapd.conf.
>
> - Grant


From dcbw  Mon Aug 15 15:37:01 2011
From: dcbw (Dan Williams)
Date: Mon, 15 Aug 2011 17:37:01 -0500
Subject: [PATCH] dbus: Raise PropertiesChanged on
	org.freedesktop.DBus.Properties
In-Reply-To: <20110810165206.4A41D9D401C@zog.reactivated.net>
References: <20110810165206.4A41D9D401C@zog.reactivated.net>
Message-ID: <1313447822.6103.8.camel@dcbw.foobar.com>

On Wed, 2011-08-10 at 17:52 +0100, Daniel Drake wrote:
> wpa_supplicant dbus objects are currently difficult to use with
> GDBusProxy. This is because they do not follow the dbus standard in
> emitting the PropertiesChanged signal on the standard D-Bus properties
> interface, so GDBusProxy stores stale property values.
> 
> Fix this by raising PropertiesChanged on the standard interface.
> For backwards compatibility, the existing custom PropertiesChanged
> signals are not removed; I anticipate them being removed in a future
> major release.
> 
> See
> http://lists.freedesktop.org/archives/dbus/2011-August/014593.html
> for more info.
> 
> Signed-off-by: Daniel Drake <dsd at laptop.org>

Looks good to me...

Dan

> ---
>  wpa_supplicant/dbus/dbus_new.c         |    5 ++
>  wpa_supplicant/dbus/dbus_new_helpers.c |   79 ++++++++++++++++++++++++++++++--
>  2 files changed, 80 insertions(+), 4 deletions(-)
> 
> diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
> index e488937..1f56aba 100644
> --- a/wpa_supplicant/dbus/dbus_new.c
> +++ b/wpa_supplicant/dbus/dbus_new.c
> @@ -1697,6 +1697,7 @@ static const struct wpa_dbus_signal_desc wpas_dbus_global_signals[] = {
>  		  END_ARGS
>  	  }
>  	},
> +	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
>  	{ "PropertiesChanged", WPAS_DBUS_NEW_INTERFACE,
>  	  {
>  		  { "properties", "a{sv}", ARG_OUT },
> @@ -1785,6 +1786,7 @@ static const struct wpa_dbus_property_desc wpas_dbus_network_properties[] = {
>  
> 
>  static const struct wpa_dbus_signal_desc wpas_dbus_network_signals[] = {
> +	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
>  	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_NETWORK,
>  	  {
>  		  { "properties", "a{sv}", ARG_OUT },
> @@ -1962,6 +1964,7 @@ static const struct wpa_dbus_property_desc wpas_dbus_bss_properties[] = {
>  
> 
>  static const struct wpa_dbus_signal_desc wpas_dbus_bss_signals[] = {
> +	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
>  	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_BSS,
>  	  {
>  		  { "properties", "a{sv}", ARG_OUT },
> @@ -2486,6 +2489,7 @@ static const struct wpa_dbus_signal_desc wpas_dbus_interface_signals[] = {
>  		  END_ARGS
>  	  }
>  	},
> +	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
>  	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_INTERFACE,
>  	  {
>  		  { "properties", "a{sv}", ARG_OUT },
> @@ -2506,6 +2510,7 @@ static const struct wpa_dbus_signal_desc wpas_dbus_interface_signals[] = {
>  		  END_ARGS
>  	  }
>  	},
> +	/* Deprecated - use org.freedesktop.DBus.Properties.PropertiesChanged */
>  	{ "PropertiesChanged", WPAS_DBUS_NEW_IFACE_WPS,
>  	  {
>  		  { "properties", "a{sv}", ARG_OUT },
> diff --git a/wpa_supplicant/dbus/dbus_new_helpers.c b/wpa_supplicant/dbus/dbus_new_helpers.c
> index 342ad2d..4c1db88 100644
> --- a/wpa_supplicant/dbus/dbus_new_helpers.c
> +++ b/wpa_supplicant/dbus/dbus_new_helpers.c
> @@ -610,7 +610,7 @@ int wpa_dbus_unregister_object_per_iface(
>  
>  static dbus_bool_t put_changed_properties(
>  	const struct wpa_dbus_object_desc *obj_dsc, const char *interface,
> -	DBusMessageIter *dict_iter)
> +	DBusMessageIter *dict_iter, int clear_changed)
>  {
>  	DBusMessageIter entry_iter;
>  	const struct wpa_dbus_property_desc *dsc;
> @@ -624,7 +624,8 @@ static dbus_bool_t put_changed_properties(
>  			continue;
>  		if (os_strcmp(dsc->dbus_interface, interface) != 0)
>  			continue;
> -		obj_dsc->prop_changed_flags[i] = 0;
> +		if (clear_changed)
> +			obj_dsc->prop_changed_flags[i] = 0;
>  
>  		if (!dbus_message_iter_open_container(dict_iter,
>  						      DBUS_TYPE_DICT_ENTRY,
> @@ -660,7 +661,56 @@ static dbus_bool_t put_changed_properties(
>  }
>  
> 
> -static void send_prop_changed_signal(
> +static void do_send_prop_changed_signal(
> +	DBusConnection *con, const char *path, const char *interface,
> +	const struct wpa_dbus_object_desc *obj_dsc)
> +{
> +	DBusMessage *msg;
> +	DBusMessageIter signal_iter, dict_iter;
> +
> +	msg = dbus_message_new_signal(path, DBUS_INTERFACE_PROPERTIES,
> +				      "PropertiesChanged");
> +	if (msg == NULL)
> +		return;
> +
> +	dbus_message_iter_init_append(msg, &signal_iter);
> +
> +	if (!dbus_message_iter_append_basic(&signal_iter, DBUS_TYPE_STRING,
> +					    &interface))
> +		goto err;
> +
> +	/* Changed properties dict */
> +	if (!dbus_message_iter_open_container(&signal_iter, DBUS_TYPE_ARRAY,
> +					      "{sv}", &dict_iter))
> +		goto err;
> +
> +	if (!put_changed_properties(obj_dsc, interface, &dict_iter, 0))
> +		goto err;
> +
> +	if (!dbus_message_iter_close_container(&signal_iter, &dict_iter))
> +		goto err;
> +
> +	/* Invalidated properties array (empty) */
> +	if (!dbus_message_iter_open_container(&signal_iter, DBUS_TYPE_ARRAY,
> +					      "s", &dict_iter))
> +		goto err;
> +
> +	if (!dbus_message_iter_close_container(&signal_iter, &dict_iter))
> +		goto err;
> +
> +	dbus_connection_send(con, msg, NULL);
> +
> +out:
> +	dbus_message_unref(msg);
> +	return;
> +
> +err:
> +	wpa_printf(MSG_DEBUG, "dbus: %s: Failed to construct signal",
> +		   __func__);
> +	goto out;
> +}
> +
> +static void do_send_deprecated_prop_changed_signal(
>  	DBusConnection *con, const char *path, const char *interface,
>  	const struct wpa_dbus_object_desc *obj_dsc)
>  {
> @@ -677,7 +727,7 @@ static void send_prop_changed_signal(
>  					      "{sv}", &dict_iter))
>  		goto err;
>  
> -	if (!put_changed_properties(obj_dsc, interface, &dict_iter))
> +	if (!put_changed_properties(obj_dsc, interface, &dict_iter, 1))
>  		goto err;
>  
>  	if (!dbus_message_iter_close_container(&signal_iter, &dict_iter))
> @@ -695,6 +745,27 @@ err:
>  	goto out;
>  }
>  
> +static void send_prop_changed_signal(
> +	DBusConnection *con, const char *path, const char *interface,
> +	const struct wpa_dbus_object_desc *obj_dsc)
> +{
> +	/*
> +	 * First, send property change notification on the standardized
> +	 * org.freedesktop.DBus.Properties interface. This call will not
> +	 * clear the property change bits, so that they are preserved for
> +	 * the call that follows.
> +	 */
> +	do_send_prop_changed_signal(con, path, interface, obj_dsc);
> +
> +	/*
> +	 * Now send PropertiesChanged on our own interface for backwards
> +	 * compatibility. This is deprecated and will be removed in a future
> +	 * release.
> +	 */
> +	do_send_deprecated_prop_changed_signal(con, path, interface, obj_dsc);
> +
> +	/* Property change bits have now been cleared. */
> +}
>  
>  static void flush_object_timeout_handler(void *eloop_ctx, void *timeout_ctx)
>  {




From dcbw  Mon Aug 15 15:41:46 2011
From: dcbw (Dan Williams)
Date: Mon, 15 Aug 2011 17:41:46 -0500
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz
	networks.
In-Reply-To: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
References: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
Message-ID: <1313448107.6103.12.camel@dcbw.foobar.com>

On Fri, 2011-08-05 at 16:23 -0700, Gary Morain wrote:
> In scan.c, merge a channel's noise value into the scan results.  When comparing
> scan results, compute the signal-to-noise ratio and use it when available.
> Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR is
> relatively close to the other network's.

Honestly I'd rather have something like a "bands" option on a
per-netblock basis, so you could do this:

bands=5
bands=5,2
bands=2,5
bands=2

ie, the connection manager can set whichever band it prefers, or leave
it out entirely to let the supplicant do whatever it's already doing.
The problem with micro-optimizations like this are that they often
break, and they aren't necessarily clear.  I'd advocate for simpler,
clearer rules here, with behavior set by the connection manager, rather
than continually more complicated matching rules in the supplicant
itself...

Dan

> ---
>  src/drivers/driver.h              |   15 +++++++
>  src/drivers/driver_nl80211.c      |   76 +++++++++++++++++++++++++++++++++++++
>  wpa_supplicant/driver_i.h         |    8 ++++
>  wpa_supplicant/scan.c             |   30 ++++++++++++---
>  wpa_supplicant/wpa_supplicant_i.h |   10 +++++
>  5 files changed, 133 insertions(+), 6 deletions(-)
> 
> diff --git a/src/drivers/driver.h b/src/drivers/driver.h
> index e2d0f8b..1c118fb 100644
> --- a/src/drivers/driver.h
> +++ b/src/drivers/driver.h
> @@ -1250,6 +1250,21 @@ struct wpa_driver_ops {
>  	 struct wpa_scan_results * (*get_scan_results2)(void *priv);
>  
>  	/**
> +	 * get_noise_for_scan_results - Sets the 'noise' field of struct
> +	 * wpa_scan_res
> +	 * @priv: private driver interface data
> +	 * @scan_results: Can results obtained through get_scan_results2.
> +	 *
> +	 * This function gets the survey results from the driver.  For each
> +	 * frequency in the scan results, the noise is updated if the survey
> +	 * results have a noise value for that frequency.
> +	 *
> +	 * Returns: 0 on success. -1 on failure.
> +	 */
> +	int (*get_noise_for_scan_results)(void *priv,
> +					  struct wpa_scan_results *scan_results);
> +
> +	/**
>  	 * set_country - Set country
>  	 * @priv: Private driver interface data
>  	 * @alpha2: country to which to switch to
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> index 1cb2196..2501685 100644
> --- a/src/drivers/driver_nl80211.c
> +++ b/src/drivers/driver_nl80211.c
> @@ -1278,6 +1278,81 @@ static int nl80211_get_link_noise(struct wpa_driver_nl80211_data *drv,
>  }
>  
> 
> +static int get_noise_for_scan_results(struct nl_msg *msg, void *arg)
> +{
> +	struct nlattr *tb[NL80211_ATTR_MAX + 1];
> +	struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
> +	struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1];
> +	static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = {
> +		[NL80211_SURVEY_INFO_FREQUENCY] = { .type = NLA_U32 },
> +		[NL80211_SURVEY_INFO_NOISE] = { .type = NLA_U8 },
> +	};
> +	struct wpa_scan_results *scan_results = arg;
> +	struct wpa_scan_res *scan_res;
> +	size_t i;
> +
> +	nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
> +		  genlmsg_attrlen(gnlh, 0), NULL);
> +
> +	if (!tb[NL80211_ATTR_SURVEY_INFO]) {
> +		wpa_printf(MSG_DEBUG, "nl80211: survey data missing!");
> +		return NL_SKIP;
> +	}
> +
> +	if (nla_parse_nested(sinfo, NL80211_SURVEY_INFO_MAX,
> +			     tb[NL80211_ATTR_SURVEY_INFO],
> +			     survey_policy)) {
> +		wpa_printf(MSG_DEBUG, "nl80211: failed to parse nested "
> +			   "attributes!");
> +		return NL_SKIP;
> +	}
> +
> +	if (!sinfo[NL80211_SURVEY_INFO_NOISE])
> +		return NL_SKIP;
> +
> +	if (!sinfo[NL80211_SURVEY_INFO_FREQUENCY])
> +		return NL_SKIP;
> +
> +	for (i = 0; i < scan_results->num; ++i) {
> +		scan_res = scan_results->res[i];
> +		if (!scan_res)
> +			continue;
> +		if (nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]) !=
> +		    scan_res->freq)
> +			continue;
> +		if (!(scan_res->flags & WPA_SCAN_NOISE_INVALID))
> +			continue;
> +		scan_res->noise = (s8) nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]);
> +		scan_res->flags &= ~WPA_SCAN_NOISE_INVALID;
> +	}
> +
> +	return NL_SKIP;
> +}
> +
> +
> +static int nl80211_get_noise_for_scan_results(void *priv,
> +					      struct wpa_scan_results *scan_res)
> +{
> +	struct i802_bss *bss = priv;
> +	struct wpa_driver_nl80211_data *drv = bss->drv;
> +	struct nl_msg *msg;
> +
> +	msg = nlmsg_alloc();
> +	if (!msg)
> +		return -ENOMEM;
> +
> +	genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
> +		    NLM_F_DUMP, NL80211_CMD_GET_SURVEY, 0);
> +
> +	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
> +
> +	return send_and_recv_msgs(drv, msg, get_noise_for_scan_results,
> +				  scan_res);
> + nla_put_failure:
> +	return -ENOBUFS;
> +}
> +
> +
>  static void nl80211_cqm_event(struct wpa_driver_nl80211_data *drv,
>  			      struct nlattr *tb[])
>  {
> @@ -6846,6 +6921,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
>  	.set_key = wpa_driver_nl80211_set_key,
>  	.scan2 = wpa_driver_nl80211_scan,
>  	.get_scan_results2 = wpa_driver_nl80211_get_scan_results,
> +	.get_noise_for_scan_results = nl80211_get_noise_for_scan_results,
>  	.deauthenticate = wpa_driver_nl80211_deauthenticate,
>  	.disassociate = wpa_driver_nl80211_disassociate,
>  	.authenticate = wpa_driver_nl80211_authenticate,
> diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
> index 79fdddd..b72d23f 100644
> --- a/wpa_supplicant/driver_i.h
> +++ b/wpa_supplicant/driver_i.h
> @@ -87,6 +87,14 @@ static inline struct wpa_scan_results * wpa_drv_get_scan_results2(
>  	return NULL;
>  }
>  
> +static inline void wpa_drv_get_noise_for_scan_results(
> +	struct wpa_supplicant *wpa_s, struct wpa_scan_results *scan_results)
> +{
> +	if (wpa_s->driver->get_noise_for_scan_results)
> +		wpa_s->driver->get_noise_for_scan_results(wpa_s->drv_priv,
> +							  scan_results);
> +}
> +
>  static inline int wpa_drv_get_bssid(struct wpa_supplicant *wpa_s, u8 *bssid)
>  {
>  	if (wpa_s->driver->get_bssid) {
> diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
> index 7689ff6..c6340ea 100644
> --- a/wpa_supplicant/scan.c
> +++ b/wpa_supplicant/scan.c
> @@ -686,11 +686,15 @@ struct wpabuf * wpa_scan_get_vendor_ie_multi_beacon(
>   * better. */
>  static int wpa_scan_result_compar(const void *a, const void *b)
>  {
> +#define IS_5GHZ(n) (n > 4000)
> +#define MIN(a,b) a < b ? a : b
> +
>  	struct wpa_scan_res **_wa = (void *) a;
>  	struct wpa_scan_res **_wb = (void *) b;
>  	struct wpa_scan_res *wa = *_wa;
>  	struct wpa_scan_res *wb = *_wb;
>  	int wpa_a, wpa_b, maxrate_a, maxrate_b;
> +	int snr_a, snr_b;
>  
>  	/* WPA/WPA2 support preferred */
>  	wpa_a = wpa_scan_get_vendor_ie(wa, WPA_IE_VENDOR_TYPE) != NULL ||
> @@ -711,23 +715,36 @@ static int wpa_scan_result_compar(const void *a, const void *b)
>  	    (wb->caps & IEEE80211_CAP_PRIVACY) == 0)
>  		return -1;
>  
> -	/* best/max rate preferred if signal level close enough XXX */
> -	if ((wa->level && wb->level && abs(wb->level - wa->level) < 5) ||
> +	snr_a = MIN(wa->level - wa->noise, GREAT_SNR);
> +	snr_b = MIN(wb->level - wb->noise, GREAT_SNR);
> +
> +        wpa_printf(MSG_DEBUG, "Channel a: freq:%d level:%d noise:%d snr:%d",
> +		   wa->freq, wa->level, wa->noise, snr_a);
> +        wpa_printf(MSG_DEBUG, "Channel b: freq:%d level:%d noise:%d snr:%d",
> +		   wb->freq, wb->level, wb->noise, snr_b);
> +
> +
> +	/* best/max rate preferred if SNR close enough XXX */
> +        if ((snr_a && snr_b && abs(snr_b - snr_a) < 5) ||
>  	    (wa->qual && wb->qual && abs(wb->qual - wa->qual) < 10)) {
>  		maxrate_a = wpa_scan_get_max_rate(wa);
>  		maxrate_b = wpa_scan_get_max_rate(wb);
>  		if (maxrate_a != maxrate_b)
>  			return maxrate_b - maxrate_a;
> +		if (IS_5GHZ(wa->freq) ^ IS_5GHZ(wb->freq))
> +			return IS_5GHZ(wa->freq) ? -1 : 1;
>  	}
>  
>  	/* use freq for channel preference */
>  
> -	/* all things being equal, use signal level; if signal levels are
> +	/* all things being equal, use SNR; if SNRs are
>  	 * identical, use quality values since some drivers may only report
>  	 * that value and leave the signal level zero */
> -	if (wb->level == wa->level)
> +	if (snr_b == snr_a)
>  		return wb->qual - wa->qual;
> -	return wb->level - wa->level;
> +	return snr_b - snr_a;
> +#undef MIN
> +#undef IS_5GHZ
>  }
>  
> 
> @@ -778,7 +795,6 @@ static int wpa_scan_result_wps_compar(const void *a, const void *b)
>  }
>  #endif /* CONFIG_WPS */
>  
> -
>  /**
>   * wpa_supplicant_get_scan_results - Get scan results
>   * @wpa_s: Pointer to wpa_supplicant data
> @@ -807,6 +823,8 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s,
>  		return NULL;
>  	}
>  
> +	wpa_drv_get_noise_for_scan_results(wpa_s, scan_res);
> +
>  #ifdef CONFIG_WPS
>  	if (wpas_wps_in_progress(wpa_s)) {
>  		wpa_dbg(wpa_s, MSG_DEBUG, "WPS: Order scan results with WPS "
> diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
> index c1a8808..ef5760f 100644
> --- a/wpa_supplicant/wpa_supplicant_i.h
> +++ b/wpa_supplicant/wpa_supplicant_i.h
> @@ -29,6 +29,16 @@ extern const char *wpa_supplicant_full_license4;
>  extern const char *wpa_supplicant_full_license5;
>  #endif /* CONFIG_NO_STDOUT_DEBUG */
>  
> +/*
> + * Channels with a great SNR can operate at full rate.  What is a great SNR?
> + * This doc https://supportforums.cisco.com/docs/DOC-12954 says, "the general
> + * rule of thumb is that any SNR above 20 is good."  This one
> + * http://www.cisco.com/en/US/tech/tk722/tk809/technologies_q_and_a_item09186a00805e9a96.shtml#qa23
> + * recommends 25 as a minimum SNR for 54 Mbps data rate.  30 is chosen here as a
> + * conservative value.
> + */
> +#define GREAT_SNR 30
> +
>  struct wpa_sm;
>  struct wpa_supplicant;
>  struct ibss_rsn;




From j  Mon Aug 15 21:34:31 2011
From: j (Jouni Malinen)
Date: Mon, 15 Aug 2011 21:34:31 -0700
Subject: 802.11a/n
In-Reply-To: <CAN0CFw3tMB=OMZLXGPFBt6x+OuUTu2vXDay6QirV=7gpGNpVyw@mail.gmail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110815130625.GA4770@jm.kir.nu>
	<CAN0CFw2VLc=i3NBoyWeH1LZowKCKGVDvSu3=E=-NQL1XiA_wTg@mail.gmail.com>
	<CAN0CFw3tMB=OMZLXGPFBt6x+OuUTu2vXDay6QirV=7gpGNpVyw@mail.gmail.com>
Message-ID: <20110816043431.GA3124@jm.kir.nu>

On Mon, Aug 15, 2011 at 03:30:41PM -0700, Grant wrote:
> A lot of the info I gave below is incorrect.  I've been switching
> between a bg card and the SR71-E abgn card and I forgot which one I
> had installed.  The SR71-E always lists both 2.4Ghz channels and 5Ghz
> channels with 'iwlist wlan0 channel' but I always get the "Configured
> channel not found from the channel list of current mode" error when
> trying to start hostapd with a 5Ghz channel.

iwlist is an old tool that does not give the needed channel information;
you'll need to use iw (e.g., "iw list") for that. The 5 GHz channels in
the iwlist output are likely enabled only for station mode operations.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Mon Aug 15 21:38:17 2011
From: j (Jouni Malinen)
Date: Mon, 15 Aug 2011 21:38:17 -0700
Subject: Relevance of GTK key index?
In-Reply-To: <CAJ8GFOh2RD_DeTe-MMHAKCufy1fNRN_w96feCfZ_nHSEY0BbOg@mail.gmail.com>
References: <CAJ8GFOh2RD_DeTe-MMHAKCufy1fNRN_w96feCfZ_nHSEY0BbOg@mail.gmail.com>
Message-ID: <20110816043817.GB3124@jm.kir.nu>

On Fri, Aug 12, 2011 at 01:03:19PM -0500, Harshal Chhaya wrote:
> I am seeing that my clients have problems if the GTK is at index 2 but
> connect just fine if the GTK is at index 1. The connection manager on
> these clients (custom code), restarts the connection process if the
> GTK is at index 2 because it seems that the radio firmware expects the
> GTK at index 1. After a few such tries, the connection succeeds
> because hostapd somehow switches the GTK index to 1 and my connection
> manager is happy.

Which client card/driver/supplicant is this? It's horribly broken if it
is unable to use key index 2 for the GTK.

> I am trying to understand what causes hostapd to use a different index
> and if I can influence it to use index 1 to start with? This will
> avoid all the retries and improve the connection time.

Fixing the client would be the solution here.. Two key indexes are used
to allow the GTKs to be switched in a coordinated way with multiple
stations in the network.

-- 
Jouni Malinen                                            PGP id EFC895FA


From emailgrant  Mon Aug 15 22:03:00 2011
From: emailgrant (Grant)
Date: Mon, 15 Aug 2011 22:03:00 -0700
Subject: 802.11a/n
In-Reply-To: <20110816043431.GA3124@jm.kir.nu>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110815130625.GA4770@jm.kir.nu>
	<CAN0CFw2VLc=i3NBoyWeH1LZowKCKGVDvSu3=E=-NQL1XiA_wTg@mail.gmail.com>
	<CAN0CFw3tMB=OMZLXGPFBt6x+OuUTu2vXDay6QirV=7gpGNpVyw@mail.gmail.com>
	<20110816043431.GA3124@jm.kir.nu>
Message-ID: <CAN0CFw0nYtwynRv3Pzj9mit4WzqNUL+BwpghCZUxbEKPFPeKaA@mail.gmail.com>

>> A lot of the info I gave below is incorrect. ?I've been switching
>> between a bg card and the SR71-E abgn card and I forgot which one I
>> had installed. ?The SR71-E always lists both 2.4Ghz channels and 5Ghz
>> channels with 'iwlist wlan0 channel' but I always get the "Configured
>> channel not found from the channel list of current mode" error when
>> trying to start hostapd with a 5Ghz channel.
>
> iwlist is an old tool that does not give the needed channel information;
> you'll need to use iw (e.g., "iw list") for that. The 5 GHz channels in
> the iwlist output are likely enabled only for station mode operations.

Thank you.  I get the following, it looks like the 5Ghz channels should work?

# iw list
Wiphy phy0
	Band 1:
		Capabilities: 0x11ce
			HT20/HT40
			SM Power Save disabled
			RX HT40 SGI
			TX STBC
			RX STBC 1-stream
			Max AMSDU length: 3839 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 8 usec (0x06)
		HT TX/RX MCS rate indexes supported: 0-15
		Frequencies:
			* 2412 MHz [1] (19.0 dBm)
			* 2417 MHz [2] (19.0 dBm)
			* 2422 MHz [3] (19.0 dBm)
			* 2427 MHz [4] (19.0 dBm)
			* 2432 MHz [5] (19.0 dBm)
			* 2437 MHz [6] (19.0 dBm)
			* 2442 MHz [7] (19.0 dBm)
			* 2447 MHz [8] (19.0 dBm)
			* 2452 MHz [9] (19.0 dBm)
			* 2457 MHz [10] (19.0 dBm)
			* 2462 MHz [11] (19.0 dBm)
			* 2467 MHz [12] (disabled)
			* 2472 MHz [13] (disabled)
			* 2484 MHz [14] (disabled)
		Bitrates (non-HT):
			* 1.0 Mbps
			* 2.0 Mbps (short preamble supported)
			* 5.5 Mbps (short preamble supported)
			* 11.0 Mbps (short preamble supported)
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
	Band 2:
		Capabilities: 0x11ce
			HT20/HT40
			SM Power Save disabled
			RX HT40 SGI
			TX STBC
			RX STBC 1-stream
			Max AMSDU length: 3839 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 8 usec (0x06)
		HT TX/RX MCS rate indexes supported: 0-15
		Frequencies:
			* 5180 MHz [36] (19.0 dBm) (passive scanning, no IBSS)
			* 5200 MHz [40] (19.0 dBm) (passive scanning, no IBSS)
			* 5220 MHz [44] (19.0 dBm) (passive scanning, no IBSS)
			* 5240 MHz [48] (19.0 dBm) (passive scanning, no IBSS)
			* 5260 MHz [52] (disabled)
			* 5280 MHz [56] (disabled)
			* 5300 MHz [60] (disabled)
			* 5320 MHz [64] (disabled)
			* 5500 MHz [100] (disabled)
			* 5520 MHz [104] (disabled)
			* 5540 MHz [108] (disabled)
			* 5560 MHz [112] (disabled)
			* 5580 MHz [116] (disabled)
			* 5600 MHz [120] (disabled)
			* 5620 MHz [124] (disabled)
			* 5640 MHz [128] (disabled)
			* 5660 MHz [132] (disabled)
			* 5680 MHz [136] (disabled)
			* 5700 MHz [140] (disabled)
			* 5745 MHz [149] (19.0 dBm) (passive scanning, no IBSS)
			* 5765 MHz [153] (19.0 dBm) (passive scanning, no IBSS)
			* 5785 MHz [157] (19.0 dBm) (passive scanning, no IBSS)
			* 5805 MHz [161] (19.0 dBm) (passive scanning, no IBSS)
			* 5825 MHz [165] (19.0 dBm) (passive scanning, no IBSS)
		Bitrates (non-HT):
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
	max # scan SSIDs: 4
	max scan IEs length: 2257 bytes
	Coverage class: 0 (up to 0m)
	Available Antennas: TX 0 RX 0
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * WDS
		 * monitor
		 * P2P-client
		 * P2P-GO
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * new_beacon
		 * new_station
		 * set_bss
		 * authenticate
		 * associate
		 * deauthenticate
		 * disassociate
		 * join_ibss
		 * remain_on_channel
		 * set_tx_bitrate_mask
		 * action
		 * frame_wait_cancel
		 * set_wiphy_netns
		 * set_channel
		 * set_wds_peer
		 * connect
		 * disconnect
	Supported TX frame types:
		 * IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070
0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070
0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070
0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070
0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070
0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
	Supported RX frame types:
		 * IBSS: 0x00d0
		 * managed: 0x0040 0x00d0
		 * AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * mesh point: 0x00d0
		 * P2P-client: 0x0040 0x00d0
		 * P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0

- Grant


From jean-michelx.bachot  Tue Aug 16 01:15:41 2011
From: jean-michelx.bachot (Jean-Michel Bachot)
Date: Tue, 16 Aug 2011 10:15:41 +0200
Subject: [PATCH] [PATCH] Unexpected Pending Provision Discovery Request sent
	in search phase
Message-ID: <1313482541-24856-1-git-send-email-jean-michelx.bachot@intel.com>

From: Jean-Michel.Bachot <jean-michelx.bachot at intel.com>

A Pending Provision Discovery Request was sent in SEARCH phase after
a  previous provision discovery timeout failure occurs.
Fix it by resetting the config method of p2p device in the pending pd
reset function.It avoids to send a Pending Provision Discovery Request
during the next p2p scan.

Change-Id: I7c55ebcfeb3b34790c408b67b8c634ba9f799e19

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot at intel.com>
---
 src/p2p/p2p_pd.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 348b338..9ff7a91 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -388,6 +388,19 @@ int p2p_prov_disc_req(struct p2p_data *p2p, const u8 *peer_addr,
 
 void p2p_reset_pending_pd(struct p2p_data *p2p)
 {
+	struct p2p_device *dev;
+
+	dl_list_for_each(dev, &p2p->devices, struct p2p_device, list) {
+		if (os_memcmp(p2p->pending_pd_devaddr,
+			      dev->info.p2p_device_addr, ETH_ALEN))
+			continue;
+		if (!dev->req_config_methods)
+			continue;
+		if (dev->flags & P2P_DEV_PD_FOR_JOIN)
+			continue;
+		/* Reset the config methods of the device*/
+		dev->req_config_methods = 0;
+	}
 	p2p->user_initiated_pd = 0;
 	os_memset(p2p->pending_pd_devaddr, 0, ETH_ALEN);
 	p2p->pd_retries = 0;
-- 
1.7.0.4

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



From lists  Tue Aug 16 02:51:04 2011
From: lists (Ed W)
Date: Tue, 16 Aug 2011 10:51:04 +0100
Subject: How to get debugging output? Prob with AP and wistron CM9
Message-ID: <4E4A3D88.2010809@wildgooses.com>

Hi, I am having some problems getting any debugging info out of hostapd
0.7.3 (uclibc+busybox) when there are some kind of startup issues

For example I had a working setup with an ath 5414 card and two bss.  I
swapped the card for a CM9 and at that point hostapd exits at startup
with no output (neither syslog nor console)?

I tried strace, but I didn't see anything that looked like an error (but
not sure what I should look for)

Finally I tried disabling the additional bss in my config file and now
hostapd bursts into life...

I'm having a similar problems while trying to get a working config, eg I
changed the wpa_passphrase to something innocuous and again I got the
same symptoms - no output, just fails to startup?

Q: Is there some other way to get debug output when hostapd has problems
starting up? (I'm already using -dd on the command line, and debugging
at max in the config file)

Q: Does someone know if it's a documented limitation of the CM9
(ath5213a I think?) that it doesn't support multiple BSS? Any opinions
on the CM9 vs ath5414 cards? (I have had some success with Compex
WLM54SAG23, considering Wistron DCMA81?)

Thanks for any hints

Ed W


From FLamorce  Tue Aug 16 05:57:34 2011
From: FLamorce (=?iso-8859-1?Q?Fr=E9d=E9ric_Lamorce?=)
Date: Tue, 16 Aug 2011 05:57:34 -0700
Subject: Advertised speed is 0 with hostapd
Message-ID: <8BFC9A1FBD4CFA4FA7496C9F6DBCF4CA0DC717FBF2@oxn-mx01.PD.CalAmpCorp.com>

Hello,

On my laptop when I browse the available networks, it displays the speed of them like 54, 130, 300, etc.

But with the AP I am developing it is displayed at 0, I can connect to the AP and have an IP address (I didn't do speed test) so it is working.

I am using linux 2.6 on an ARM, with compat-wireless driver (ath9k_htc), hostapd 0.7.3

My hostapd.conf is like this:

wme_enabled=1
ieee80211n=1
ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40]
interface=wlan0
driver=nl80211
ssid=test
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=wireless
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


Any idea of what field I have to use to have a properly advertised speed?

Thanks in advance, Fr?d?ric.



From chunkeey  Tue Aug 16 06:25:18 2011
From: chunkeey (Christian Lamparter)
Date: Tue, 16 Aug 2011 15:25:18 +0200
Subject: Advertised speed is 0 with hostapd
In-Reply-To: <8BFC9A1FBD4CFA4FA7496C9F6DBCF4CA0DC717FBF2@oxn-mx01.PD.CalAmpCorp.com>
References: <8BFC9A1FBD4CFA4FA7496C9F6DBCF4CA0DC717FBF2@oxn-mx01.PD.CalAmpCorp.com>
Message-ID: <201108161525.18147.chunkeey@googlemail.com>

On Tuesday, August 16, 2011 02:57:34 PM Fr?d?ric Lamorce wrote:
> On my laptop when I browse the available networks, it displays the
> speed of them like 54, 130, 300, etc.
> 
> But with the AP I am developing it is displayed at 0, I can connect
> to the AP and have an IP address (I didn't do speed test) so it is
> working.
maybe... Do you use 
	iw dev wlan0 station dump

by chance?

Regards,
	Chr


From j  Tue Aug 16 06:33:12 2011
From: j (Jouni Malinen)
Date: Tue, 16 Aug 2011 06:33:12 -0700
Subject: 802.11a/n
In-Reply-To: <CAN0CFw0nYtwynRv3Pzj9mit4WzqNUL+BwpghCZUxbEKPFPeKaA@mail.gmail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110815130625.GA4770@jm.kir.nu>
	<CAN0CFw2VLc=i3NBoyWeH1LZowKCKGVDvSu3=E=-NQL1XiA_wTg@mail.gmail.com>
	<CAN0CFw3tMB=OMZLXGPFBt6x+OuUTu2vXDay6QirV=7gpGNpVyw@mail.gmail.com>
	<20110816043431.GA3124@jm.kir.nu>
	<CAN0CFw0nYtwynRv3Pzj9mit4WzqNUL+BwpghCZUxbEKPFPeKaA@mail.gmail.com>
Message-ID: <20110816133312.GA4895@jm.kir.nu>

On Mon, Aug 15, 2011 at 10:03:00PM -0700, Grant wrote:

> Thank you.  I get the following, it looks like the 5Ghz channels should work?

In station mode, but not in AP mode:

> 			* 5180 MHz [36] (19.0 dBm) (passive scanning, no IBSS)
> 			* 5200 MHz [40] (19.0 dBm) (passive scanning, no IBSS)
> 			* 5220 MHz [44] (19.0 dBm) (passive scanning, no IBSS)
> 			* 5240 MHz [48] (19.0 dBm) (passive scanning, no IBSS)

Those are fine in modes that passively search an AP and connect to it.
However, they are not available for starting an AP (or IBSS).

> 			* 5260 MHz [52] (disabled)

And those are disabled completely.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Tue Aug 16 06:34:47 2011
From: j (Jouni Malinen)
Date: Tue, 16 Aug 2011 06:34:47 -0700
Subject: Advertised speed is 0 with hostapd
In-Reply-To: <8BFC9A1FBD4CFA4FA7496C9F6DBCF4CA0DC717FBF2@oxn-mx01.PD.CalAmpCorp.com>
References: <8BFC9A1FBD4CFA4FA7496C9F6DBCF4CA0DC717FBF2@oxn-mx01.PD.CalAmpCorp.com>
Message-ID: <20110816133447.GB4895@jm.kir.nu>

On Tue, Aug 16, 2011 at 05:57:34AM -0700, Fr?d?ric Lamorce wrote:
> On my laptop when I browse the available networks, it displays the speed of them like 54, 130, 300, etc.
> 
> But with the AP I am developing it is displayed at 0, I can connect to the AP and have an IP address (I didn't do speed test) so it is working.

What is this laptop and the tool that displays the speed? It sounds like
it is working incorrectly and is unable to figure out the correct
"speed" (however it may define that) with this network.

-- 
Jouni Malinen                                            PGP id EFC895FA


From david.goodenough  Tue Aug 16 07:10:31 2011
From: david.goodenough (David Goodenough)
Date: Tue, 16 Aug 2011 15:10:31 +0100
Subject: 802.11a/n
In-Reply-To: <20110816133312.GA4895@jm.kir.nu>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<CAN0CFw0nYtwynRv3Pzj9mit4WzqNUL+BwpghCZUxbEKPFPeKaA@mail.gmail.com>
	<20110816133312.GA4895@jm.kir.nu>
Message-ID: <201108161510.31948.david.goodenough@btconnect.com>

On Tuesday 16 Aug 2011, Jouni Malinen wrote:
> On Mon, Aug 15, 2011 at 10:03:00PM -0700, Grant wrote:
> > Thank you.  I get the following, it looks like the 5Ghz channels should
> > work?
> 
> In station mode, but not in AP mode:
> > 			* 5180 MHz [36] (19.0 dBm) (passive scanning, no IBSS)
> > 			* 5200 MHz [40] (19.0 dBm) (passive scanning, no IBSS)
> > 			* 5220 MHz [44] (19.0 dBm) (passive scanning, no IBSS)
> > 			* 5240 MHz [48] (19.0 dBm) (passive scanning, no IBSS)
> 
> Those are fine in modes that passively search an AP and connect to it.
> However, they are not available for starting an AP (or IBSS).
> 
> > 			* 5260 MHz [52] (disabled)
> 
> And those are disabled completely.
As a side question, why would a card not be allowed to be an AP?  I can
understand why it might not be capable of being an AP, but surely if anyone
is allowed to be an AP (and having clients but no AP is no use to anyone)
why are some cards not allowed to be an AP?

David


From FLamorce  Tue Aug 16 07:13:42 2011
From: FLamorce (=?utf-8?B?RnLDqWTDqXJpYyBMYW1vcmNl?=)
Date: Tue, 16 Aug 2011 07:13:42 -0700
Subject: Advertised speed is 0 with hostapd
In-Reply-To: <20110816133447.GB4895@jm.kir.nu>
References: <8BFC9A1FBD4CFA4FA7496C9F6DBCF4CA0DC717FBF2@oxn-mx01.PD.CalAmpCorp.com>
	<20110816133447.GB4895@jm.kir.nu>
Message-ID: <8BFC9A1FBD4CFA4FA7496C9F6DBCF4CA0DC717FBF9@oxn-mx01.PD.CalAmpCorp.com>

> maybe... Do you use 
>	iw dev wlan0 station dump

This gives:

Station 00:26:82:05:11:80 (on wlan0)
        inactive time:  110 ms
        rx bytes:       6423
        rx packets:     107
        tx bytes:       2762
        tx packets:     16
        tx retries:     0
        tx failed:      0
        signal:         -72 dBm
        signal avg:     -71 dBm
        tx bitrate:     11.0 MBit/s

> What is this laptop and the tool that displays the speed? It sounds like
> it is working incorrectly and is unable to figure out the correct
> "speed" (however it may define that) with this network.

Laptop is an HP, wifi card is a Broadcom BCM4353 abgn.
I went on dozens of networks with it, and this is the only one that displays 0 for the advertised speed.
Some debug info (not sure what they are) given by the Broadcom tool gives me this:
00 07 56 61 6e 63 65 6c 6c 
01 04 82 84 0b 16 
03 01 01 
05 04 01 02 00 00 
30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 
2d 1a 4e 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3d 16 01 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 52 43 5d 00 72 32 2e 00

inSSIDer says the speed is 65 (I often see this instead of 130/300 with inSSIDer).

Fr?d?ric.


-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Jouni Malinen
Sent: August 16, 2011 09:35
To: hostap at lists.shmoo.com
Subject: Re: Advertised speed is 0 with hostapd

On Tue, Aug 16, 2011 at 05:57:34AM -0700, Fr?d?ric Lamorce wrote:
> On my laptop when I browse the available networks, it displays the speed of them like 54, 130, 300, etc.
> 
> But with the AP I am developing it is displayed at 0, I can connect to the AP and have an IP address (I didn't do speed test) so it is working.

What is this laptop and the tool that displays the speed? It sounds like
it is working incorrectly and is unable to figure out the correct
"speed" (however it may define that) with this network.

-- 
Jouni Malinen                                            PGP id EFC895FA
_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap


From chunkeey  Tue Aug 16 07:31:17 2011
From: chunkeey (Christian Lamparter)
Date: Tue, 16 Aug 2011 16:31:17 +0200
Subject: 802.11a/n
In-Reply-To: <201108161510.31948.david.goodenough@btconnect.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110816133312.GA4895@jm.kir.nu>
	<201108161510.31948.david.goodenough@btconnect.com>
Message-ID: <201108161631.17052.chunkeey@googlemail.com>

On Tuesday, August 16, 2011 04:10:31 PM David Goodenough wrote:
> On Tuesday 16 Aug 2011, Jouni Malinen wrote:
> > On Mon, Aug 15, 2011 at 10:03:00PM -0700, Grant wrote:
> > > Thank you.  I get the following, it looks like the 5Ghz channels should
> > > work?
> > 
> > In station mode, but not in AP mode:
> > > 			* 5180 MHz [36] (19.0 dBm) (passive scanning, no IBSS)
> > > 			* 5200 MHz [40] (19.0 dBm) (passive scanning, no IBSS)
> > > 			* 5220 MHz [44] (19.0 dBm) (passive scanning, no IBSS)
> > > 			* 5240 MHz [48] (19.0 dBm) (passive scanning, no IBSS)
> > 
> > Those are fine in modes that passively search an AP and connect to it.
> > However, they are not available for starting an AP (or IBSS).
> > 
> > > 			* 5260 MHz [52] (disabled)
> > 
> > And those are disabled completely.
> As a side question, why would a card not be allowed to be an AP?  I can
> understand why it might not be capable of being an AP, but surely if anyone
> is allowed to be an AP (and having clients but no AP is no use to anyone)
> why are some cards not allowed to be an AP?
Because [at least in the US] the FCC dictates that an AP which
operates in the 5GHz band has to support DFS and TPC.

http://www.elliottlabs.com/documents/dynamic_frequency_selection_and_5ghz_band.pdf
[http://linuxwireless.org/en/developers/DFS]

Currently, neither DFS nor TPC are not implementated, therefore you are
not allowed to operate a 5GHz AP, the law is as simple as that.


From david.goodenough  Tue Aug 16 07:37:13 2011
From: david.goodenough (David Goodenough)
Date: Tue, 16 Aug 2011 15:37:13 +0100
Subject: 802.11a/n
In-Reply-To: <201108161631.17052.chunkeey@googlemail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<201108161510.31948.david.goodenough@btconnect.com>
	<201108161631.17052.chunkeey@googlemail.com>
Message-ID: <201108161537.13870.david.goodenough@btconnect.com>

On Tuesday 16 Aug 2011, Christian Lamparter wrote:
> On Tuesday, August 16, 2011 04:10:31 PM David Goodenough wrote:
> > On Tuesday 16 Aug 2011, Jouni Malinen wrote:
> > > On Mon, Aug 15, 2011 at 10:03:00PM -0700, Grant wrote:
> > > > Thank you.  I get the following, it looks like the 5Ghz channels
> > > > should work?
> > > 
> > > In station mode, but not in AP mode:
> > > > 			* 5180 MHz [36] (19.0 dBm) (passive scanning, no IBSS)
> > > > 			* 5200 MHz [40] (19.0 dBm) (passive scanning, no IBSS)
> > > > 			* 5220 MHz [44] (19.0 dBm) (passive scanning, no IBSS)
> > > > 			* 5240 MHz [48] (19.0 dBm) (passive scanning, no IBSS)
> > > 
> > > Those are fine in modes that passively search an AP and connect to it.
> > > However, they are not available for starting an AP (or IBSS).
> > > 
> > > > 			* 5260 MHz [52] (disabled)
> > > 
> > > And those are disabled completely.
> > 
> > As a side question, why would a card not be allowed to be an AP?  I can
> > understand why it might not be capable of being an AP, but surely if
> > anyone is allowed to be an AP (and having clients but no AP is no use to
> > anyone) why are some cards not allowed to be an AP?
> 
> Because [at least in the US] the FCC dictates that an AP which
> operates in the 5GHz band has to support DFS and TPC.
> 
> http://www.elliottlabs.com/documents/dynamic_frequency_selection_and_5ghz_b
> and.pdf [http://linuxwireless.org/en/developers/DFS]
> 
> Currently, neither DFS nor TPC are not implementated, therefore you are
> not allowed to operate a 5GHz AP, the law is as simple as that.
In which case should the list say that DFS and/or TPC are required, and then
we would know that when DFS/TPC are implemented (and I seem to recall that
there is work going on to do this) this card will work?

David


From chunkeey  Tue Aug 16 08:25:45 2011
From: chunkeey (Christian Lamparter)
Date: Tue, 16 Aug 2011 17:25:45 +0200
Subject: 802.11a/n
In-Reply-To: <201108161537.13870.david.goodenough@btconnect.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<201108161631.17052.chunkeey@googlemail.com>
	<201108161537.13870.david.goodenough@btconnect.com>
Message-ID: <201108161725.45820.chunkeey@googlemail.com>

On Tuesday, August 16, 2011 04:37:13 PM David Goodenough wrote:
> On Tuesday 16 Aug 2011, Christian Lamparter wrote:
> > On Tuesday, August 16, 2011 04:10:31 PM David Goodenough wrote:
> > > As a side question, why would a card not be allowed to be an AP?  I can
> > > understand why it might not be capable of being an AP, but surely if
> > > anyone is allowed to be an AP (and having clients but no AP is no use to
> > > anyone) why are some cards not allowed to be an AP?
> > 
> > Because [at least in the US] the FCC dictates that an AP which
> > operates in the 5GHz band has to support DFS and TPC.
> > 
> > http://www.elliottlabs.com/documents/dynamic_frequency_selection_and_5ghz_b
> > and.pdf [http://linuxwireless.org/en/developers/DFS]
> > 
> > Currently, neither DFS nor TPC are not implementated, therefore you are
> > not allowed to operate a 5GHz AP, the law is as simple as that.
> In which case should the list say that DFS and/or TPC are required.
Are you questioning your own government :D ? They make the laws, so you
have to ask them.

> I seem to recall that there is work going on to do this
not anymore.

Regards,
	Chr


From david.goodenough  Tue Aug 16 08:40:40 2011
From: david.goodenough (David Goodenough)
Date: Tue, 16 Aug 2011 16:40:40 +0100
Subject: 802.11a/n
In-Reply-To: <201108161725.45820.chunkeey@googlemail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<201108161537.13870.david.goodenough@btconnect.com>
	<201108161725.45820.chunkeey@googlemail.com>
Message-ID: <201108161640.40465.david.goodenough@btconnect.com>

On Tuesday 16 Aug 2011, Christian Lamparter wrote:
> On Tuesday, August 16, 2011 04:37:13 PM David Goodenough wrote:
> > On Tuesday 16 Aug 2011, Christian Lamparter wrote:
> > > On Tuesday, August 16, 2011 04:10:31 PM David Goodenough wrote:
> > > > As a side question, why would a card not be allowed to be an AP?  I
> > > > can understand why it might not be capable of being an AP, but
> > > > surely if anyone is allowed to be an AP (and having clients but no
> > > > AP is no use to anyone) why are some cards not allowed to be an AP?
> > > 
> > > Because [at least in the US] the FCC dictates that an AP which
> > > operates in the 5GHz band has to support DFS and TPC.
> > > 
> > > http://www.elliottlabs.com/documents/dynamic_frequency_selection_and_5g
> > > hz_b and.pdf [http://linuxwireless.org/en/developers/DFS]
> > > 
> > > Currently, neither DFS nor TPC are not implementated, therefore you are
> > > not allowed to operate a 5GHz AP, the law is as simple as that.
> > 
> > In which case should the list say that DFS and/or TPC are required.
> 
> Are you questioning your own government :D ? They make the laws, so you
> have to ask them.
Its not my government, I am in the UK and so not subject to the FCC.  However
Ofcom do have similar requirements.

Its not the reason it is disabled I was questioning, it was the way that 
the user was told about it.  
> 
> > I seem to recall that there is work going on to do this
> 
> not anymore.
That is a big shame.  The developers/DFS page you reference above does
not indicate that the effort has stopped.  But the last IRC action plan
is last year, so maybe it just stopped.

David
> 
> Regards,
> 	Chr



From sleffler  Tue Aug 16 10:43:07 2011
From: sleffler (Sam Leffler)
Date: Tue, 16 Aug 2011 10:43:07 -0700
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz
	networks.
In-Reply-To: <1313448107.6103.12.camel@dcbw.foobar.com>
References: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
	<1313448107.6103.12.camel@dcbw.foobar.com>
Message-ID: <CA+yqC4YyLpqoCfSbvn9s6889anhHmgYv0Si1TcGa+ei_y_Biiw@mail.gmail.com>

On Mon, Aug 15, 2011 at 3:41 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Fri, 2011-08-05 at 16:23 -0700, Gary Morain wrote:
>> In scan.c, merge a channel's noise value into the scan results. ?When comparing
>> scan results, compute the signal-to-noise ratio and use it when available.
>> Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR is
>> relatively close to the other network's.
>
> Honestly I'd rather have something like a "bands" option on a
> per-netblock basis, so you could do this:
>
> bands=5
> bands=5,2
> bands=2,5
> bands=2
>
> ie, the connection manager can set whichever band it prefers, or leave
> it out entirely to let the supplicant do whatever it's already doing.
> The problem with micro-optimizations like this are that they often
> break, and they aren't necessarily clear. ?I'd advocate for simpler,
> clearer rules here, with behavior set by the connection manager, rather
> than continually more complicated matching rules in the supplicant
> itself...

I'm trying to understand how this would be used.  The point of Gary's
change is to prefer the 5GHz band only when two AP's have equivalent
signal quality. (5GHz is considered better because it has
non-overlapping channels, less likely to have interference, etc.)
This is meant to improve the algorithm by which a BSS is selected.

Also, specifying a preference on a per-netblock basis seems odd; when
would you want to control band preferences only for a specific SSID?
You can lock down a netblock using bssid= and assign priority though
it might be painful to list all the AP's in an ESS.  If we really want
to add this complexity it seems like it belongs per-interface or
global (or at compile-time).

-Sam


From rmanohar  Tue Aug 16 12:29:20 2011
From: rmanohar (Rajkumar Manoharan)
Date: Wed, 17 Aug 2011 00:59:20 +0530
Subject: [RFC] p2p: disable 11b rates on p2p interface creation
Message-ID: <1313522960-11775-1-git-send-email-rmanohar@qca.qualcomm.com>

11b rates are disabled blindly during p2p init based on driver
capability. This prevents use of CCK rates when no p2p vif
is present. This patch disables 11b rates while creating p2p
interface.

Signed-off-by: Rajkumar Manoharan <rmanohar at qca.qualcomm.com>
---
 src/drivers/driver.h            |    4 ++--
 src/drivers/driver_nl80211.c    |   17 ++++++++++++-----
 wpa_supplicant/driver_i.h       |    6 ++----
 wpa_supplicant/p2p_supplicant.c |    5 +----
 4 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index e2d0f8b..6812b0c 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1911,14 +1911,14 @@ struct wpa_driver_ops {
 	 * disable_11b_rates - Set whether IEEE 802.11b rates are used for TX
 	 * @priv: Private driver interface data
 	 * @disabled: Whether IEEE 802.11b rates are disabled
-	 * Returns: 0 on success, -1 on failure (or if not supported)
+	 * Returns: None
 	 *
 	 * This command is used to disable IEEE 802.11b rates (1, 2, 5.5, and
 	 * 11 Mbps) as TX rates for data and management frames. This can be
 	 * used to optimize channel use when there is no need to support IEEE
 	 * 802.11b-only devices.
 	 */
-	int (*disable_11b_rates)(void *priv, int disabled);
+	void (*disable_11b_rates)(void *priv, int disabled);
 
 	/**
 	 * deinit_ap - Deinitialize AP mode
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 1cb2196..350898b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4134,7 +4134,9 @@ static int nl80211_create_iface(struct wpa_driver_nl80211_data *drv,
 						wds);
 	}
 
-	if (ret >= 0 && drv->disable_11b_rates)
+	if (ret >= 0 && drv->disable_11b_rates &&
+	    (iftype == NL80211_IFTYPE_P2P_CLIENT ||
+	     iftype == NL80211_IFTYPE_P2P_GO))
 		nl80211_disable_11b_rates(drv, ret, 1);
 
 	return ret;
@@ -5101,7 +5103,10 @@ static int nl80211_set_mode(struct wpa_driver_nl80211_data *drv,
 	NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, mode);
 
 	ret = send_and_recv_msgs(drv, msg, NULL, NULL);
-	if (!ret)
+	if (!ret && drv->disable_11b_rates &&
+	    (mode == NL80211_IFTYPE_P2P_CLIENT ||
+	     mode == NL80211_IFTYPE_P2P_GO))
+		nl80211_disable_11b_rates(drv, ifindex, 1);
 		return 0;
 nla_put_failure:
 	wpa_printf(MSG_DEBUG, "nl80211: Failed to set interface %d to mode %d:"
@@ -6500,6 +6505,9 @@ static int nl80211_disable_11b_rates(struct wpa_driver_nl80211_data *drv,
 		    NL80211_CMD_SET_TX_BITRATE_MASK, 0);
 	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex);
 
+	if (!disabled)
+		goto nla_send;
+
 	bands = nla_nest_start(msg, NL80211_ATTR_TX_RATES);
 	if (!bands)
 		goto nla_put_failure;
@@ -6517,7 +6525,7 @@ static int nl80211_disable_11b_rates(struct wpa_driver_nl80211_data *drv,
 	nla_nest_end(msg, band);
 
 	nla_nest_end(msg, bands);
-
+nla_send:
 	ret = send_and_recv_msgs(drv, msg, NULL, NULL);
 	msg = NULL;
 	if (ret) {
@@ -6533,12 +6541,11 @@ nla_put_failure:
 }
 
 
-static int wpa_driver_nl80211_disable_11b_rates(void *priv, int disabled)
+static void wpa_driver_nl80211_disable_11b_rates(void *priv, int disabled)
 {
 	struct i802_bss *bss = priv;
 	struct wpa_driver_nl80211_data *drv = bss->drv;
 	drv->disable_11b_rates = disabled;
-	return nl80211_disable_11b_rates(drv, drv->ifindex, disabled);
 }
 
 
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index 79fdddd..f42e58b 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -463,13 +463,11 @@ static inline int wpa_drv_probe_req_report(struct wpa_supplicant *wpa_s,
 	return -1;
 }
 
-static inline int wpa_drv_disable_11b_rates(struct wpa_supplicant *wpa_s,
+static inline void wpa_drv_disable_11b_rates(struct wpa_supplicant *wpa_s,
 					    int disabled)
 {
 	if (wpa_s->driver->disable_11b_rates)
-		return wpa_s->driver->disable_11b_rates(wpa_s->drv_priv,
-							disabled);
-	return -1;
+		wpa_s->driver->disable_11b_rates(wpa_s->drv_priv, disabled);
 }
 
 static inline int wpa_drv_deinit_ap(struct wpa_supplicant *wpa_s)
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 400b6cc..2c730dc 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2364,10 +2364,7 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
 	}
 #endif /* CONFIG_CLIENT_MLME */
 
-	if (wpa_drv_disable_11b_rates(wpa_s, 1) < 0) {
-		wpa_printf(MSG_DEBUG, "P2P: Failed to disable 11b rates");
-		/* Continue anyway; this is not really a fatal error */
-	}
+	wpa_drv_disable_11b_rates(wpa_s, 1);
 
 	if (global->p2p)
 		return 0;
-- 
1.7.6



From emailgrant  Tue Aug 16 13:23:08 2011
From: emailgrant (Grant)
Date: Tue, 16 Aug 2011 13:23:08 -0700
Subject: 802.11a/n
In-Reply-To: <201108161631.17052.chunkeey@googlemail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110816133312.GA4895@jm.kir.nu>
	<201108161510.31948.david.goodenough@btconnect.com>
	<201108161631.17052.chunkeey@googlemail.com>
Message-ID: <CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>

>> > > Thank you. ?I get the following, it looks like the 5Ghz channels should
>> > > work?
>> >
>> > In station mode, but not in AP mode:
>> > > ? ? ? ? ? ? ? ? ? * 5180 MHz [36] (19.0 dBm) (passive scanning, no IBSS)
>> > > ? ? ? ? ? ? ? ? ? * 5200 MHz [40] (19.0 dBm) (passive scanning, no IBSS)
>> > > ? ? ? ? ? ? ? ? ? * 5220 MHz [44] (19.0 dBm) (passive scanning, no IBSS)
>> > > ? ? ? ? ? ? ? ? ? * 5240 MHz [48] (19.0 dBm) (passive scanning, no IBSS)
>> >
>> > Those are fine in modes that passively search an AP and connect to it.
>> > However, they are not available for starting an AP (or IBSS).
>> >
>> > > ? ? ? ? ? ? ? ? ? * 5260 MHz [52] (disabled)
>> >
>> > And those are disabled completely.
>> As a side question, why would a card not be allowed to be an AP? ?I can
>> understand why it might not be capable of being an AP, but surely if anyone
>> is allowed to be an AP (and having clients but no AP is no use to anyone)
>> why are some cards not allowed to be an AP?
> Because [at least in the US] the FCC dictates that an AP which
> operates in the 5GHz band has to support DFS and TPC.
>
> http://www.elliottlabs.com/documents/dynamic_frequency_selection_and_5ghz_band.pdf
> [http://linuxwireless.org/en/developers/DFS]
>
> Currently, neither DFS nor TPC are not implementated, therefore you are
> not allowed to operate a 5GHz AP, the law is as simple as that.

What a drag.  So no Linux AP is capable of operating on any 5Ghz channel?

For when I travel outside of the US, EU, and Japan, can this be
overridden with a kernel patch?  If so, is such a patch available?

- Grant


From sven.falempin  Tue Aug 16 15:30:26 2011
From: sven.falempin (sven falempin)
Date: Wed, 17 Aug 2011 00:30:26 +0200
Subject: Looking for error message
Message-ID: <CA++fYEjs-EZ12MEqKfMfj3SEYQsEzcyAeFGKA+xQkF9UdRaP9g@mail.gmail.com>

Hello,

I currently try to use hostapd (0.7.3) with an ath9k driver card.
I have absolutely NO output from hostapd. It just leave.
When i put something like channel=60 it does log an error.
But any other (known good) configuration does not log error neither do
anything.
btw, CONFIG_NO_STDOUT_DEBUG=n, openssl statically linked
*I was able to connect to a wifi hotspot*

Why have i no feedback at all ?

Here's the gettimeofday and leave (strace hostapd):
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7823000
read(3, "# grr\ninterface=wlan0\nwpa=1\nwpa_"..., 4096) = 149
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7823000, 4096)                = 0
gettimeofday({1313532734, 239087}, NULL) = 0
exit_group(1)                           = ?

Here's kernel version and hostapd version and iw list result
root at zhost sbin> uname -r
2.6.39.2
root at zvnhermes sbin> hostapd -v
hostapd v0.7.3
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2010, Jouni Malinen <j at w1.fi> and contributors
root at zhost sbin> ldd hostapd
        linux-gate.so.1 =>  (0xb78a4000)
        libdl.so.2 => /lib/libdl.so.2 (0xb789c000)
        libnl.so.1 => /lib/libnl.so.1 (0xb7858000)
        libc.so.6 => /lib/libc.so.6 (0xb7719000)
        /lib/ld-linux.so.2 (0xb78a5000)
        libm.so.6 => /lib/libm.so.6 (0xb76f1000)
root at zhost sbin> ldd iw
        linux-gate.so.1 =>  (0xb78b6000)
        libnl.so.1 => /lib/libnl.so.1 (0xb786e000)
        libc.so.6 => /lib/libc.so.6 (0xb772f000)
        libm.so.6 => /lib/libm.so.6 (0xb7707000)
        /lib/ld-linux.so.2 (0xb78b7000)
root at zhost sbin>
root at zhost sbin> iw list
Wiphy phy0
        Band 1:[WELLLLL]
        Band 2:[BLABLA]
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * WDS
                 * monitor
                 * P2P-client
                 * P2P-GO
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * new_beacon
                 * new_station
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * action
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050
0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050
0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
                 * P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
        Supported RX frame types:
                 * IBSS: 0x00d0
                 * managed: 0x0040 0x00d0
                 * AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
                 * AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
                 * mesh point: 0x00d0
                 * P2P-client: 0x0040 0x00d0
                 * P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110817/4d56518a/attachment.htm 


From dcbw  Tue Aug 16 15:50:22 2011
From: dcbw (Dan Williams)
Date: Tue, 16 Aug 2011 17:50:22 -0500
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz
	networks.
In-Reply-To: <CA+yqC4YyLpqoCfSbvn9s6889anhHmgYv0Si1TcGa+ei_y_Biiw@mail.gmail.com>
References: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
	<1313448107.6103.12.camel@dcbw.foobar.com>
	<CA+yqC4YyLpqoCfSbvn9s6889anhHmgYv0Si1TcGa+ei_y_Biiw@mail.gmail.com>
Message-ID: <1313535025.17793.27.camel@dcbw.foobar.com>

On Tue, 2011-08-16 at 10:43 -0700, Sam Leffler wrote:
> On Mon, Aug 15, 2011 at 3:41 PM, Dan Williams <dcbw at redhat.com> wrote:
> > On Fri, 2011-08-05 at 16:23 -0700, Gary Morain wrote:
> >> In scan.c, merge a channel's noise value into the scan results.  When comparing
> >> scan results, compute the signal-to-noise ratio and use it when available.
> >> Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR is
> >> relatively close to the other network's.
> >
> > Honestly I'd rather have something like a "bands" option on a
> > per-netblock basis, so you could do this:
> >
> > bands=5
> > bands=5,2
> > bands=2,5
> > bands=2
> >
> > ie, the connection manager can set whichever band it prefers, or leave
> > it out entirely to let the supplicant do whatever it's already doing.
> > The problem with micro-optimizations like this are that they often
> > break, and they aren't necessarily clear.  I'd advocate for simpler,
> > clearer rules here, with behavior set by the connection manager, rather
> > than continually more complicated matching rules in the supplicant
> > itself...
> 
> I'm trying to understand how this would be used.  The point of Gary's
> change is to prefer the 5GHz band only when two AP's have equivalent
> signal quality. (5GHz is considered better because it has
> non-overlapping channels, less likely to have interference, etc.)
> This is meant to improve the algorithm by which a BSS is selected.

Yeah, I guess that's different than I'm proposing.  But making this
decision is still a policy decision that I'm not sure should be done in
the supplicant.

> Also, specifying a preference on a per-netblock basis seems odd; when
> would you want to control band preferences only for a specific SSID?

I've had this request come up periodically.  If your institution uses
the same SSID between the 5GHz and 2.4GHz wifi networks, but you'd like
to always be on the 5GHz segment because it's less loaded.  But other
places you may not want to be on the 5GHz network.  It really is a
per-SSID (ie per network) preference.

> You can lock down a netblock using bssid= and assign priority though
> it might be painful to list all the AP's in an ESS.  If we really want
> to add this complexity it seems like it belongs per-interface or
> global (or at compile-time).

I disagree.  It's not global to the entire decision, it's specific to
the netblock.  You may not always want to prefer 5GHz networks
everywhere you are.  The problem with the freq= parameter is that to
achieve this behavior you'd have to list *all* the frequencies in the
5GHz and 2.4GHz range, while using bssid= is a no-go because the
situation where you want this behavior is one where there are a ton of
APs around.

Dan



From sven.falempin  Tue Aug 16 16:09:27 2011
From: sven.falempin (sven falempin)
Date: Wed, 17 Aug 2011 01:09:27 +0200
Subject: Looking for error message
In-Reply-To: <CA++fYEjs-EZ12MEqKfMfj3SEYQsEzcyAeFGKA+xQkF9UdRaP9g@mail.gmail.com>
References: <CA++fYEjs-EZ12MEqKfMfj3SEYQsEzcyAeFGKA+xQkF9UdRaP9g@mail.gmail.com>
Message-ID: <CA++fYEjN540J6L5QXwPaPoUZj1hwKp6E_4--J6NPEEU86JSi0g@mail.gmail.com>

Using old version (6) i found out the channel must be set (really?)
The old version was not able to handle ath9k though
but now it's ok

Please increase verbosity in version 7 :)

2011/8/17 sven falempin <sven.falempin at gmail.com>

> Hello,
>
> I currently try to use hostapd (0.7.3) with an ath9k driver card.
> I have absolutely NO output from hostapd. It just leave.
> When i put something like channel=60 it does log an error.
> But any other (known good) configuration does not log error neither do
> anything.
> btw, CONFIG_NO_STDOUT_DEBUG=n, openssl statically linked
> *I was able to connect to a wifi hotspot*
>
> Why have i no feedback at all ?
>
> Here's the gettimeofday and leave (strace hostapd):
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0xb7823000
> read(3, "# grr\ninterface=wlan0\nwpa=1\nwpa_"..., 4096) = 149
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> munmap(0xb7823000, 4096)                = 0
> gettimeofday({1313532734, 239087}, NULL) = 0
> exit_group(1)                           = ?
>
> Here's kernel version and hostapd version and iw list result
> root at zhost sbin> uname -r
> 2.6.39.2
> root at zvnhermes sbin> hostapd -v
> hostapd v0.7.3
> User space daemon for IEEE 802.11 AP management,
> IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
> Copyright (c) 2002-2010, Jouni Malinen <j at w1.fi> and contributors
> root at zhost sbin> ldd hostapd
>         linux-gate.so.1 =>  (0xb78a4000)
>         libdl.so.2 => /lib/libdl.so.2 (0xb789c000)
>         libnl.so.1 => /lib/libnl.so.1 (0xb7858000)
>         libc.so.6 => /lib/libc.so.6 (0xb7719000)
>         /lib/ld-linux.so.2 (0xb78a5000)
>         libm.so.6 => /lib/libm.so.6 (0xb76f1000)
> root at zhost sbin> ldd iw
>         linux-gate.so.1 =>  (0xb78b6000)
>         libnl.so.1 => /lib/libnl.so.1 (0xb786e000)
>         libc.so.6 => /lib/libc.so.6 (0xb772f000)
>         libm.so.6 => /lib/libm.so.6 (0xb7707000)
>         /lib/ld-linux.so.2 (0xb78b7000)
> root at zhost sbin>
> root at zhost sbin> iw list
> Wiphy phy0
>         Band 1:[WELLLLL]
>         Band 2:[BLABLA]
>         max # scan SSIDs: 4
>         max scan IEs length: 2257 bytes
>         Coverage class: 0 (up to 0m)
>         Available Antennas: TX 0 RX 0
>         Supported interface modes:
>                  * IBSS
>                  * managed
>                  * AP
>                  * AP/VLAN
>                  * WDS
>                  * monitor
>                  * P2P-client
>                  * P2P-GO
>         Supported commands:
>                  * new_interface
>                  * set_interface
>                  * new_key
>                  * new_beacon
>                  * new_station
>                  * set_bss
>                  * authenticate
>                  * associate
>                  * deauthenticate
>                  * disassociate
>                  * join_ibss
>                  * remain_on_channel
>                  * set_tx_bitrate_mask
>                  * action
>                  * frame_wait_cancel
>                  * set_wiphy_netns
>                  * set_channel
>                  * set_wds_peer
>                  * connect
>                  * disconnect
>         Supported TX frame types:
>                  * IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
> 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
>                  * managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050
> 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
>                  * AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
> 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
>                  * AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050
> 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
>                  * mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050
> 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
>                  * P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050
> 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
>                  * P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060
> 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
>         Supported RX frame types:
>                  * IBSS: 0x00d0
>                  * managed: 0x0040 0x00d0
>                  * AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
>                   * AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0
> 0x00d0
>                  * mesh point: 0x00d0
>                  * P2P-client: 0x0040 0x00d0
>                  * P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
>
>


-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110817/a5cf51f1/attachment.htm 


From lists  Wed Aug 17 02:21:40 2011
From: lists (Ed W)
Date: Wed, 17 Aug 2011 10:21:40 +0100
Subject: Looking for error message
In-Reply-To: <CA++fYEjN540J6L5QXwPaPoUZj1hwKp6E_4--J6NPEEU86JSi0g@mail.gmail.com>
References: <CA++fYEjs-EZ12MEqKfMfj3SEYQsEzcyAeFGKA+xQkF9UdRaP9g@mail.gmail.com>
	<CA++fYEjN540J6L5QXwPaPoUZj1hwKp6E_4--J6NPEEU86JSi0g@mail.gmail.com>
Message-ID: <4E4B8824.4030707@wildgooses.com>

On 17/08/2011 00:09, sven falempin wrote:
> Using old version (6) i found out the channel must be set (really?)
> The old version was not able to handle ath9k though
> but now it's ok
> 
> Please increase verbosity in version 7 :)

I just posted basically the same thing about 3 hours before you

If there is any tiny problem with the config file (and this seems to
also mean something valid for hostapd, but not the wireless driver),
then hostapd fails to start but without any output.  Debugging why seems
to be just trial and error - I can't figure out how to get any error logs?

Perhaps there is some workaround by enabling driver debugging messages?
 Perhaps some trick in examining strace?

I haven't tried latest git - should users really be using that right now?

Cheers

Ed W


From lists  Wed Aug 17 02:45:59 2011
From: lists (Ed W)
Date: Wed, 17 Aug 2011 10:45:59 +0100
Subject: 802.11a/n
In-Reply-To: <CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>	<20110816133312.GA4895@jm.kir.nu>	<201108161510.31948.david.goodenough@btconnect.com>	<201108161631.17052.chunkeey@googlemail.com>
	<CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>
Message-ID: <4E4B8DD7.7060905@wildgooses.com>

On 16/08/2011 21:23, Grant wrote:
> What a drag.  So no Linux AP is capable of operating on any 5Ghz channel?
> 
> For when I travel outside of the US, EU, and Japan, can this be
> overridden with a kernel patch?  If so, is such a patch available?

I presume this is driven by the CRDA regulatory stuff? (Please correct me?)

If you are using some modern distro then it's probably done in userspace
using the crda service (more on the wiki). If you are building your own
then you can compile into the kernel your own regional settings (ie what
*you* are allowed to use) by editing: linux/net/wireless/db.txt

My observation is that this is a tricky thing to watch - if you are near
some accesspoint which is broadcasting (whatever the standard is called)
it's compliance country code, then something is reading this and
switching your country code accordingly. As such give some thought to a)
rogue access points with duff settings and b) that any edits you make to
represent your own allowed channels go into the correct country code


However, my reading of the DFS stuff is that it applies to only *some*
of the 5Ghz channels.  OK, yours are disabled, but is it not possible to
implement a 5Ghz AP in the uk if you avoid the DFS channels of 5250-5350
and 5470-5725?


Ed W


From kaniki.uday  Wed Aug 17 03:05:06 2011
From: kaniki.uday (uday kiran)
Date: Wed, 17 Aug 2011 15:35:06 +0530
Subject: Query on WPA2's CCMP-AES encryption key length
Message-ID: <CAOeh9MvP3H8cEJG7Hab32OOhwFCyh6Oy5jiuG+zJD7CpGgEg0Q@mail.gmail.com>

Hi

I have read that ,

WPA2 uses CCMP-AES and CCMP-AES supports 128,192 and 256 key lengths.

I have few queries related to the above

1) Is the above mentioned encryption algorithm implemented in hardware or
driver ?

2) What kind of dependency does encryption has on hardware ?

3) If the Wi-Fi Vendor data sheet says that  it supports AES encryption ,
does it mean it supports all the three key lengths ?

Could some one help me out in getting these things clarified ?

-Uday
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110817/3d70da07/attachment.htm 


From j  Wed Aug 17 06:38:44 2011
From: j (Jouni Malinen)
Date: Wed, 17 Aug 2011 06:38:44 -0700
Subject: Query on WPA2's CCMP-AES encryption key length
In-Reply-To: <CAOeh9MvP3H8cEJG7Hab32OOhwFCyh6Oy5jiuG+zJD7CpGgEg0Q@mail.gmail.com>
References: <CAOeh9MvP3H8cEJG7Hab32OOhwFCyh6Oy5jiuG+zJD7CpGgEg0Q@mail.gmail.com>
Message-ID: <20110817133844.GA4993@jm.kir.nu>

On Wed, Aug 17, 2011 at 03:35:06PM +0530, uday kiran wrote:
> I have read that ,
> 
> WPA2 uses CCMP-AES and CCMP-AES supports 128,192 and 256 key lengths.

Where did you read that? AES is defined for multiple key lengths, but
CCMP is only defined for the case where a 128-bit key is used.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j  Wed Aug 17 06:42:06 2011
From: j (Jouni Malinen)
Date: Wed, 17 Aug 2011 06:42:06 -0700
Subject: Looking for error message
In-Reply-To: <CA++fYEjs-EZ12MEqKfMfj3SEYQsEzcyAeFGKA+xQkF9UdRaP9g@mail.gmail.com>
References: <CA++fYEjs-EZ12MEqKfMfj3SEYQsEzcyAeFGKA+xQkF9UdRaP9g@mail.gmail.com>
Message-ID: <20110817134206.GB4993@jm.kir.nu>

On Wed, Aug 17, 2011 at 12:30:26AM +0200, sven falempin wrote:
> I currently try to use hostapd (0.7.3) with an ath9k driver card.
> I have absolutely NO output from hostapd. It just leave.
> When i put something like channel=60 it does log an error.
> But any other (known good) configuration does not log error neither do
> anything.
> btw, CONFIG_NO_STDOUT_DEBUG=n, openssl statically linked

Please remove that CONFIG_NO_STDOUT_DEBUG=n line from .config if you
want to get any output. It does not matter what value you set for the
variable, but as long as you set it, it will be assumed to be enabled
(i.e., =n is identical to =y in this particular case).

-- 
Jouni Malinen                                            PGP id EFC895FA


From kaniki.uday  Wed Aug 17 07:06:53 2011
From: kaniki.uday (uday kiran)
Date: Wed, 17 Aug 2011 19:36:53 +0530
Subject: HostAP Digest, Vol 100, Issue 26
In-Reply-To: <mailman.40418.1313588529.8032.hostap@lists.shmoo.com>
References: <mailman.40418.1313588529.8032.hostap@lists.shmoo.com>
Message-ID: <CAOeh9Muo6FBEuarbRkWS1vkG0p7Nvb6k9=d-3b-o81ej1PH8tQ@mail.gmail.com>

>
> > Where did you read that? AES is defined for multiple key lengths, but
> CCMP is only defined for the case where a 128-bit key is used.
>
> Sorry Jouni , I got confused with AES key lengths.

Is RFC 3610 the one that talks about CCMP ?

In the given RFC, there is mention in the introduction section that CCMP can
be extended to other block sizes.
If I want to implement 192,256 key lenght support , then does it require
support from hardware ? I am asking this question because i am assuming that
key length is not dependent on hardware .Please clarify .

Thank you very much for your prompt reply . It's helping me a lot to
understand the things faster. :)

-Uday
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110817/4ed4105f/attachment.htm 


From j  Wed Aug 17 07:18:55 2011
From: j (Jouni Malinen)
Date: Wed, 17 Aug 2011 07:18:55 -0700
Subject: HostAP Digest, Vol 100, Issue 26
In-Reply-To: <CAOeh9Muo6FBEuarbRkWS1vkG0p7Nvb6k9=d-3b-o81ej1PH8tQ@mail.gmail.com>
References: <mailman.40418.1313588529.8032.hostap@lists.shmoo.com>
	<CAOeh9Muo6FBEuarbRkWS1vkG0p7Nvb6k9=d-3b-o81ej1PH8tQ@mail.gmail.com>
Message-ID: <20110817141855.GA6620@jm.kir.nu>

On Wed, Aug 17, 2011 at 07:36:53PM +0530, uday kiran wrote:
> >
> > > Where did you read that? AES is defined for multiple key lengths, but
> > CCMP is only defined for the case where a 128-bit key is used.
> >
> > Sorry Jouni , I got confused with AES key lengths.
> 
> Is RFC 3610 the one that talks about CCMP ?

Strictly speaking, it defines the CCM mode that is used in CCMP, but it
does not define CCMP.

> In the given RFC, there is mention in the introduction section that CCMP can
> be extended to other block sizes.

There is a comment that CCM could be extended to other block sizes. This
does not mean that this would have been done or that it would apply to
CCMP (and this is talking about block size, not key length).

> If I want to implement 192,256 key lenght support , then does it require
> support from hardware ? I am asking this question because i am assuming that
> key length is not dependent on hardware .Please clarify .

That would require defining a new cipher suite since CCMP is not defined
to do that. In addition, you would need to implement this new cipher
suite either in software or hardware.

-- 
Jouni Malinen                                            PGP id EFC895FA


From emailgrant  Wed Aug 17 11:29:06 2011
From: emailgrant (Grant)
Date: Wed, 17 Aug 2011 11:29:06 -0700
Subject: 802.11a/n
In-Reply-To: <4E4B8DD7.7060905@wildgooses.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110816133312.GA4895@jm.kir.nu>
	<201108161510.31948.david.goodenough@btconnect.com>
	<201108161631.17052.chunkeey@googlemail.com>
	<CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>
	<4E4B8DD7.7060905@wildgooses.com>
Message-ID: <CAN0CFw0ihQ4EN_mE3S+-AEaazh8OOLGebt781fkEpTUXeteKbQ@mail.gmail.com>

>> What a drag. ?So no Linux AP is capable of operating on any 5Ghz channel?
>>
>> For when I travel outside of the US, EU, and Japan, can this be
>> overridden with a kernel patch? ?If so, is such a patch available?
>
> I presume this is driven by the CRDA regulatory stuff? (Please correct me?)
>
> If you are using some modern distro then it's probably done in userspace
> using the crda service (more on the wiki). If you are building your own
> then you can compile into the kernel your own regional settings (ie what
> *you* are allowed to use) by editing: linux/net/wireless/db.txt

I switched to kernel control of regional settings and channels without
editing db.txt and the channels which are supposed to work in the US
without DFS started working: 36, 40, 44, 48, 149, 153, 157, 161, 165.
I noticed in dmesg I had:

cfg80211: Calling CRDA for country: US

Switching back from kernel control to crda again disabled all 5ghz
channels and in dmesg I only get:

cfg80211: Calling CRDA to update world regulatory domain

I noticed that the channel allowances for country 00 match what is
enabled for me under crda.  The kernel must set my country to US and
crda must set it to 00.  I'm using crda-1.1.1 and
wireless-regdb-20101124 which are Gentoo's latest versions.  Does
anyone know what could be wrong?  Are these packages created by
Gentoo, meaning I should file a bug with them?

> However, my reading of the DFS stuff is that it applies to only *some*
> of the 5Ghz channels. ?OK, yours are disabled, but is it not possible to
> implement a 5Ghz AP in the uk if you avoid the DFS channels of 5250-5350
> and 5470-5725?

I think you're right.  Please see above.

- Grant


From jayant.sane  Wed Aug 17 13:32:18 2011
From: jayant.sane (Sane, Jayant)
Date: Wed, 17 Aug 2011 20:32:18 +0000
Subject: [RFC] WPA Supplicant plugins
Message-ID: <03C60F3308A1A6419E34968DB630497816E54388@FMSMSX151.amr.corp.intel.com>


We have been thinking about extending the supplicant to support additional L2 protocol modules w/o they being tightly integrated within the supplicant. This could improve long term maintainability of the supplicant and affords some freedom to such protocol developers.  Likewise we thought of introducing a concept of binary loadable library like plugins implementing such protocols and providing with appropriate interfaces to allow enabling the protocol plugs.  

Problem statement:
- Functional extensions need to be coded in the supplicant.
	* Pollutes supplicant, cannot upstream, requiring constant rebasing with upstream
- Segregation of custom functionality xlates into RPC hop based separation
	* Performance or platform/environment constraints can make it infeasible
- Lack of proper published API leads to inconsistency across various interfaces
- RPC interfacing code intertwined with core

Plugin Proposal:
- Cleanly segregated from supplicant while being in-process
	* Plugs can be compiled independently
- Load decision can be run-time* (can also be statically linked)
- Minimal changes to supplicant
- Creates a formal, public supplicant API
	* Promotes consistency and allows for conscious extensibility
	* Shields supplicant and plugins from internal changes on either sides.

Scope and Design: 
- Presently confined to control plane functionality (upper edge).
- Plugins are shared libraries exposing some std interface to allow loading, init/de-init by supplicant
- Supplicant supports explicit subscription based event model
- Plugins access supplicant functionality using published Supplicant APIs

Plugin design:
- Plugins define and expose a 'plugin' structure that contains plugin's version* and pointers to entry point methods for
	* Initialization: invoked during supplicant init
	* Un-initialization: invoked before supplicant shutdown
	* Interface added: invoked when supplicant starts managing a new interface.
	* Interface removed: invoked when an interface is removed in supplicant.
  (version mismatches only generate warning log message)
- Supplicant hands out a global handle and an API v-table when invoking plugin's initialization method.
	* Allows transparent interception (if needed for certain applications). 
- Supplicant hands out an interface-plugin specific handle during interface added callback.
- Plugins can add/remove interfaces along with invoking interface specific functionality (scan, etc).
- Plugins are expected to register for any events of interest by supplying an event callback method.
- Supplicant invokes each of the registered callback for a given event.
- Plugins invoke supplicant APIs using actual supplicant handles (global or interface specific).
	* No changes to existing supplicant implementation
	* The handles are still opaque to plugins
	* certain existing types are part of the Supplicant API/interface.
- Plugins have ability to store and retrieve interface specific private data.

Status:
- Necessary changes for plugin support are completed and unit tested
	* Aligned with recent versions of upstream code.
- D-Bus module, with old and new interfaces, has been converted into a 'static' plugin. This was chosen to demonstrate the concept with something that is being used in real life.
- WIP on an Intel internal plugin
- API Design: Uses accessor methods for access to fields of opaque types (e.g. struct wpa_supplicant) from among other choices and was not the preferred choice. The API footprint is large due to get_* type methods. Pl refer to README, available at the link below, for some more info on it

Patches: 
Available at http://intellinuxwireless.org/supplicant_plugin_patches/ 

rgds, 
Jayant




From lists  Thu Aug 18 02:31:05 2011
From: lists (Ed W)
Date: Thu, 18 Aug 2011 10:31:05 +0100
Subject: 802.11a/n
In-Reply-To: <CAN0CFw0ihQ4EN_mE3S+-AEaazh8OOLGebt781fkEpTUXeteKbQ@mail.gmail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>	<20110816133312.GA4895@jm.kir.nu>	<201108161510.31948.david.goodenough@btconnect.com>	<201108161631.17052.chunkeey@googlemail.com>	<CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>	<4E4B8DD7.7060905@wildgooses.com>
	<CAN0CFw0ihQ4EN_mE3S+-AEaazh8OOLGebt781fkEpTUXeteKbQ@mail.gmail.com>
Message-ID: <4E4CDBD9.7080701@wildgooses.com>

On 17/08/2011 19:29, Grant wrote:
>>> What a drag.  So no Linux AP is capable of operating on any 5Ghz channel?
>>>
>>> For when I travel outside of the US, EU, and Japan, can this be
>>> overridden with a kernel patch?  If so, is such a patch available?
>>
>> I presume this is driven by the CRDA regulatory stuff? (Please correct me?)
>>
>> If you are using some modern distro then it's probably done in userspace
>> using the crda service (more on the wiki). If you are building your own
>> then you can compile into the kernel your own regional settings (ie what
>> *you* are allowed to use) by editing: linux/net/wireless/db.txt
> 
> I switched to kernel control of regional settings and channels without
> editing db.txt and the channels which are supposed to work in the US
> without DFS started working: 36, 40, 44, 48, 149, 153, 157, 161, 165.
> I noticed in dmesg I had:
> 
> cfg80211: Calling CRDA for country: US
> 
> Switching back from kernel control to crda again disabled all 5ghz
> channels and in dmesg I only get:
> 
> cfg80211: Calling CRDA to update world regulatory domain
> 
> I noticed that the channel allowances for country 00 match what is
> enabled for me under crda.  The kernel must set my country to US and
> crda must set it to 00.  I'm using crda-1.1.1 and
> wireless-regdb-20101124 which are Gentoo's latest versions.  Does
> anyone know what could be wrong?  Are these packages created by
> Gentoo, meaning I should file a bug with them?

Hi, I am also using gentoo:

a) I think you will see that there is some 2011 package if you unmask it?
b) I seem to remember fiddling with this and deciding that userspace was
a lot of work given that I update kernels more frequently than the
userspace tool was being updated...

I *think* you will find that you need to watch VERY closely what is
really going on here.  I think that there is a) card default regulatory,
b) kernel default, c) regulatory spotted from nearby basestations, d)
some peculiar choices if there isn't a regulatory exactly matching what
it's trying to search for (goes to "world" instead?)

So in your regulatory DB, check what the 00 world settings are and it's
likely that you are getting these rather than US?

Anyway, fiddle with it and you might come to the conclusion that right
now it's simpler to edit db.txt and set the 00 settings to be the
correct ones for your regulatory area, delete everything else from that
file and use only kernel regulatory domains...  Just a thought, make
sure what you do is legal in your domain...

GOod luck

Ed W


From lists  Thu Aug 18 02:33:56 2011
From: lists (Ed W)
Date: Thu, 18 Aug 2011 10:33:56 +0100
Subject: Looking for error message
In-Reply-To: <20110817134206.GB4993@jm.kir.nu>
References: <CA++fYEjs-EZ12MEqKfMfj3SEYQsEzcyAeFGKA+xQkF9UdRaP9g@mail.gmail.com>
	<20110817134206.GB4993@jm.kir.nu>
Message-ID: <4E4CDC84.9090801@wildgooses.com>

On 17/08/2011 14:42, Jouni Malinen wrote:
> On Wed, Aug 17, 2011 at 12:30:26AM +0200, sven falempin wrote:
>> I currently try to use hostapd (0.7.3) with an ath9k driver card.
>> I have absolutely NO output from hostapd. It just leave.
>> When i put something like channel=60 it does log an error.
>> But any other (known good) configuration does not log error neither do
>> anything.
>> btw, CONFIG_NO_STDOUT_DEBUG=n, openssl statically linked
> 
> Please remove that CONFIG_NO_STDOUT_DEBUG=n line from .config if you
> want to get any output. It does not matter what value you set for the
> variable, but as long as you set it, it will be assumed to be enabled
> (i.e., =n is identical to =y in this particular case).

Oh, that's marvelous mind reading!  Fantastic!  Debugging is back!

Much appreciated

Ed W


From j  Thu Aug 18 06:56:09 2011
From: j (Jouni Malinen)
Date: Thu, 18 Aug 2011 06:56:09 -0700
Subject: 802.11a/n
In-Reply-To: <CAN0CFw0ihQ4EN_mE3S+-AEaazh8OOLGebt781fkEpTUXeteKbQ@mail.gmail.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110816133312.GA4895@jm.kir.nu>
	<201108161510.31948.david.goodenough@btconnect.com>
	<201108161631.17052.chunkeey@googlemail.com>
	<CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>
	<4E4B8DD7.7060905@wildgooses.com>
	<CAN0CFw0ihQ4EN_mE3S+-AEaazh8OOLGebt781fkEpTUXeteKbQ@mail.gmail.com>
Message-ID: <20110818135609.GA6623@jm.kir.nu>

On Wed, Aug 17, 2011 at 11:29:06AM -0700, Grant wrote:
> I noticed that the channel allowances for country 00 match what is
> enabled for me under crda.  The kernel must set my country to US and
> crda must set it to 00.  I'm using crda-1.1.1 and
> wireless-regdb-20101124 which are Gentoo's latest versions.  Does
> anyone know what could be wrong?  Are these packages created by
> Gentoo, meaning I should file a bug with them?

Could you please check what the driver is saying about the regulatory
domain of the card? You can check this in dmesg output, e.g., like this:

$ dmesg | grep "ath:"
[   11.255148] ath: EEPROM regdomain: 0x64
[   11.255150] ath: EEPROM indicates we should expect a direct regpair
map
[   11.255154] ath: Country alpha2 being used: 00
[   11.255156] ath: Regpair used: 0x64

-- 
Jouni Malinen                                            PGP id EFC895FA


From gheskett  Thu Aug 18 07:55:01 2011
From: gheskett (gene heskett)
Date: Thu, 18 Aug 2011 10:55:01 -0400
Subject: WPS problems.
Message-ID: <201108181055.01581.gheskett@wdtv.com>

Greetings, new to list & new to wireless.

Running 32 bit ubuntu 10.04 LTS on problem area bits of the system.

1. I have a netgear WNA3100 dongle plugged into my lappy.
2. I have much of my real estate cabled, so the local net topology is
(uppercase is model of device)
cablemodem<>netgearWNBR2000v3<>8portnetgearswitch<100'cat5>linksys5porthub<>WAN-portofWGR614V10
I want to use the WGR614V10 as an access point, coupled to the WNA3100
plugged into the lappy.

I also have a separate computer cabled only to the LAN port(s) of the 
WGR614V10 so I can configure both ends of the system.

Both of these devices have the WPS button and I have supplied the
WGR614V10 with a nice 63 character passphrase.  The WNA3100 has very good
ears, seeing 10 to 13 "cells" in my neighborhood, including the WGR614V10
broadcasting its SSID at -19dbm.

However no apparent attempt at a connection has ever succeeded.

To get as far as I have required that I download and build ndiswrapper
version 1.56 as it is not available in the Ubuntu Lucid repos.  I have
extracted and installed the bcmwlhigh5 firmware for the WNA3100, and
it does an 'iwlist scan' like a hungry bloodhound.

What are the minimum versions of all the involved linux software, like 
NetworkManager, wpasupplicant, ndistgk, etc, that are needed to pull this 
off successfully?

Or, is it known that the WGR614V10 is not capable of service as an access
point?  Its not a very expensive device, $35 at Wallmart.  I can exchange 
it for another WNBR2000v3 is needed.

Thanks all.

Cheers, gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Did you hear about the model who sat on a broken bottle and cut a nice figure?


From Morand  Thu Aug 18 08:18:43 2011
From: Morand (Guy Morand)
Date: Thu, 18 Aug 2011 17:18:43 +0200
Subject: wpa_supplicant doesn't start when no password is set
Message-ID: <A91D8217D6A8B240A79EBEE98176B19B2DD996D5BB@PRISM.telecontrol.local>

Hello everyone,

I'm playing with wpa_supplicant, it's working greate, thanks for the excellent job!

However, I sometime use the "save" command to save my current configuration and it writes that kind of configuration. I never edit the file myself, I only configure my network with wpa_cli. This happens when the connection failed using the WPS button or when I add a fake network without encryption:
network={
	ssid="MyNetwork"
}

At next startup, it fails with an error. I've found a bug report in archlinux that perfectly describes the case:
https://bugs.archlinux.org/task/18212

To avoid the problem, I quickly made a DIRTY hack, here is the patch:
Index: wpa_supplicant-0.7.3/wpa_supplicant/config_file.c
Index: wpa_supplicant-0.7.3/wpa_supplicant/config_file.c
===================================================================
--- wpa_supplicant-0.7.3.orig/wpa_supplicant/config_file.c
+++ wpa_supplicant-0.7.3/wpa_supplicant/config_file.c
@@ -105,6 +105,12 @@ static int wpa_config_validate_network(s
 		wpa_config_update_psk(ssid);
 	}
 
+        /** 
+         * Do not make error if PSK network as no key set. This to avoid an error at
+         * startup when wpa_supplicant update the configuration file and is not able
+         * to follow its own syntax!
+         **/
+        /*
 	if ((ssid->key_mgmt & (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_PSK |
 			       WPA_KEY_MGMT_PSK_SHA256)) &&
 	    !ssid->psk_set) {
@@ -112,6 +118,7 @@ static int wpa_config_validate_network(s
 			   "management, but no PSK configured.", line);
 		errors++;
 	}
+        */
 
 	if ((ssid->group_cipher & WPA_CIPHER_CCMP) &&
 	    !(ssid->pairwise_cipher & WPA_CIPHER_CCMP) &&
===================================================================

It does some ioctl error at startup but at least the service is started... As it is said on archlinux bug report, it would be better to add the "security=NONE" directly when the configuration is saved...

Probably you already know that behavior but as it looks like it has not been corrected since last February, I thought it was a good idea to tell you. Should I also do a bug report ?

Regards,

Guy Morand



From gmorain  Thu Aug 18 09:30:38 2011
From: gmorain (Gary Morain)
Date: Thu, 18 Aug 2011 09:30:38 -0700
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz
	networks.
In-Reply-To: <1313535025.17793.27.camel@dcbw.foobar.com>
References: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
	<1313448107.6103.12.camel@dcbw.foobar.com>
	<CA+yqC4YyLpqoCfSbvn9s6889anhHmgYv0Si1TcGa+ei_y_Biiw@mail.gmail.com>
	<1313535025.17793.27.camel@dcbw.foobar.com>
Message-ID: <CADfcX6om_r0ygwR_28Bg=VHabGYHzDGdxM1+J2hFw33V_m6vbQ@mail.gmail.com>

[resending from the right account...]

On Tue, Aug 16, 2011 at 3:50 PM, Dan Williams <dcbw at redhat.com> wrote:

> On Tue, 2011-08-16 at 10:43 -0700, Sam Leffler wrote:
> > On Mon, Aug 15, 2011 at 3:41 PM, Dan Williams <dcbw at redhat.com> wrote:
> > > On Fri, 2011-08-05 at 16:23 -0700, Gary Morain wrote:
> > >> In scan.c, merge a channel's noise value into the scan results.  When
> comparing
> > >> scan results, compute the signal-to-noise ratio and use it when
> available.
> > >> Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR
> is
> > >> relatively close to the other network's.
> > >
> > > Honestly I'd rather have something like a "bands" option on a
> > > per-netblock basis, so you could do this:
> > >
> > > bands=5
> > > bands=5,2
> > > bands=2,5
> > > bands=2
> > >
> > > ie, the connection manager can set whichever band it prefers, or leave
> > > it out entirely to let the supplicant do whatever it's already doing.
> > > The problem with micro-optimizations like this are that they often
> > > break, and they aren't necessarily clear.  I'd advocate for simpler,
> > > clearer rules here, with behavior set by the connection manager, rather
> > > than continually more complicated matching rules in the supplicant
> > > itself...
> >
> > I'm trying to understand how this would be used.  The point of Gary's
> > change is to prefer the 5GHz band only when two AP's have equivalent
> > signal quality. (5GHz is considered better because it has
> > non-overlapping channels, less likely to have interference, etc.)
> > This is meant to improve the algorithm by which a BSS is selected.
>
> Yeah, I guess that's different than I'm proposing.  But making this
> decision is still a policy decision that I'm not sure should be done in
> the supplicant.
>

The supplicant already makes a decision on which channel to use.  I'm not
proposing a new policy but instead a refinement of the existing policy to
prefer 5 GHz channels.

There are in fact two refinements in the CL.

1) Instead of using signal level as the criteria for channel quality, use
signal-to-noise ratio if available.  SNR is a better metric.  Also, cap SNR
at 30 because channels with an SNR greater than 30 will perform equally well
from a signal quality point of view.  Using SNR for selecting channel is
better for all bands.

2) If two channels have the same or close-enough SNR, then prefer the 5 GHz
channel.  Because of the capping of SNR at 30, it is much more likely that
this preference will occur.

What seems to be controversial is preferring 5 GHz channels.  This behavior
can be configurable.  For sake of simplicity, I propose making the 5 GHz
preference a compile-time option, defaulted to off.

Can we get agreement on this?

>
> > Also, specifying a preference on a per-netblock basis seems odd; when
> > would you want to control band preferences only for a specific SSID?
>
> I've had this request come up periodically.  If your institution uses
> the same SSID between the 5GHz and 2.4GHz wifi networks, but you'd like
> to always be on the 5GHz segment because it's less loaded.  But other
> places you may not want to be on the 5GHz network.  It really is a
> per-SSID (ie per network) preference.
>
> > You can lock down a netblock using bssid= and assign priority though
> > it might be painful to list all the AP's in an ESS.  If we really want
> > to add this complexity it seems like it belongs per-interface or
> > global (or at compile-time).
>
> I disagree.  It's not global to the entire decision, it's specific to
> the netblock.  You may not always want to prefer 5GHz networks
> everywhere you are.  The problem with the freq= parameter is that to
> achieve this behavior you'd have to list *all* the frequencies in the
> 5GHz and 2.4GHz range, while using bssid= is a no-go because the
> situation where you want this behavior is one where there are a ton of
> APs around.
>
> Dan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110818/cc46aa1d/attachment.htm 


From galenz  Thu Aug 18 10:51:00 2011
From: galenz (Galen)
Date: Thu, 18 Aug 2011 10:51:00 -0700
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz
	networks.
In-Reply-To: <CADfcX6om_r0ygwR_28Bg=VHabGYHzDGdxM1+J2hFw33V_m6vbQ@mail.gmail.com>
References: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
	<1313448107.6103.12.camel@dcbw.foobar.com>
	<CA+yqC4YyLpqoCfSbvn9s6889anhHmgYv0Si1TcGa+ei_y_Biiw@mail.gmail.com>
	<1313535025.17793.27.camel@dcbw.foobar.com>
	<CADfcX6om_r0ygwR_28Bg=VHabGYHzDGdxM1+J2hFw33V_m6vbQ@mail.gmail.com>
Message-ID: <76DF7881-9250-4B48-BCE6-993976EA49D2@zinkconsulting.com>


On Aug 18, 2011, at 9:30 AM, Gary Morain wrote:

> [resending from the right account...]
> 
> On Tue, Aug 16, 2011 at 3:50 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Tue, 2011-08-16 at 10:43 -0700, Sam Leffler wrote:
> > On Mon, Aug 15, 2011 at 3:41 PM, Dan Williams <dcbw at redhat.com> wrote:
> > > On Fri, 2011-08-05 at 16:23 -0700, Gary Morain wrote:
> > >> In scan.c, merge a channel's noise value into the scan results.  When comparing
> > >> scan results, compute the signal-to-noise ratio and use it when available.
> > >> Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR is
> > >> relatively close to the other network's.
> > >
> > > Honestly I'd rather have something like a "bands" option on a
> > > per-netblock basis, so you could do this:
> > >
> > > bands=5
> > > bands=5,2
> > > bands=2,5
> > > bands=2
> > >
> > > ie, the connection manager can set whichever band it prefers, or leave
> > > it out entirely to let the supplicant do whatever it's already doing.
> > > The problem with micro-optimizations like this are that they often
> > > break, and they aren't necessarily clear.  I'd advocate for simpler,
> > > clearer rules here, with behavior set by the connection manager, rather
> > > than continually more complicated matching rules in the supplicant
> > > itself...
> >
> > I'm trying to understand how this would be used.  The point of Gary's
> > change is to prefer the 5GHz band only when two AP's have equivalent
> > signal quality. (5GHz is considered better because it has
> > non-overlapping channels, less likely to have interference, etc.)
> > This is meant to improve the algorithm by which a BSS is selected.
> 
> Yeah, I guess that's different than I'm proposing.  But making this
> decision is still a policy decision that I'm not sure should be done in
> the supplicant.
> 
> The supplicant already makes a decision on which channel to use.  I'm not proposing a new policy but instead a refinement of the existing policy to prefer 5 GHz channels.
> 
> There are in fact two refinements in the CL.
> 
> 1) Instead of using signal level as the criteria for channel quality, use signal-to-noise ratio if available.  SNR is a better metric.  Also, cap SNR at 30 because channels with an SNR greater than 30 will perform equally well from a signal quality point of view.  Using SNR for selecting channel is better for all bands.
> 
> 2) If two channels have the same or close-enough SNR, then prefer the 5 GHz channel.  Because of the capping of SNR at 30, it is much more likely that this preference will occur.
> 
> What seems to be controversial is preferring 5 GHz channels.  This behavior can be configurable.  For sake of simplicity, I propose making the 5 GHz preference a compile-time option, defaulted to off.

I think we can agree that the overall goal here is to improve the probability that a typical user will experience excellent WiFi performance. In this light, I think it's hard to avoid the fact that some kind of 5 GHz preference is going to benefit performance for the typical user. I realize that any preference for the 5 GHz band will create some edge cases where a user might experience decreased performance ("cost"), but I see this as an issue of balancing the cost/benefit ratio.

I would suggest that we step back and take some time to devise an actually intelligent algorithm for 5 GHz preference. Done properly, this should significantly minimize the number of cases where typical users will experience decreased performance, while maximizing the potential benefit. There are some very important considerations in devising this algorithm:

* SNR is a very poor metric. There's no way to reasonably model a relationship between SNR and data rate, with varying channel widths and bands. SNR has to be used, at best, as a very limited heuristic in the decision making process.

* Channel widths are a huge consideration. 40 MHz channel widths in the 5 GHz band are common, while relatively rare in the 2.4 GHz band. 

* Using actual rate selection data might be a good consideration. This is a far better measure that accounts for both channel width and SNR.

It seems like a good approach to this issue would be to "try" the 5 GHz network first if the SNR is anywhere near sane, measure the data rate, and then jump to the 2.4 GHz network if the data rate is proving too low. Given the typical 40 MHz at 5 GHz / 20 MHz at 2.4 GHz scenario, it is possible to use any of the 16-QAM data rates on the 5 GHz band and get throughputs greater than all but the highest data rates on the 40 MHz channel. It is even possible for the 40 MHz channel to have an inferior SNR and achieve superior throughput simply because of the channel width - remember that the noisy channel coding theorem dictates the relationship between bitrate and SNR, and the relationship is exponential, not linear, thus higher bitrates require a significantly better SNR than lower bitrates.

In my experiences deploying WiFi networks, I've never seen a WiFi client where the 5 GHz band preference has been too strong. For example, Apple has implemented a preference for the 5 GHz networks and even with those settings, and even increased the strength of this preference in later releases of their OS, yet I still find lots of real-world situations with WiFi deployments where I split the networks into 5 GHz and 2.4 GHz SSIDs so I can force clients onto the 5 GHz because the built-in preference for 5 GHz is not strong enough.

I also believe that facilitating a robust 5 GHz preference is good practice for the larger community. By supporting 5 GHz properly (and by default) we can help support the wider deployment of dual-band WiFi networks, which will be a big win for everybody.

> Can we get agreement on this? 
> 
> > Also, specifying a preference on a per-netblock basis seems odd; when
> > would you want to control band preferences only for a specific SSID?
> 
> I've had this request come up periodically.  If your institution uses
> the same SSID between the 5GHz and 2.4GHz wifi networks, but you'd like
> to always be on the 5GHz segment because it's less loaded.  But other
> places you may not want to be on the 5GHz network.  It really is a
> per-SSID (ie per network) preference.
> 
> > You can lock down a netblock using bssid= and assign priority though
> > it might be painful to list all the AP's in an ESS.  If we really want
> > to add this complexity it seems like it belongs per-interface or
> > global (or at compile-time).
> 
> I disagree.  It's not global to the entire decision, it's specific to
> the netblock.  You may not always want to prefer 5GHz networks
> everywhere you are.  The problem with the freq= parameter is that to
> achieve this behavior you'd have to list *all* the frequencies in the
> 5GHz and 2.4GHz range, while using bssid= is a no-go because the
> situation where you want this behavior is one where there are a ton of
> APs around.
> 
> Dan
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110818/9c872f2e/attachment-0001.htm 


From sleffler  Thu Aug 18 11:07:41 2011
From: sleffler (Sam Leffler)
Date: Thu, 18 Aug 2011 11:07:41 -0700
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz
	networks.
In-Reply-To: <1313535025.17793.27.camel@dcbw.foobar.com>
References: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
	<1313448107.6103.12.camel@dcbw.foobar.com>
	<CA+yqC4YyLpqoCfSbvn9s6889anhHmgYv0Si1TcGa+ei_y_Biiw@mail.gmail.com>
	<1313535025.17793.27.camel@dcbw.foobar.com>
Message-ID: <CA+yqC4bGjDGivgDBhedmx7kizmZG7AqScebZrtk86GLsYok2xQ@mail.gmail.com>

On Tue, Aug 16, 2011 at 3:50 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Tue, 2011-08-16 at 10:43 -0700, Sam Leffler wrote:
>> On Mon, Aug 15, 2011 at 3:41 PM, Dan Williams <dcbw at redhat.com> wrote:
>> > On Fri, 2011-08-05 at 16:23 -0700, Gary Morain wrote:
>> >> In scan.c, merge a channel's noise value into the scan results. ?When comparing
>> >> scan results, compute the signal-to-noise ratio and use it when available.
>> >> Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR is
>> >> relatively close to the other network's.
>> >
>> > Honestly I'd rather have something like a "bands" option on a
>> > per-netblock basis, so you could do this:
>> >
>> > bands=5
>> > bands=5,2
>> > bands=2,5
>> > bands=2
>> >
>> > ie, the connection manager can set whichever band it prefers, or leave
>> > it out entirely to let the supplicant do whatever it's already doing.
>> > The problem with micro-optimizations like this are that they often
>> > break, and they aren't necessarily clear. ?I'd advocate for simpler,
>> > clearer rules here, with behavior set by the connection manager, rather
>> > than continually more complicated matching rules in the supplicant
>> > itself...
>>
>> I'm trying to understand how this would be used. ?The point of Gary's
>> change is to prefer the 5GHz band only when two AP's have equivalent
>> signal quality. (5GHz is considered better because it has
>> non-overlapping channels, less likely to have interference, etc.)
>> This is meant to improve the algorithm by which a BSS is selected.
>
> Yeah, I guess that's different than I'm proposing. ?But making this
> decision is still a policy decision that I'm not sure should be done in
> the supplicant.

supplicant already imposes many policies; I think this one is minor in
comparison.

>
>> Also, specifying a preference on a per-netblock basis seems odd; when
>> would you want to control band preferences only for a specific SSID?
>
> I've had this request come up periodically. ?If your institution uses
> the same SSID between the 5GHz and 2.4GHz wifi networks, but you'd like
> to always be on the 5GHz segment because it's less loaded. ?But other
> places you may not want to be on the 5GHz network. ?It really is a
> per-SSID (ie per network) preference.

Using band preference to determine channel congestion is a mistake
IMO.  You can add a metric to measure the channel congestion and this
seems like a fine thing to do--but separately.

>
>> You can lock down a netblock using bssid= and assign priority though
>> it might be painful to list all the AP's in an ESS. ?If we really want
>> to add this complexity it seems like it belongs per-interface or
>> global (or at compile-time).
>
> I disagree. ?It's not global to the entire decision, it's specific to
> the netblock. ?You may not always want to prefer 5GHz networks
> everywhere you are. ?The problem with the freq= parameter is that to
> achieve this behavior you'd have to list *all* the frequencies in the
> 5GHz and 2.4GHz range, while using bssid= is a no-go because the
> situation where you want this behavior is one where there are a ton of
> APs around.

It sounds like we should just split the "prefer 5GHz" thing out.  I
don't think you're going to be happy w/ any configuration knobs for
the situations you're thinking of.  Instead you need to add more data
to make a more informed decision.

-Sam


From emailgrant  Thu Aug 18 11:10:14 2011
From: emailgrant (Grant)
Date: Thu, 18 Aug 2011 11:10:14 -0700
Subject: 802.11a/n
In-Reply-To: <20110818135609.GA6623@jm.kir.nu>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110816133312.GA4895@jm.kir.nu>
	<201108161510.31948.david.goodenough@btconnect.com>
	<201108161631.17052.chunkeey@googlemail.com>
	<CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>
	<4E4B8DD7.7060905@wildgooses.com>
	<CAN0CFw0ihQ4EN_mE3S+-AEaazh8OOLGebt781fkEpTUXeteKbQ@mail.gmail.com>
	<20110818135609.GA6623@jm.kir.nu>
Message-ID: <CAN0CFw04yBJAvd4cyyoyk-FpDHbf6derGymtoH3Phx+Nvx4bEA@mail.gmail.com>

>> I noticed that the channel allowances for country 00 match what is
>> enabled for me under crda. ?The kernel must set my country to US and
>> crda must set it to 00. ?I'm using crda-1.1.1 and
>> wireless-regdb-20101124 which are Gentoo's latest versions. ?Does
>> anyone know what could be wrong? ?Are these packages created by
>> Gentoo, meaning I should file a bug with them?
>
> Could you please check what the driver is saying about the regulatory
> domain of the card? You can check this in dmesg output, e.g., like this:
>
> $ dmesg | grep "ath:"
> [ ? 11.255148] ath: EEPROM regdomain: 0x64
> [ ? 11.255150] ath: EEPROM indicates we should expect a direct regpair
> map
> [ ? 11.255154] ath: Country alpha2 being used: 00
> [ ? 11.255156] ath: Regpair used: 0x64

I get this and only the default "00" channels are enabled:

# dmesg|grep ath
ath9k 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
ath9k 0000:02:00.0: setting latency timer to 64
ath: EEPROM regdomain: 0x0
ath: EEPROM indicates default country code should be used
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x3a
ath: Country alpha2 being used: US
ath: Regpair used: 0x3a
ieee80211 phy0: Selected rate control algorithm 'ath9k_rate_control'
Registered led device: ath9k-phy0

# dmesg|grep cfg80211
cfg80211: Calling CRDA to update world regulatory domain

When I enable CONFIG_CFG80211_INTERNAL_REGDB (without editing db.txt),
I get this instead and all US channels are enabled:

# dmesg|grep cfg80211
cfg80211: Calling CRDA for country: US
cfg80211: Regulatory domain changed to country: US
cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
cfg80211:     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5490000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)

Since CONFIG_CFG80211_INTERNAL_REGDB works perfectly, I think
something is wrong with my userspace crda.

- Grant


From emailgrant  Thu Aug 18 11:16:54 2011
From: emailgrant (Grant)
Date: Thu, 18 Aug 2011 11:16:54 -0700
Subject: 802.11a/n
In-Reply-To: <4E4CDBD9.7080701@wildgooses.com>
References: <CAN0CFw2mJoNz86r0kt745j4duXFKwY=v4mq1Gvjvpg43Xq3hSA@mail.gmail.com>
	<20110816133312.GA4895@jm.kir.nu>
	<201108161510.31948.david.goodenough@btconnect.com>
	<201108161631.17052.chunkeey@googlemail.com>
	<CAN0CFw2r2PzhquteJ3nHwkBgz=-BHoT8Q7a9WHOJgzVqN+iroA@mail.gmail.com>
	<4E4B8DD7.7060905@wildgooses.com>
	<CAN0CFw0ihQ4EN_mE3S+-AEaazh8OOLGebt781fkEpTUXeteKbQ@mail.gmail.com>
	<4E4CDBD9.7080701@wildgooses.com>
Message-ID: <CAN0CFw2f1e1UhpGVsC5y+4h0ftn48930jfFQPe+FmEgBqPY-mw@mail.gmail.com>

>>>> What a drag. ?So no Linux AP is capable of operating on any 5Ghz channel?
>>>>
>>>> For when I travel outside of the US, EU, and Japan, can this be
>>>> overridden with a kernel patch? ?If so, is such a patch available?
>>>
>>> I presume this is driven by the CRDA regulatory stuff? (Please correct me?)
>>>
>>> If you are using some modern distro then it's probably done in userspace
>>> using the crda service (more on the wiki). If you are building your own
>>> then you can compile into the kernel your own regional settings (ie what
>>> *you* are allowed to use) by editing: linux/net/wireless/db.txt
>>
>> I switched to kernel control of regional settings and channels without
>> editing db.txt and the channels which are supposed to work in the US
>> without DFS started working: 36, 40, 44, 48, 149, 153, 157, 161, 165.
>> I noticed in dmesg I had:
>>
>> cfg80211: Calling CRDA for country: US
>>
>> Switching back from kernel control to crda again disabled all 5ghz
>> channels and in dmesg I only get:
>>
>> cfg80211: Calling CRDA to update world regulatory domain
>>
>> I noticed that the channel allowances for country 00 match what is
>> enabled for me under crda. ?The kernel must set my country to US and
>> crda must set it to 00. ?I'm using crda-1.1.1 and
>> wireless-regdb-20101124 which are Gentoo's latest versions. ?Does
>> anyone know what could be wrong? ?Are these packages created by
>> Gentoo, meaning I should file a bug with them?
>
> Hi, I am also using gentoo:
>
> a) I think you will see that there is some 2011 package if you unmask it?

I just synced and I have:

# ls -l /usr/portage/net-wireless/wireless-regdb
total 28
-rw-r--r-- 1 root root 4013 Mar 18 09:31 ChangeLog
-rw-r--r-- 1 root root 2294 Mar 18 09:31 Manifest
-rw-r--r-- 1 root root  357 Jan 15  2009 metadata.xml
-rw-r--r-- 1 root root  821 Mar 20  2009 wireless-regdb-20090115.ebuild
-rw-r--r-- 1 root root  914 Nov  4  2009 wireless-regdb-20091104.ebuild
-rw-r--r-- 1 root root  914 Nov 26  2009 wireless-regdb-20091125.ebuild
-rw-r--r-- 1 root root  914 Mar 18 09:18 wireless-regdb-20101124.ebuild

> b) I seem to remember fiddling with this and deciding that userspace was
> a lot of work given that I update kernels more frequently than the
> userspace tool was being updated...
>
> I *think* you will find that you need to watch VERY closely what is
> really going on here. ?I think that there is a) card default regulatory,
> b) kernel default, c) regulatory spotted from nearby basestations, d)
> some peculiar choices if there isn't a regulatory exactly matching what
> it's trying to search for (goes to "world" instead?)
>
> So in your regulatory DB, check what the 00 world settings are and it's
> likely that you are getting these rather than US?

That's exactly what happens with userspace crda, but if I enable
CONFIG_CFG80211_INTERNAL_REGDB and I don't edit db.txt at all, the US
channels all work.

- Grant


> Anyway, fiddle with it and you might come to the conclusion that right
> now it's simpler to edit db.txt and set the 00 settings to be the
> correct ones for your regulatory area, delete everything else from that
> file and use only kernel regulatory domains... ?Just a thought, make
> sure what you do is legal in your domain...
>
> GOod luck
>
> Ed W


From sleffler  Thu Aug 18 11:52:35 2011
From: sleffler (Sam Leffler)
Date: Thu, 18 Aug 2011 11:52:35 -0700
Subject: [PATCH] wpa_supplicant: Prefer 5 GHz networks over 2.4 GHz
	networks.
In-Reply-To: <76DF7881-9250-4B48-BCE6-993976EA49D2@zinkconsulting.com>
References: <20110815162616.3693780745@gary-pc2.mtv.corp.google.com>
	<1313448107.6103.12.camel@dcbw.foobar.com>
	<CA+yqC4YyLpqoCfSbvn9s6889anhHmgYv0Si1TcGa+ei_y_Biiw@mail.gmail.com>
	<1313535025.17793.27.camel@dcbw.foobar.com>
	<CADfcX6om_r0ygwR_28Bg=VHabGYHzDGdxM1+J2hFw33V_m6vbQ@mail.gmail.com>
	<76DF7881-9250-4B48-BCE6-993976EA49D2@zinkconsulting.com>
Message-ID: <CA+yqC4YHNJVVAk8pixncTZzusWVUOQdM1ZTxLOHkYckUPm1JsA@mail.gmail.com>

On Thu, Aug 18, 2011 at 10:51 AM, Galen <galenz at zinkconsulting.com> wrote:
>
> On Aug 18, 2011, at 9:30 AM, Gary Morain wrote:
>
> [resending from the right account...]
> On Tue, Aug 16, 2011 at 3:50 PM, Dan Williams <dcbw at redhat.com> wrote:
>>
>> On Tue, 2011-08-16 at 10:43 -0700, Sam Leffler wrote:
>> > On Mon, Aug 15, 2011 at 3:41 PM, Dan Williams <dcbw at redhat.com> wrote:
>> > > On Fri, 2011-08-05 at 16:23 -0700, Gary Morain wrote:
>> > >> In scan.c, merge a channel's noise value into the scan results. ?When
>> > >> comparing
>> > >> scan results, compute the signal-to-noise ratio and use it when
>> > >> available.
>> > >> Prefer a 5 GHz network if its SNR is really big (> 30) or if its SNR
>> > >> is
>> > >> relatively close to the other network's.
>> > >
>> > > Honestly I'd rather have something like a "bands" option on a
>> > > per-netblock basis, so you could do this:
>> > >
>> > > bands=5
>> > > bands=5,2
>> > > bands=2,5
>> > > bands=2
>> > >
>> > > ie, the connection manager can set whichever band it prefers, or leave
>> > > it out entirely to let the supplicant do whatever it's already doing.
>> > > The problem with micro-optimizations like this are that they often
>> > > break, and they aren't necessarily clear. ?I'd advocate for simpler,
>> > > clearer rules here, with behavior set by the connection manager,
>> > > rather
>> > > than continually more complicated matching rules in the supplicant
>> > > itself...
>> >
>> > I'm trying to understand how this would be used. ?The point of Gary's
>> > change is to prefer the 5GHz band only when two AP's have equivalent
>> > signal quality. (5GHz is considered better because it has
>> > non-overlapping channels, less likely to have interference, etc.)
>> > This is meant to improve the algorithm by which a BSS is selected.
>>
>> Yeah, I guess that's different than I'm proposing. ?But making this
>> decision is still a policy decision that I'm not sure should be done in
>> the supplicant.
>
> The supplicant already makes a decision on which channel to use. ?I'm not
> proposing a new policy but instead a refinement of the existing policy to
> prefer 5 GHz channels.
> There are in fact two refinements in the CL.
> 1) Instead of using signal level as the criteria for channel quality, use
> signal-to-noise ratio if available. ?SNR is a better metric. ?Also, cap SNR
> at 30 because channels with an SNR greater than 30 will perform equally well
> from a signal quality point of view. ?Using SNR for selecting channel is
> better for all bands.
> 2) If two channels have the same or close-enough SNR, then prefer the 5 GHz
> channel. ?Because of the capping of SNR at 30, it is much more likely that
> this preference will occur.
> What seems to be controversial is preferring 5 GHz channels. ?This behavior
> can be configurable. ?For sake of simplicity, I propose making the 5 GHz
> preference a compile-time option, defaulted to off.
>
> I think we can agree that the overall goal here is to improve the
> probability that a typical user will experience excellent WiFi performance.
> In this light, I think it's hard to avoid the fact that some kind of 5 GHz
> preference is going to benefit performance for the typical user. I realize
> that any preference for the 5 GHz band will create some edge cases where a
> user might experience decreased performance ("cost"), but I see this as an
> issue of balancing the cost/benefit ratio.
> I would suggest that we step back and take some time to devise an actually
> intelligent algorithm for 5 GHz preference. Done properly, this should
> significantly minimize the number of cases where typical users will
> experience decreased performance, while maximizing the potential benefit.
> There are some very important considerations in devising this algorithm:
> * SNR is a very poor metric.?There's no way to reasonably model a
> relationship between SNR and data rate, with varying channel widths and
> bands. SNR has to be used, at best, as a very limited heuristic in the
> decision making process.

The basic issue here is that the existing signal level metric is
broken by design.  With NF different on every channel blindly
comparing values causes you to choose the wrong device.  Using "SNR"
improves this (there are too many different names for the value
RSSI-NF).  The preference for 5GHz is separate and perhaps should've
been split into a separate change.

> * Channel widths are a huge consideration. 40 MHz channel widths in the 5
> GHz band are common, while relatively rare in the 2.4 GHz band.

Not really relevant; this should be addressed when comparing the AP's
capabilities.

> * Using actual rate selection data might be a good consideration. This is a
> far better measure that accounts for both channel width and SNR.
> It seems like a good approach to this issue would be to "try" the 5 GHz
> network first if the SNR is anywhere near sane, measure the data rate, and
> then jump to the 2.4 GHz network if the data rate is proving too low. Given
> the typical 40 MHz at 5 GHz / 20 MHz at 2.4 GHz scenario, it is possible to
> use any of the 16-QAM data rates on the 5 GHz band and get throughputs
> greater than all but the highest data rates on the 40 MHz channel. It is
> even possible for the 40 MHz channel to have an inferior SNR and achieve
> superior throughput simply because of the channel width - remember that the
> noisy channel coding theorem dictates the relationship between bitrate and
> SNR, and the relationship is exponential, not linear, thus higher bitrates
> require a significantly better SNR than lower bitrates.

We're talking about selecting the "best BSS to join" given (limited)
scan results.  Unfortunately supplicant doesn't currently maintain
historical data to make more informed decisions.  But again, not
related to the issue at hand.

> In my experiences deploying WiFi networks, I've never seen a WiFi client
> where the 5 GHz band preference has been too strong. For example, Apple has
> implemented a preference for the 5 GHz networks and even with those
> settings, and even increased the strength of this preference in later
> releases of their OS, yet I still find lots of real-world situations with
> WiFi deployments where I split the networks into 5 GHz and 2.4 GHz SSIDs so
> I can force clients onto the 5 GHz because the built-in preference for 5 GHz
> is not strong enough.
> I also believe that facilitating a robust 5 GHz preference is good practice
> for the larger community. By supporting 5 GHz properly (and by default) we
> can help support the wider deployment of dual-band WiFi networks, which will
> be a big win for everybody.
>
> Can we get agreement on this?
>>
>> > Also, specifying a preference on a per-netblock basis seems odd; when
>> > would you want to control band preferences only for a specific SSID?
>>
>> I've had this request come up periodically. ?If your institution uses
>> the same SSID between the 5GHz and 2.4GHz wifi networks, but you'd like
>> to always be on the 5GHz segment because it's less loaded. ?But other
>> places you may not want to be on the 5GHz network. ?It really is a
>> per-SSID (ie per network) preference.
>>
>> > You can lock down a netblock using bssid= and assign priority though
>> > it might be painful to list all the AP's in an ESS. ?If we really want
>> > to add this complexity it seems like it belongs per-interface or
>> > global (or at compile-time).
>>
>> I disagree. ?It's not global to the entire decision, it's specific to
>> the netblock. ?You may not always want to prefer 5GHz networks
>> everywhere you are. ?The problem with the freq= parameter is that to
>> achieve this behavior you'd have to list *all* the frequencies in the
>> 5GHz and 2.4GHz range, while using bssid= is a no-go because the
>> situation where you want this behavior is one where there are a ton of
>> APs around.
>>
>> Dan
>>
>


From dgdiniz  Thu Aug 18 14:50:13 2011
From: dgdiniz (Douglas Diniz)
Date: Thu, 18 Aug 2011 18:50:13 -0300
Subject: Hostapd and Ubiquiti SR71-15. 5,8GHz not working!
Message-ID: <CALzWxFWb9Ft2HKdF8aeMw11+iUUhKg1_1cV3qdzA+i-mGZMh=g@mail.gmail.com>

Hi, I'm using a SR71-15 (5,8GHz a/n) and when I start hostapd the
following message appears:

wlan0: IEEE 802.11 Configured channel (36) not found from the channel
list of current mode (2) IEEE 802.11a

I found some messages from Jouni saying that AP mode isn't allowed to
work, but I didnt understand why.
When I run "iw list" all the channels has a no-IBSS and/or DFS/radar
detection flags, so this prevent Hostap to work, right?
I changed the countrycode with no success.

The question is: What I have to do to configure this card? Someone has a hint?
The ath9k has support for 5,8GHz cards?

I'm using hostap 0.7.3 and kernel 2.6.36.4.

Thanks....


From leakim.wikstrom  Fri Aug 19 02:47:57 2011
From: leakim.wikstrom (=?ISO-8859-1?Q?Mikael_Wikstr=F6m?=)
Date: Fri, 19 Aug 2011 11:47:57 +0200
Subject: [PATCH 1/2] fix compiler warning (return type declared as u64 but was
	void*)
Message-ID: <CADGsf-FSmTSuQfKBBUswcfWhLYyCvhQOLx24E2KePAGdHsZxmg@mail.gmail.com>



From leakim.wikstrom  Fri Aug 19 02:41:18 2011
From: leakim.wikstrom (Mikael Wikstrom)
Date: Fri, 19 Aug 2011 11:41:18 +0200
Subject: [PATCH 1/2] fix compiler warning (return type declared as u64
Message-ID: <mailman.42.1313747284.8029.hostap@lists.shmoo.com>

but was void*)

---
 src/drivers/driver.h      |    2 +-
 wpa_supplicant/driver_i.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index e2d0f8b..649a826 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2190,7 +2190,7 @@ struct wpa_driver_ops {
 	 * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in
 	 * struct wpa_driver_capa.
 	 */
-	u64 (*p2p_sd_request)(void *priv, const u8 *dst,
+	void* (*p2p_sd_request)(void *priv, const u8 *dst,
 			      const struct wpabuf *tlvs);

 	/**
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index 79fdddd..8619e49 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -623,12 +623,12 @@ static inline int
wpa_drv_p2p_prov_disc_req(struct wpa_supplicant *wpa_s,
 						config_methods);
 }

-static inline u64 wpa_drv_p2p_sd_request(struct wpa_supplicant *wpa_s,
+static inline void* wpa_drv_p2p_sd_request(struct wpa_supplicant *wpa_s,
 					 const u8 *dst,
 					 const struct wpabuf *tlvs)
 {
 	if (!wpa_s->driver->p2p_sd_request)
-		return 0;
+		return NULL;
 	return wpa_s->driver->p2p_sd_request(wpa_s->drv_priv, dst, tlvs);
 }

-- 
1.7.4.1


From leakim.wikstrom  Fri Aug 19 02:48:49 2011
From: leakim.wikstrom (=?ISO-8859-1?Q?Mikael_Wikstr=F6m?=)
Date: Fri, 19 Aug 2011 11:48:49 +0200
Subject: [PATCH 2/2] incorrect typecast of void* (addr was used and not value
	pointed at)
Message-ID: <CADGsf-E9JX+_niOYZ+XZi2KWcr=uZnG3_Fs4OARiuV3iyKPA9A@mail.gmail.com>



From leakim.wikstrom  Fri Aug 19 02:42:52 2011
From: leakim.wikstrom (Mikael Wikstrom)
Date: Fri, 19 Aug 2011 11:42:52 +0200
Subject: [PATCH 2/2] incorrect typecast of void* (addr was used and
Message-ID: <mailman.43.1313747336.8029.hostap@lists.shmoo.com>

not value pointed at)

---
 wpa_supplicant/p2p_supplicant.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 400b6cc..c39f2d9 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -1733,7 +1733,7 @@ void * wpas_p2p_sd_request_upnp(struct
wpa_supplicant *wpa_s, const u8 *dst,
 int wpas_p2p_sd_cancel_request(struct wpa_supplicant *wpa_s, void *req)
 {
 	if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_MGMT)
-		return wpa_drv_p2p_sd_cancel_request(wpa_s, (u64) req);
+		return wpa_drv_p2p_sd_cancel_request(wpa_s, *((u64*)req));
 	if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
 		return -1;
 	return p2p_sd_cancel_request(wpa_s->global->p2p, req);
-- 
1.7.4.1


From sami.m.ahokas  Fri Aug 19 05:13:26 2011
From: sami.m.ahokas (sami ahokas)
Date: Fri, 19 Aug 2011 15:13:26 +0300
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <20110810181124.1e303ad6@mj>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
	<20110805220157.613355a3@mj>
	<CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>
	<20110809082728.o8imtnc68gc0cswc-cebfxv@webmail.spamcop.net>
	<CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ@mail.gmail.com>
	<20110810181124.1e303ad6@mj>
Message-ID: <CAL-=UpSQfstQsfn0zsUks71=Sss-LEgphecK26efaT-7tz2ngg@mail.gmail.com>

2011/8/11 Pavel Roskin <proski at gnu.org>:
> On Wed, 10 Aug 2011 09:30:27 +0300
> sami ahokas <sami.m.ahokas at gmail.com> wrote:
>
>> Thanks again for your help. But now I have next problem and quick
>> googling didn't give me any answers. Here is what I get from hostapd:
>>
>> ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
>
> It looks like you are using some different driver on ath0. ?Run
>
> readlink /sys/class/net/ath0/device/driver
>
>> ath0: DRIVER Error enabling WPA/802.1X!
>> IEEE 802.1X initialization failed.
>> ath0: Unable to setup interface.
>> rmdir[ctrl_interface]: No such file or directory
>>
>> Why is it complaining about 802.1X? My setup is using WPA-PSK, not
>> 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
>> driver with wrong parameters?
>
> The message comes from driver_madwifi.c and can be easily improved, but
> I don't see much point in that. ?WPA was mentioned after all.
>
> --
> Regards,
> Pavel Roskin
>

Hi,

I'm still struggling with this. I'm back to using ath9k driver. I have
several DWA-556 cards of which some works just fine, but some of them
are awful. I have enabled all possible debug features for ath9k driver
and I have noticed that there are a lot of GTT interrupts on those bad
boards. Can someone tell me what those interrupts are?

Also, with bad boards I get lot of following log messages:

kernel: ath: Reset ANI state opmode 3
kernel: ath: ANI parameters:
kernel: ath: ANI parameters:
kernel: ath: Reset ANI state opmode 3
kernel: ath: ANI parameters:
kernel: ath: ANI parameters:

What are those about?

regards,
Sami


From gheskett  Fri Aug 19 13:42:37 2011
From: gheskett (gene heskett)
Date: Fri, 19 Aug 2011 16:42:37 -0400
Subject: wpa_supplement related question, sort of a ping too
Message-ID: <201108191642.37217.gheskett@wdtv.com>

Greetings all;

I managed to get that Netgear WGR614v10 into lala land yesterday.

Today I did the hardware reset, and started from scratch, following the 
instructions from netgear support to set it up again, and it seems to be 
working well ATM but without any encryption.

On the lappy, which is running ubuntu-10.04 LTS for compatibility with the 
cnc machine control proggy emc, I had to download, build and install 
ndiswrapper-1.56 before it would load the bcmwlhigh5 driver this WNA3100 
dongle needed.  However, the install did not put the file where the ubuntu 
kernel could find it, putting it instead in
 /lib/modules/`uname -r`/kernel/misc 

instead, so I had to copy it over the one in kernel/drivers/wireless.
No biggy.

Rebooted the lappy after toggling the radio push button, but NM apparently 
now knows how to turn it back on without the reboot help.  Nasty of it, so 
I added b43 to the blacklist file & rebooted again.  That finally got rid 
of the old slow radio in the lappy, and it is all working, but wide open, 
no encryption.

So now, here I am, hat in hand, needing instructions AND minimum software 
versions, to make the WPS mode work since both radios now have that WPS 
button.

I am not allergic to grabbing updated versions of wpa_supplicant, iw-tools 
etc and building them from tarball if that is what it takes.  Except for 
putting ndiswrapper.ko in the wrong place, that was a 20 minute or less 
job.

Help, URL's etc gleefully accepted.  Googling isn't a lot of help, 450k 
hits, most on some winderz file format called WPS.  :(

Thanks all for any help.

Cheers, gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
I don't know if it's what you want, but it's what you get.  :-)
             -- Larry Wall in <10502 at jpl-devvax.JPL.NASA.GOV>


From sven.falempin  Fri Aug 19 14:33:48 2011
From: sven.falempin (sven falempin)
Date: Fri, 19 Aug 2011 17:33:48 -0400
Subject: kicking client
Message-ID: <CA++fYEj0=cmo5M765BWpN11CkTtZsWGpHx_QBa8CcNKg=VuW1A@mail.gmail.com>

Hello,

I look around just a bit about kicking connected client,
I saw a little talk about MAC address blacklist and then an update demon
with SIGHUP

Is that the good way to achieve a client  disconnect from server side ?
Is firewalling preferred ?

Best regards,

-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110819/a1e57c33/attachment.htm 


From lacrosse1991  Sat Aug 20 14:22:10 2011
From: lacrosse1991 (austin wonderly)
Date: Sat, 20 Aug 2011 17:22:10 -0400
Subject: What wireless adapter should I use
Message-ID: <CABkXhb9CUE4Ffabb8mOkQaO-oOQqARmV-N_j+L5VD9WBkVHyDg@mail.gmail.com>

I am currently using a dlink dwa552 which seems to make hostapd highly
unstable :/ I would really appreciate some advice as hostapd seems like a
sort of niche program so I cannot find any other advice on Google :/ I am
mostly just looking for a wireless n pci adapter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110820/08f55157/attachment.htm 


From p.f.j.geraedts  Sun Aug 21 07:10:45 2011
From: p.f.j.geraedts (Paul Geraedts)
Date: Sun, 21 Aug 2011 16:10:45 +0200
Subject: What does this logentry mean: received EAPOL-Key 2/2 Group
	with unexpected replay counter
Message-ID: <1313935845.2996.7.camel@prodigy1>

>On Sun, May 01, 2011 at 05:31:59PM +0200, Klaus M?ller wrote:
>> I'm using hostapd and WPA2 / TLS and get lot of these messages:
>> 
>> 10:29:59 hostapd: wlan0: STA 33:33:33:33:33:33 WPA: group key 
>> handshake completed (RSN)
>> 10:29:59 hostapd: wlan0: STA 33:33:33:33:33:33 WPA: received 
>> EAPOL-Key 2/2 Group with unexpected replay counter
>
>It indicates that an unexpected EAPOL-Key frame was seen in group key
>handshake and was ignored by hostapd.
>
>> What does this mean? Did I do something wrong? Is there a fix for 
>> this or is it just normal?
>
>This is most likely caused by hostapd having retried sending of the
>EAPOL-Key message 1/2 and then receiving replies to both attempts of
>that message and then ignoring the second response. This is most likely
>normal behavior and should not cause problems. There have been some
>changes recently to avoid similar issues by using a longer timeout for
>EAPOL-Key frames. If you are seeing real issues (e.g., connection
>failing), you could try the current snapshot of the development branch
>(0.8.x) which includes those changes.
>
>-- 
>Jouni Malinen                                           PGP id EFC895FA


Interesting to read your explanation; I accidentally spotted it while
browsing the mailing list archive.

I have also seen various 'unexpected replay counter' entries in my
OpenWrt logs recently, both concerning the 4-way handshake and the group
rekeying. Interestingly, I got a huge amount of them when my MSI Wind
U100 netbook was on battery power. I guess the netbook goes into some
sort of power saving mode in which the EAPOL timeouts get too small; I
tested with both the original Realtek RTL8187SE card and a replacement
Atheros AR9287 card and the same thing happens for both. The OpenWrt
version I use contains hostapd v0.8.x of 27-05-2011, so I guess it
includes the changes that you mentioned.

A recent patch [1] got rid of the GTK-related 'unexpected replay
counter' entries in my log. The patch accomplish this by increasing the
first 100ms GTK timeout to 1s, just like the later 3 timeouts. This
patch actually triggered me to see what is going on. Some testing
brought me to the next conclusion.

During every 'transaction' of the 4-way handshake (2x) and group
rekeying (1x), hostapd tries (at most) 4 times to receive a reply,
whereupon it accepts whichever reply that comes in first, *but does not
discard the other 3*. As a result, these later replies are processed as
well and typically result in 'unexpected replay counter' log entries.
Apart of that, the timeout of the first of every 4 tries is pretty
tight: only 100ms (possibly for standard compliance?); during my testing
I found that under normal conditions it can take a station upto
200-300ms to reply.

Personally, I think the later 3 replies should not be processed
whatsoever. In that way the 'unexpected replay counter' log entries will
only pop up when something is really wrong. I feel that this is the most
important thing. Apart of that, I think increasing the first timeouts
from 100ms to say 200ms would result in faster (re)connects (especially
interesting in WDS handover situations).

Strictly speaking, the 'unexpected replay counter' log entries are not
correct: the replay counter in the key is not unexpected (hostapd just
asked for this specific key a moment ago). Apart of that, I think it is
a good thing to exclusively use these log entries for warnings; they are
probably meant to warn for replay attacks I guess. Lastly, these log
entries currently make up a significant part of my log, which makes it
hard to go back a day or so (read: I like clean logs :).

I'm interested in your opinion on the matter.

Best regards,

Paul Geraedts


[1] https://dev.openwrt.org/changeset/27822



From lacrosse1991  Sun Aug 21 19:50:23 2011
From: lacrosse1991 (austin wonderly)
Date: Sun, 21 Aug 2011 22:50:23 -0400
Subject: Other ap daemons
In-Reply-To: <CABkXhb8_eAxUwL21L7_swDYPtX-xandweOHzBH461jBDF8HQOQ@mail.gmail.com>
References: <CABkXhb8_eAxUwL21L7_swDYPtX-xandweOHzBH461jBDF8HQOQ@mail.gmail.com>
Message-ID: <CABkXhb8HRMU63v2HiY-XAbMKXML+UVKXkA2BHfwLhKEhL3Wysw@mail.gmail.com>

Do u you guys know of any other wireless access point software because
honestly compared to other Linux related things I have.worked with hostapd
seems to be incredibly unstable :/ plus support for it is pretty much non
existent, you guys never reply to any questions plus when I Google for
support forums for hostapd nothing ever turns up :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110821/c8e4e08f/attachment.htm 


From lists  Sun Aug 21 21:03:16 2011
From: lists (Christ Schlacta)
Date: Sun, 21 Aug 2011 21:03:16 -0700
Subject: Other ap daemons
In-Reply-To: <CABkXhb8HRMU63v2HiY-XAbMKXML+UVKXkA2BHfwLhKEhL3Wysw@mail.gmail.com>
References: <CABkXhb8_eAxUwL21L7_swDYPtX-xandweOHzBH461jBDF8HQOQ@mail.gmail.com>
	<CABkXhb8HRMU63v2HiY-XAbMKXML+UVKXkA2BHfwLhKEhL3Wysw@mail.gmail.com>
Message-ID: <4E51D504.70500@aarcane.org>

On 8/21/2011 19:50, austin wonderly wrote:
>
> Do u you guys know of any other wireless access point software because 
> honestly compared to other Linux related things I have.worked with 
> hostapd seems to be incredibly unstable :/ plus support for it is 
> pretty much non existent, you guys never reply to any questions plus 
> when I Google for support forums for hostapd nothing ever turns up :(
>
>
>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
if hostapd doesn't work for you, it's hardware related or misconfigured.

there is no support for hostapd, because it just works, and works right.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110821/90779880/attachment.htm 


From galenz  Mon Aug 22 10:17:51 2011
From: galenz (Galen)
Date: Mon, 22 Aug 2011 10:17:51 -0700
Subject: Other ap daemons
In-Reply-To: <4E51D504.70500@aarcane.org>
References: <CABkXhb8_eAxUwL21L7_swDYPtX-xandweOHzBH461jBDF8HQOQ@mail.gmail.com>
	<CABkXhb8HRMU63v2HiY-XAbMKXML+UVKXkA2BHfwLhKEhL3Wysw@mail.gmail.com>
	<4E51D504.70500@aarcane.org>
Message-ID: <D8E14D85-57BF-4EB2-AC12-AFB87A155A61@zinkconsulting.com>


On Aug 21, 2011, at 9:03 PM, Christ Schlacta wrote:

> On 8/21/2011 19:50, austin wonderly wrote:
>> 
>> Do u you guys know of any other wireless access point software because honestly compared to other Linux related things I have.worked with hostapd seems to be incredibly unstable :/ plus support for it is pretty much non existent, you guys never reply to any questions plus when I Google for support forums for hostapd nothing ever turns up :( 
>> 
>> 
>> 
>> _______________________________________________
>> HostAP mailing list
>> HostAP at lists.shmoo.com
>> http://lists.shmoo.com/mailman/listinfo/hostap
> if hostapd doesn't work for you, it's hardware related or misconfigured.
> 
> there is no support for hostapd, because it just works, and works right.

I tend to agree that as a general rule of thumb, hostapd does work extremely well. Most "problems" with hostapd tend to either be rooted in either hardware problems, or the drivers that support that hardware (within mac80211, ath9k, etc.) 

-Galen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110822/9b690ac8/attachment.htm 


From ali  Mon Aug 22 23:46:07 2011
From: ali (Ali Bahar)
Date: Tue, 23 Aug 2011 14:46:07 +0800
Subject: Random disconnects
In-Reply-To: <20110721182137.GA7730@jm.kir.nu>
References: <4E221DF8.5070609@skoberne.net> <20110717054808.GA1963@jm.kir.nu>
	<4E284376.7040901@skoberne.net> <20110721155751.GA3985@jm.kir.nu>
	<4E285BB8.4090406@gnu.org> <20110721182137.GA7730@jm.kir.nu>
Message-ID: <20110823064607.GA15368@internetdog.org>

Hi Jouni,


On Thu, Jul 21, 2011 at 09:21:37PM +0300, Jouni Malinen wrote:
> On Thu, Jul 21, 2011 at 01:02:48PM -0400, Pavel Roskin wrote:
> > http://pastebin.com/AM7LP4Yz
> > 
> > It contains such parts as:
> > 
> > 1310857014.482037: RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
> > 1310857014.482277: Wireless event: cmd=0x8b06 len=8
> > 1310857014.482485: RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
> > 1310857014.482715: Wireless event: cmd=0x8b04 len=12
> > 1310857014.482924: RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
> > 1310857014.483157: Wireless event: cmd=0x8b1a len=15
> > 1310857024.464978: Authentication with 00:17:df:2c:c9:e2 timed out.
> > 1310857024.468330: BSSID 00:17:df:2c:c9:e2 blacklist count incremented to 2
> > 1310857024.468723: No keys have been configured - skip key clearing
> > 1310857024.468881: State: ASSOCIATING -> DISCONNECTED
> 
> I would assume that the WEXT events here are triggered by the
> wpa_supplicant association command that happened just before the lines
> you listed here. However, the driver does not complete association
> within ten seconds for some reason and the only way of figuring out what
> the reason was would be to look at driver debug information (or
> potentially a capture file from a sniffer).

I can reproduce the above consistently, and have a sniffer log, if you
are interested. 
This is just FYI, because the behaviour reproduces with only a driver
feature that's not been officially released. So I am not working on
this problem.



From arik  Tue Aug 23 00:18:27 2011
From: arik (Arik Nemtsov)
Date: Tue, 23 Aug 2011 10:18:27 +0300
Subject: [PATCH] hostap: allow action frames with unknown BSSID in GO mode
Message-ID: <1314083907-15812-1-git-send-email-arik@wizery.com>

P2P invitation responses are transmitted with the BSSID set to the peer
address. Pass these action frames up to prevent the GO from getting stuck
in an infinite invite loop.

Signed-off-by: Arik Nemtsov <arik at wizery.com>
---
 src/ap/ieee802_11.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 227a0a5..4a298fb 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1525,6 +1525,11 @@ void ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
 		mgmt->bssid[4] == 0xff && mgmt->bssid[5] == 0xff;
 
 	if (!broadcast &&
+#ifdef CONFIG_P2P
+	    /* Invitation responses can be sent the responder MAC as BSSID */
+	    !((hapd->conf->p2p & P2P_GROUP_OWNER) &&
+	      stype == WLAN_FC_STYPE_ACTION) &&
+#endif /* CONFIG_P2P */
 	    os_memcmp(mgmt->bssid, hapd->own_addr, ETH_ALEN) != 0) {
 		printf("MGMT: BSSID=" MACSTR " not our address\n",
 		       MAC2STR(mgmt->bssid));
-- 
1.7.4.1



From lists  Tue Aug 23 05:52:00 2011
From: lists (Ed W)
Date: Tue, 23 Aug 2011 13:52:00 +0100
Subject: [Patch] Current git fails to build "make hlr_auc_gw" in hostapd
Message-ID: <4E53A270.1040103@wildgooses.com>

For me, current git fails to build (link actually) hlr_auc_gw target in
hostapd.  Log is:

# make hlr_auc_gw
  CC  hlr_auc_gw.c
  CC  ../src/crypto/milenage.c
/usr/lib/gcc/i486-gentoo-linux-uclibc/4.4.5/../../../libcrypto.so:
warning: gethostbyname is obsolescent, use getnameinfo() instead.
../src/crypto/random.o: In function `random_close_fd':
/var/tmp/portage/net-wireless/hostapd-0.8_pre1/work/hostap-9ca47ff/hostapd/../src/crypto/random.c:283:
undefined reference to `eloop_unregister_read_sock'
../src/crypto/random.o: In function `random_init':
/var/tmp/portage/net-wireless/hostapd-0.8_pre1/work/hostap-9ca47ff/hostapd/../src/crypto/random.c:415:
undefined reference to `eloop_register_read_sock'
collect2: ld returned 1 exit status
make: *** [hlr_auc_gw] Error 1


The error appears to be a failure to add the eloop.o to link targets

Suggested patch is as follows:

Signed-off-by: Ed Wildgoose

====================================
--- hostapd/Makefile.orig       2011-08-23 13:44:07.000000000 +0100
+++ hostapd/Makefile    2011-08-23 13:44:17.000000000 +0100
@@ -80,6 +80,7 @@
 CONFIG_ELOOP=eloop
 endif
 OBJS += ../src/utils/$(CONFIG_ELOOP).o
+HOBJS += ../src/utils/$(CONFIG_ELOOP).o
 OBJS_c += ../src/utils/$(CONFIG_ELOOP).o
 OBJS += ../src/utils/common.o
 OBJS += ../src/utils/wpa_debug.o


From jukka.rissanen  Tue Aug 23 07:11:43 2011
From: jukka.rissanen (Jukka Rissanen)
Date: Tue, 23 Aug 2011 17:11:43 +0300
Subject: [PATCH] dbus: Export max scan ssids supported by driver.
Message-ID: <1314108703-3752-1-git-send-email-jukka.rissanen@linux.intel.com>

From: Mohamed Abbas <mohamed.abbas at intel.com>

This is needed for network managers that want to know how
many SSIDs they can scan at the same time.
---
 wpa_supplicant/dbus/dbus_new_handlers.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index c9c53d6..bb68079 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -1977,6 +1977,14 @@ dbus_bool_t wpas_dbus_getter_capabilities(DBusMessageIter *iter,
 		goto nomem;
 	/***** Modes end */
 
+	if (res >= 0) {
+		dbus_int32_t max_scan_ssid = capa.max_scan_ssids;
+
+		if (!wpa_dbus_dict_append_int32(&iter_dict, "MaxScanSSID",
+						max_scan_ssid))
+			goto nomem;
+	}
+
 	if (!wpa_dbus_dict_close_write(&variant_iter, &iter_dict))
 		goto nomem;
 	if (!dbus_message_iter_close_container(iter, &variant_iter))
-- 
1.7.1



From vpn2008  Wed Aug 24 00:51:38 2011
From: vpn2008 (2008 vpn)
Date: Wed, 24 Aug 2011 15:51:38 +0800
Subject: Need we configure certificate file for hostapd when using EAP-FAST?
Message-ID: <CANokWkht7XCLj5z5hByJhQL3jVqEXDXLMbAtqbSkgpOv8Yh1TA@mail.gmail.com>

Because hostapd doesn't support manual PAC file configuration, so need
establish tls tunnel to distribute PAC. Does that means we need configure
certificate files for EAP-FAST?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110824/1158f2fa/attachment.htm 


From swaminathanvasanth.r  Wed Aug 24 04:10:27 2011
From: swaminathanvasanth.r (Swaminathan Vasanth Rajaraman)
Date: Wed, 24 Aug 2011 14:10:27 +0300
Subject: How Beacon staggering and AP Virtualization works ?
Message-ID: <CAEzeFiqE5BQzZCP8Jpnhf2sKXuahH2CG0MwnW+vX+kpceJe5NA@mail.gmail.com>

Hi,


 I would like to know how the beacon staggering works, and how the AP
Virtualization is been implemented in hostapd. I looked into the mail
archives but could not find much details. It would be really great to get
some pointers on getting some information of the same.

Awaiting your kind reply.


Thanks,
-- 
Best Regards,
Swaminathan Vasanth Rajaraman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110824/7c22b95d/attachment.htm 


From kaniki.uday  Thu Aug 25 06:38:04 2011
From: kaniki.uday (uday kiran)
Date: Thu, 25 Aug 2011 19:08:04 +0530
Subject: Help on simulation
Message-ID: <CAOeh9Mvs8PTXHLsx5-51HZW1=5NU-qwgHBx9uyHM63jyxLRcVw@mail.gmail.com>

>
>  On Thu, Aug 11, 2011 at 08:20:55PM +0530, uday kiran wrote:
> > When i run hostapd with the specific .conf file, i have specfied
> > driver=madwifi in the conf file. But it is throwing error as "Line 2:
> > invalid/unknown driver 'madwifi' ".
>
> mac80211_hwsim has nothing to do with madwifi.
>
> > Will mac80211_hwsim run without any driver dependency ?
>
> Yes, but you will need to use driver=nl80211 in hostapd.conf to
> interface with it.
>
> --
> Jouni Malinen                                            PGP id EFC895FA
>
>
>
I am able to successfully establish communication between two radios(one for
AP and other for client) . And I am able to see the authentication and
association between them.

Now I am trying to send data traffic from client to AP.
For that , I am not clear how to interface with wpa_supplicant , so that
when i send a frame from my stub , it will go to wpa_supplicant and finally
to AP encrypted.

Could some one give pointers on how to proceed with my test ?

-Uday
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110825/d33d820a/attachment.htm 


From dcbw  Thu Aug 25 12:41:46 2011
From: dcbw (Dan Williams)
Date: Thu, 25 Aug 2011 14:41:46 -0500
Subject: [PATCH] dbus: Export max scan ssids supported by driver.
In-Reply-To: <1314108703-3752-1-git-send-email-jukka.rissanen@linux.intel.com>
References: <1314108703-3752-1-git-send-email-jukka.rissanen@linux.intel.com>
Message-ID: <1314301308.3922.9.camel@dcbw.foobar.com>

On Tue, 2011-08-23 at 17:11 +0300, Jukka Rissanen wrote:
> From: Mohamed Abbas <mohamed.abbas at intel.com>
> 
> This is needed for network managers that want to know how
> many SSIDs they can scan at the same time.

Yay, thanks for this.  I hadn't quite gotten around to doing it.  Next
question though, if you populate the supplicant with a bunch of
networks, shouldn't it use up to max_scan_ssids from the network blocks
(sorted by priority of course) when doing scans on it's own?  Or does it
do this already?  If not, that would be the  next step.

Dan

> ---
>  wpa_supplicant/dbus/dbus_new_handlers.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
> index c9c53d6..bb68079 100644
> --- a/wpa_supplicant/dbus/dbus_new_handlers.c
> +++ b/wpa_supplicant/dbus/dbus_new_handlers.c
> @@ -1977,6 +1977,14 @@ dbus_bool_t wpas_dbus_getter_capabilities(DBusMessageIter *iter,
>  		goto nomem;
>  	/***** Modes end */
>  
> +	if (res >= 0) {
> +		dbus_int32_t max_scan_ssid = capa.max_scan_ssids;
> +
> +		if (!wpa_dbus_dict_append_int32(&iter_dict, "MaxScanSSID",
> +						max_scan_ssid))
> +			goto nomem;
> +	}
> +
>  	if (!wpa_dbus_dict_close_write(&variant_iter, &iter_dict))
>  		goto nomem;
>  	if (!dbus_message_iter_close_container(iter, &variant_iter))




From stonezju  Fri Aug 26 00:09:51 2011
From: stonezju (Stone)
Date: Fri, 26 Aug 2011 15:09:51 +0800
Subject: Monitor interface for GO in P2P
Message-ID: <CAKH3SjvijFqYuWupdwaSo-6AVu4cu59G5m5n3xQzbqYExOfArA@mail.gmail.com>

Hi all,

When I studied the latest code of wpa_supplicant-0.8.x, I met a problem that
if we want to send mgmt frames for GO in P2P, do we have to create a monitor
interface?
In the commit as below, we can send eapol packet without monitor interface,
so is it possible to send mgmt frames like this way? Thanks a lot.

nl80211: Add l2_packet for AP mode EAPOL TX without monitor iface
This can be used with drivers that do not support monitor interface
when transmitting EAPOL frames in AP mode.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110826/34aa3b63/attachment.htm 


From helmut.schaa  Fri Aug 26 08:27:21 2011
From: helmut.schaa (Helmut Schaa)
Date: Fri, 26 Aug 2011 17:27:21 +0200
Subject: Michael MIC Failure Report with RSN?
Message-ID: <CAGXE3d9i6gO6FD4HR-9qLQs0fCgTsKirt+xktysGw6uXS9G1ug@mail.gmail.com>

Hi,

I've got a client connected to hostapd that is sending a Michael MIC
Failure Report to
a RSN-only AP after the group key handshake:

hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: received EAPOL-Key frame (2/2 Group)
hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: group key handshake completed (RSN)

hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: received EAPOL-Key frame (Request)
hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: received EAPOL-Key Error
Request (STA detected Michael MIC failure)

hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: sending 1/4 msg of 4-Way Handshake
hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: received EAPOL-Key frame
(2/4 Pairwise)
hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: sending 3/4 msg of 4-Way Handshake
hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: received EAPOL-Key frame
(4/4 Pairwise)
hostapd: wlan0: STA 00:40:8c:xx:xx:xx IEEE 802.1X: authorizing port
hostapd: wlan0: STA 00:40:8c:xx:xx:xx RADIUS: starting accounting
session 4E54C35C-00000009
hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: pairwise key handshake
completed (RSN)

hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: received EAPOL-Key frame (Request)
hostapd: wlan0: STA 00:40:8c:xx:xx:xx WPA: received EAPOL-Key Error
Request (STA detected Michael MIC failure)

hostapd: wlan0: IEEE 802.11 TKIP countermeasures initiated

I don't have access to this client but is it really necessary to start
TKIP countermeasures
when running in RSN-only mode (which will deauth all associated clients)?

Thanks,
Helmut


From j  Fri Aug 26 08:45:46 2011
From: j (Jouni Malinen)
Date: Fri, 26 Aug 2011 18:45:46 +0300
Subject: Michael MIC Failure Report with RSN?
In-Reply-To: <CAGXE3d9i6gO6FD4HR-9qLQs0fCgTsKirt+xktysGw6uXS9G1ug@mail.gmail.com>
References: <CAGXE3d9i6gO6FD4HR-9qLQs0fCgTsKirt+xktysGw6uXS9G1ug@mail.gmail.com>
Message-ID: <20110826154546.GA10728@jm.kir.nu>

On Fri, Aug 26, 2011 at 05:27:21PM +0200, Helmut Schaa wrote:
> I've got a client connected to hostapd that is sending a Michael MIC
> Failure Report to
> a RSN-only AP after the group key handshake:

What do you mean with "RSN-only"?

> hostapd: wlan0: IEEE 802.11 TKIP countermeasures initiated
> 
> I don't have access to this client but is it really necessary to start
> TKIP countermeasures
> when running in RSN-only mode (which will deauth all associated clients)?

If the station was using TKIP, then any station that is using TKIP
(e.g., as group cipher) needs to be deauthenticated and forced to rekey.
If the BSS does not enable any use of TKIP, it would sound reasonable to
ignore the error reporting part and only rekey the single station that
was incorrectly sending the Request+Error EAPOL-Key frame.

-- 
Jouni Malinen                                            PGP id EFC895FA


From angie.v.chinchilla  Fri Aug 26 16:55:29 2011
From: angie.v.chinchilla (Angie Chinchilla)
Date: Fri, 26 Aug 2011 16:55:29 -0700
Subject: [PATCH] D-Bus: Fix memory leak when using array of array of bytes
Message-ID: <1314402929-32216-1-git-send-email-angie.v.chinchilla@intel.com>

From: Reinette Chatre <reinette.chatre at intel.com>

When parsing a dict entry which is an array of an array of bytes the entry
representing the dict entry has DBUS_TYPE_ARRAY as its type and
WPAS_DBUS_TYPE_ARRAY as its array_type. The function freeing this parsed
data incorrectly tested the entry type for WPAS_DBUS_TYPE_ARRAY while doing
no testing of this value for array_type. This results in a memory leak
whenever a D-Bus message with this type of data is parsed.

Messages affected are:
fi.w1.wpa_supplicant1.Interface.P2PDevice
	using RequestedDeviceTypes with Find method
	using SecondaryDeviceTypes or VendorExtension with P2PDeviceProperties

fi.w1.wpa_supplicant1.Group
	using WPSVendorExtensions with Properties property

All of the above messages are parsed with the same function,
wpa_dbus_dict_get_entry, so the assignment of the entry's type and
array_type is consistent. The parsed data is also consistently freed with
the same function, wpa_dbus_dict_entry_clear, so we can use the same checks
to free the data correctly.

Signed-off-by: Reinette Chatre <reinette.chatre at intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla at intel.com>
---
 wpa_supplicant/dbus/dbus_dict_helpers.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_dict_helpers.c b/wpa_supplicant/dbus/dbus_dict_helpers.c
index 4ef5c41..5f9e64a 100644
--- a/wpa_supplicant/dbus/dbus_dict_helpers.c
+++ b/wpa_supplicant/dbus/dbus_dict_helpers.c
@@ -1095,13 +1095,13 @@ void wpa_dbus_dict_entry_clear(struct wpa_dbus_dict_entry *entry)
 				os_free(entry->strarray_value[i]);
 			os_free(entry->strarray_value);
 			break;
+		case WPAS_DBUS_TYPE_BINARRAY:
+			for (i = 0; i < entry->array_len; i++)
+				wpabuf_free(entry->binarray_value[i]);
+			os_free(entry->binarray_value);
+			break;
 		}
 		break;
-	case WPAS_DBUS_TYPE_BINARRAY:
-		for (i = 0; i < entry->array_len; i++)
-			wpabuf_free(entry->binarray_value[i]);
-		os_free(entry->binarray_value);
-		break;
 	}
 
 	memset(entry, 0, sizeof(struct wpa_dbus_dict_entry));
-- 
1.7.0.4



From angie.v.chinchilla  Fri Aug 26 16:55:58 2011
From: angie.v.chinchilla (Angie Chinchilla)
Date: Fri, 26 Aug 2011 16:55:58 -0700
Subject: [PATCH] D-Bus/P2P: Support all discovery types
Message-ID: <1314402958-32247-1-git-send-email-angie.v.chinchilla@intel.com>

From: Reinette Chatre <reinette.chatre at intel.com>

The default discovery type is to search for devices only on social
channels. Expand this to also support an initial full scan followed by the
scan of social channels as well as the progressive scan that scans through
all the channels in the Search state rounds. This does not change the
default of scanning only social channels although there is currently a
discrepancy wrt the default used by wpa_cli, which is the full scan first.

Signed-off-by: Reinette Chatre <reinette.chatre at intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla at intel.com>
---
 wpa_supplicant/dbus/dbus_new_handlers_p2p.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index 6583ed9..0d8191a 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -114,8 +114,17 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message,
 					  wpabuf_head(entry.binarray_value[i]),
 					  WPS_DEV_TYPE_LEN);
 			}
-
 			num_req_dev_types = entry.array_len;
+		} else if (!os_strcmp(entry.key, "DiscoveryType") &&
+			   (entry.type == DBUS_TYPE_STRING)) {
+			if (!os_strcmp(entry.str_value, "start_with_full"))
+				type = P2P_FIND_START_WITH_FULL;
+			else if (!os_strcmp(entry.str_value, "social"))
+				type = P2P_FIND_ONLY_SOCIAL;
+			else if (!os_strcmp(entry.str_value, "progressive"))
+				type = P2P_FIND_PROGRESSIVE;
+			else
+				goto error_clear;
 		} else
 			goto error_clear;
 		wpa_dbus_dict_entry_clear(&entry);
-- 
1.7.0.4



From mmodem00  Fri Aug 26 21:54:17 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Sat, 27 Aug 2011 05:54:17 +0100
Subject: wpa_supplicant conitnues messing with mouse and keyboard
Message-ID: <CAJZLoOx7TX07wG=e4YAgkzZNrNKEbwx+n_j5Z+1OdQUipY1OMw@mail.gmail.com>

Hi,

I have installed today git fb91db56396cce2c13f659fb263fd30d2f23cbef
and wpa_supplicant continues messing with mouse and keyboard.

Happens that mouse hangs for some instatns, and sometimes when
writting the ley repeats without no one touching to be repeated.

regards,
-- 
Z?


From 23hiro  Sat Aug 27 03:05:33 2011
From: 23hiro (hiro)
Date: Sat, 27 Aug 2011 12:05:33 +0200
Subject: adhoc wep
Message-ID: <CAFSF3XNs53fM37Q5M5E=mzqBQWnqOx74_3vx1nizgB8d7tKPJw@mail.gmail.com>

I'm using 2.6.33 iwl3945 and can't connect to adhoc wep networks with
wpa_supplicant.
The IBSS scan result is visible, but I can't connect to it. I get no
errors, just "scanning".


From newuse  Sat Aug 27 15:37:17 2011
From: newuse (newuse at qip.ru)
Date: Sun, 28 Aug 2011 02:37:17 +0400
Subject: Accounting responce User-Name attribute
Message-ID: <191841d07f2e3e636d7349f020ae6316b084817b@mail.qip.ru>

Hi all, I am new to PEAP, RADIUS and hostapd, but is it normal, if in supplicant anonymous_identity is set to "anonymous at myisp.com", in accounting packets  "anonymous at myisp.com"  is use as User-Name attribute instead of real User-Name?

Is there any possibility to disable this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110828/8c2d7897/attachment.htm 


From olivier  Sun Aug 28 10:24:45 2011
From: olivier (Olivier Sobrie)
Date: Sun, 28 Aug 2011 19:24:45 +0200
Subject: [PATCH] WPS: Send the credential when learning AP params in
	registrar role
In-Reply-To: <1312927322-11576-1-git-send-email-olivier@sobrie.be>
References: <1312927322-11576-1-git-send-email-olivier@sobrie.be>
Message-ID: <20110828172445.GA18058@thinkoso.lan>

Hi everybody,

On Wed, Aug 10, 2011 at 12:02:02AM +0200, Olivier Sobrie wrote:
> When the supplicant acts as a registrar to learn the access point
> parameters then send the credentials to the wpa_cli interface after
> receiving the 7th message.
> When setting the option 'wps_cred_processing' to 1 or 2 in the
> wpa_supplicant.conf you should receive the credential through the
> wpa control interface.
> 
> Without this patch, after the 7th message you got the WPS-CRED-RECEIVED
> notification without the credentials. This was because the cred_attr and
> cred_attr_len were not filled in in the wps structure.
> 
> Signed-off-by: Olivier Sobrie <olivier at sobrie.be>
> ---
>  src/wps/wps_registrar.c |   36 ++++++++++++++++++++++++++++++++++++
>  1 files changed, 36 insertions(+), 0 deletions(-)
> 
> diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
> index 2d7f632..1f964e7 100644
> --- a/src/wps/wps_registrar.c
> +++ b/src/wps/wps_registrar.c
> @@ -1592,6 +1592,29 @@ static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *msg)
>  	return 0;
>  }
>  
> +static int wps_build_ap_cred(struct wps_data *wps, struct wpabuf *msg)
> +{
> +	struct wpabuf *plain;
> +
> +	plain = wpabuf_alloc(200);
> +	if (plain == NULL)
> +		return -1;
> +
> +	if (wps_build_ap_settings(wps, plain)) {
> +		wpabuf_free(plain);
> +		return -1;
> +	}
> +
> +	wpabuf_put_be16(msg, ATTR_CRED);
> +	wpabuf_put_be16(msg, wpabuf_len(plain));
> +	wpabuf_put_buf(msg, plain);
> +	wpabuf_free(plain);
> +
> +	wps->cred.cred_attr = wpabuf_head(msg);
> +	wps->cred.cred_attr_len = wpabuf_len(msg);
> +
> +	return 0;
> +}
>  
>  static struct wpabuf * wps_build_m2(struct wps_data *wps)
>  {
> @@ -2551,6 +2574,8 @@ static void wps_cred_update(struct wps_credential *dst,
>  static int wps_process_ap_settings_r(struct wps_data *wps,
>  				     struct wps_parse_attr *attr)
>  {
> +	struct wpabuf *msg;
> +
>  	if (wps->wps->ap || wps->er)
>  		return 0;
>  
> @@ -2577,12 +2602,23 @@ static int wps_process_ap_settings_r(struct wps_data *wps,
>  		 */
>  		wps_registrar_pin_completed(wps->wps->registrar);
>  
> +		msg = wpabuf_alloc(1000);
> +		if (msg == NULL)
> +			return -1;
> +
> +		if (wps_build_ap_cred(wps, msg)) {
> +			wpabuf_free(msg);
> +			return -1;
> +		}
> +
>  		if (wps->ap_settings_cb) {
>  			wps->ap_settings_cb(wps->ap_settings_cb_ctx,
>  					    &wps->cred);
> +			wpabuf_free(msg);
>  			return 1;
>  		}
>  		wps_sta_cred_cb(wps);
> +		wpabuf_free(msg);
>  		return 1;
>  	}
>  }
> -- 
> 1.7.6
> 

Is there a problem with this proposed patch? Do I miss something?
Is there a chance that it will be applied?
Otherwise someone can explain what is wrong?

Thank you for your help,

-- 
Olivier


From dsd  Sun Aug 28 13:31:01 2011
From: dsd (Daniel Drake)
Date: Sun, 28 Aug 2011 21:31:01 +0100
Subject: [PATCH] dbus: Raise PropertiesChanged on
	org.freedesktop.DBus.Properties
In-Reply-To: <1313447822.6103.8.camel@dcbw.foobar.com>
References: <20110810165206.4A41D9D401C@zog.reactivated.net>
	<1313447822.6103.8.camel@dcbw.foobar.com>
Message-ID: <CAMLZHHSW=JFY9JDmi8pDOyoQ1qjgJ22_qAJoaUb5d7Oyt41qCw@mail.gmail.com>

On Mon, Aug 15, 2011 at 11:37 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Wed, 2011-08-10 at 17:52 +0100, Daniel Drake wrote:
>> wpa_supplicant dbus objects are currently difficult to use with
>> GDBusProxy. This is because they do not follow the dbus standard in
>> emitting the PropertiesChanged signal on the standard D-Bus properties
>> interface, so GDBusProxy stores stale property values.
>>
>> Fix this by raising PropertiesChanged on the standard interface.
>> For backwards compatibility, the existing custom PropertiesChanged
>> signals are not removed; I anticipate them being removed in a future
>> major release.
>>
>> See
>> http://lists.freedesktop.org/archives/dbus/2011-August/014593.html
>> for more info.
>>
>> Signed-off-by: Daniel Drake <dsd at laptop.org>
>
> Looks good to me...

Jouni, any comments? Can this be applied?

Thanks,
Daniel


From helmut.schaa  Sun Aug 28 23:51:46 2011
From: helmut.schaa (Helmut Schaa)
Date: Mon, 29 Aug 2011 08:51:46 +0200
Subject: Michael MIC Failure Report with CCMP?
Message-ID: <CAGXE3d9OmtGP3QOwyQUDWcqpG1gD1-3+xm-ScjUucmfR0n=v2A@mail.gmail.com>

On Fri, Aug 26, 2011 at 5:45 PM, Jouni Malinen <j at w1.fi> wrote:
> On Fri, Aug 26, 2011 at 05:27:21PM +0200, Helmut Schaa wrote:
>> I've got a client connected to hostapd that is sending a Michael MIC
>> Failure Report to
>> a RSN-only AP after the group key handshake:
>
> What do you mean with "RSN-only"?

Urgs, sorry, I meant CCMP-only of course :)

>> hostapd: wlan0: IEEE 802.11 TKIP countermeasures initiated
>>
>> I don't have access to this client but is it really necessary to start
>> TKIP countermeasures
>> when running in RSN-only mode (which will deauth all associated clients)?

s/RSN/CCMP

> If the station was using TKIP, then any station that is using TKIP
> (e.g., as group cipher) needs to be deauthenticated and forced to rekey.
> If the BSS does not enable any use of TKIP, it would sound reasonable to
> ignore the error reporting part and only rekey the single station that
> was incorrectly sending the Request+Error EAPOL-Key frame.

That's what I meant indeed, I'll queue up a patch for that.

Thanks,
Helmut


From nataraja  Mon Aug 29 01:56:45 2011
From: nataraja (Vivek Natarajan)
Date: Mon, 29 Aug 2011 14:26:45 +0530
Subject: [PATCH] wpa_supplicant: Modify bgscan based roaming behaviour.
Message-ID: <1314608205-4995-1-git-send-email-nataraja@qca.qualcomm.com>

Cancel background scan based roaming behavior if the driver
is capable of handling roaming in the firmware. For fullmac
drivers like ath6kl, the roaming logic is handled in the
firmware and for supplicant to initiate roam, the station
has to disconnect completely and then reconnect with the
new AP which takes a longer time without preauth.

Currently, if the supplicant also tries to roam, all requests
are rejected by cfg80211 resulting in a spam of log.

Signed-off-by: Vivek Natarajan <nataraja at qca.qualcomm.com>
---
 src/drivers/driver.h         |    2 ++
 src/drivers/driver_nl80211.c |    9 +++++++++
 src/drivers/nl80211_copy.h   |    1 +
 wpa_supplicant/events.c      |    7 +++++++
 4 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 67c5631..804ce93 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -675,6 +675,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS		0x00010000
 /* Driver indicates TX status events for Deauth/Disassoc frames */
 #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS		0x00020000
+/* Driver supports roaming in firmware */
+#define WPA_DRIVER_FLAGS_FW_ROAMING			0x00040000
 	unsigned int flags;
 
 	int max_scan_ssids;
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e49e714..5fbf46b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1640,6 +1640,7 @@ struct wiphy_info_data {
 	int connect_supported;
 	int offchan_tx_supported;
 	int max_remain_on_chan;
+	int fw_roam;
 };
 
 
@@ -1695,6 +1696,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
 	if (tb[NL80211_ATTR_OFFCHANNEL_TX_OK])
 		info->offchan_tx_supported = 1;
 
+	if (tb[NL80211_ATTR_ROAM_SUPPORT])
+		info->fw_roam = 1;
+
 	if (tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION])
 		info->max_remain_on_chan =
 			nla_get_u32(tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION]);
@@ -1768,6 +1772,11 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
 		drv->capa.flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_TX;
 	}
 
+	if (info.fw_roam) {
+		wpa_printf(MSG_DEBUG, "nl80211: Using driver-based roaming");
+		drv->capa.flags |= WPA_DRIVER_FLAGS_FW_ROAMING;
+	}
+
 	drv->capa.flags |= WPA_DRIVER_FLAGS_SANE_ERROR_CODES;
 	drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
 	if (info.p2p_supported)
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
index 3769303..ca05807 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -1252,6 +1252,7 @@ enum nl80211_attrs {
 	NL80211_ATTR_IE_PROBE_RESP,
 	NL80211_ATTR_IE_ASSOC_RESP,
 
+	NL80211_ATTR_ROAM_SUPPORT,
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index a307eda..57c987b 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -718,6 +718,13 @@ void wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
 		return;
 	}
 
+	if ((wpa_s->current_ssid == ssid) &&
+	    (wpa_s->drv_flags & WPA_DRIVER_FLAGS_FW_ROAMING)) {
+		wpa_dbg(wpa_s, MSG_DEBUG, "Cancel supplicant roaming as "
+				"driver has the capability");
+		return;
+	}
+
 	/*
 	 * Do not trigger new association unless the BSSID has changed or if
 	 * reassociation is requested. If we are in process of associating with
-- 
1.7.1



From mmodem00  Mon Aug 29 06:53:52 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Mon, 29 Aug 2011 14:53:52 +0100
Subject: wpa_supplicant messes with keyboard
Message-ID: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>

Hi,

I have installed today git fb91db56396cce2c13f659fb263fd30d2f23cbef
and wpa_supplicant continues messing with mouse and keyboard.

Happens that mouse hangs for some instatns, and sometimes when
writting the ley repeats without no one touching to be repeated.

regards,

-- 
Z?


From j  Mon Aug 29 07:06:04 2011
From: j (Jouni Malinen)
Date: Mon, 29 Aug 2011 17:06:04 +0300
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
Message-ID: <20110829140604.GA26801@jm.kir.nu>

On Mon, Aug 29, 2011 at 02:53:52PM +0100, Z? wrote:
> I have installed today git fb91db56396cce2c13f659fb263fd30d2f23cbef
> and wpa_supplicant continues messing with mouse and keyboard.
> 
> Happens that mouse hangs for some instatns, and sometimes when
> writting the ley repeats without no one touching to be repeated.

Could you please provide some more details on what exactly you are
seeing and what makes you believe that this has something to do with
wpa_supplicant?

-- 
Jouni Malinen                                            PGP id EFC895FA


From mmodem00  Mon Aug 29 08:13:56 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Mon, 29 Aug 2011 16:13:56 +0100
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <20110829140604.GA26801@jm.kir.nu>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
Message-ID: <CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>

2011/8/29 Jouni Malinen <j at w1.fi>:
> On Mon, Aug 29, 2011 at 02:53:52PM +0100, Z? wrote:
>> I have installed today git fb91db56396cce2c13f659fb263fd30d2f23cbef
>> and wpa_supplicant continues messing with mouse and keyboard.
>>
>> Happens that mouse hangs for some instatns, and sometimes when
>> writting the ley repeats without no one touching to be repeated.
>
> Could you please provide some more details on what exactly you are
> seeing and what makes you believe that this has something to do with
> wpa_supplicant?

Atm im using wpa_suplicant from git (SHA
4dc03726de072b127ba4f219cdf50df8f9b7c9be) and seams to ONLY mess with
the keyboardm since when running version 0.7.3 it used to mess with
the mouse and keyboard, the mouse used to hand for some instants and
in keyboard on writting sometimes a key was repeated severall times
like if i was continue pressing it.

Now seams to only mess with the keyboard, if i kill wpa_supplicant the
keyboard acts normally.

Could you be more specific about what details are needed?
-- 
Z?


From mmodem00  Mon Aug 29 08:21:18 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Mon, 29 Aug 2011 16:21:18 +0100
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
Message-ID: <CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>

2011/8/29 Z? <mmodem00 at gmail.com>:
> 2011/8/29 Jouni Malinen <j at w1.fi>:
>> On Mon, Aug 29, 2011 at 02:53:52PM +0100, Z? wrote:
>>> I have installed today git fb91db56396cce2c13f659fb263fd30d2f23cbef
>>> and wpa_supplicant continues messing with mouse and keyboard.
>>>
>>> Happens that mouse hangs for some instatns, and sometimes when
>>> writting the ley repeats without no one touching to be repeated.
>>
>> Could you please provide some more details on what exactly you are
>> seeing and what makes you believe that this has something to do with
>> wpa_supplicant?
>
> Atm im using wpa_suplicant from git (SHA
> 4dc03726de072b127ba4f219cdf50df8f9b7c9be) and seams to ONLY mess with
> the keyboardm since when running version 0.7.3 it used to mess with
> the mouse and keyboard, the mouse used to hand for some instants and
> in keyboard on writting sometimes a key was repeated severall times
> like if i was continue pressing it.
>
> Now seams to only mess with the keyboard, if i kill wpa_supplicant the
> keyboard acts normally.
>
> Could you be more specific about what details are needed?
> --
> Z?
>

This seams to be a problem that was already reported by others users,
for example http://forums.gentoo.org/viewtopic-t-295896-start-0.html

-- 
Z?


From johannes  Mon Aug 29 08:29:42 2011
From: johannes (Johannes Berg)
Date: Mon, 29 Aug 2011 17:29:42 +0200
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
Message-ID: <1314631782.8959.21.camel@jlt3.sipsolutions.net>

On Mon, 2011-08-29 at 16:21 +0100, Z? wrote:

> This seams to be a problem that was already reported by others users,
> for example http://forums.gentoo.org/viewtopic-t-295896-start-0.html

This is almost surely an issue with ndiswrapper, not wpa_supplicant --
clearly that wouldn't manifest itself when you stop wpa_supplicant since
then ndiswrapper also won't be doing anything ...

johannes



From mmodem00  Mon Aug 29 08:42:14 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Mon, 29 Aug 2011 16:42:14 +0100
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <1314631782.8959.21.camel@jlt3.sipsolutions.net>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
Message-ID: <CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>

2011/8/29 Johannes Berg <johannes at sipsolutions.net>:
> On Mon, 2011-08-29 at 16:21 +0100, Z? wrote:
>
>> This seams to be a problem that was already reported by others users,
>> for example http://forums.gentoo.org/viewtopic-t-295896-start-0.html
>
> This is almost surely an issue with ndiswrapper, not wpa_supplicant --
> clearly that wouldn't manifest itself when you stop wpa_supplicant since
> then ndiswrapper also won't be doing anything ...

I dont understand why you refer ndiswrapper since when i kill
wpa_supplicant all backs to normal.



-- 
Z?


From johannes  Mon Aug 29 08:43:59 2011
From: johannes (Johannes Berg)
Date: Mon, 29 Aug 2011 17:43:59 +0200
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	(sfid-20110829_174304_585019_10500B5B)
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	(sfid-20110829_174304_585019_10500B5B)
Message-ID: <1314632639.8959.23.camel@jlt3.sipsolutions.net>

On Mon, 2011-08-29 at 16:42 +0100, Z? wrote:
> 2011/8/29 Johannes Berg <johannes at sipsolutions.net>:
> > On Mon, 2011-08-29 at 16:21 +0100, Z? wrote:
> >
> >> This seams to be a problem that was already reported by others users,
> >> for example http://forums.gentoo.org/viewtopic-t-295896-start-0.html
> >
> > This is almost surely an issue with ndiswrapper, not wpa_supplicant --
> > clearly that wouldn't manifest itself when you stop wpa_supplicant since
> > then ndiswrapper also won't be doing anything ...
> 
> I dont understand why you refer ndiswrapper since when i kill
> wpa_supplicant all backs to normal.

... see above: "clearly that wouldn't manifest itself when you stop
wpa_supplicant since then ndiswrapper also won't be doing anything ..."

johannes



From proski  Mon Aug 29 08:54:29 2011
From: proski (Pavel Roskin)
Date: Mon, 29 Aug 2011 11:54:29 -0400
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <1314632639.8959.23.camel@jlt3.sipsolutions.net>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
Message-ID: <20110829115429.75fda8b6@mj>

On Mon, 29 Aug 2011 17:43:59 +0200
Johannes Berg <johannes at sipsolutions.net> wrote:

> On Mon, 2011-08-29 at 16:42 +0100, Z? wrote:
>
> > I dont understand why you refer ndiswrapper since when i kill
> > wpa_supplicant all backs to normal.
> 
> ... see above: "clearly that wouldn't manifest itself when you stop
> wpa_supplicant since then ndiswrapper also won't be doing
> anything ..."

Speaking of ndiswrapper, I found many serious issues in it lately,
including memory corruption, so I suggest trying the current version
of ndiswrapper from Subversion.  A new version will be released soon.

But the way, it would be useful to mention whether the keyboard and the
device supported by ndiswrapper are USB devices.

-- 
Regards,
Pavel Roskin


From mmodem00  Mon Aug 29 09:15:53 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Mon, 29 Aug 2011 17:15:53 +0100
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <20110829115429.75fda8b6@mj>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
Message-ID: <CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>

2011/8/29 Pavel Roskin <proski at gnu.org>:
> On Mon, 29 Aug 2011 17:43:59 +0200
> Johannes Berg <johannes at sipsolutions.net> wrote:
>
>> On Mon, 2011-08-29 at 16:42 +0100, Z? wrote:
>>
>> > I dont understand why you refer ndiswrapper since when i kill
>> > wpa_supplicant all backs to normal.
>>
>> ... see above: "clearly that wouldn't manifest itself when you stop
>> wpa_supplicant since then ndiswrapper also won't be doing
>> anything ..."
>
> Speaking of ndiswrapper, I found many serious issues in it lately,
> including memory corruption, so I suggest trying the current version
> of ndiswrapper from Subversion. ?A new version will be released soon.
>
> But the way, it would be useful to mention whether the keyboard and the
> device supported by ndiswrapper are USB devices.

Could you please explain me why are you refering ndiwrapper?
I dont remember made any reference to it.
And only the mouse its a USB device

And i do NOT have ndiswrapper in my system.

-- 
Z?


From johannes  Mon Aug 29 09:23:44 2011
From: johannes (Johannes Berg)
Date: Mon, 29 Aug 2011 18:23:44 +0200
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	(sfid-20110829_181644_623291_D3736616)
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
	<CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	(sfid-20110829_181644_623291_D3736616)
Message-ID: <1314635024.8959.24.camel@jlt3.sipsolutions.net>

On Mon, 2011-08-29 at 17:15 +0100, Z? wrote:
> 2011/8/29 Pavel Roskin <proski at gnu.org>:
> > On Mon, 29 Aug 2011 17:43:59 +0200
> > Johannes Berg <johannes at sipsolutions.net> wrote:
> >
> >> On Mon, 2011-08-29 at 16:42 +0100, Z? wrote:
> >>
> >> > I dont understand why you refer ndiswrapper since when i kill
> >> > wpa_supplicant all backs to normal.
> >>
> >> ... see above: "clearly that wouldn't manifest itself when you stop
> >> wpa_supplicant since then ndiswrapper also won't be doing
> >> anything ..."
> >
> > Speaking of ndiswrapper, I found many serious issues in it lately,
> > including memory corruption, so I suggest trying the current version
> > of ndiswrapper from Subversion.  A new version will be released soon.
> >
> > But the way, it would be useful to mention whether the keyboard and the
> > device supported by ndiswrapper are USB devices.
> 
> Could you please explain me why are you refering ndiwrapper?
> I dont remember made any reference to it.
> And only the mouse its a USB device
> 
> And i do NOT have ndiswrapper in my system.

You said you had exactly the same problem as in the linked forum
post ... that referred to ndiswrapper.

However, even if you don't have it, wpa_supplicant isn't the problem,
the problem is almost certainly the driver you're using. Not something
we can help you with much.

johannes



From mmodem00  Mon Aug 29 09:31:03 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Mon, 29 Aug 2011 17:31:03 +0100
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <1314635024.8959.24.camel@jlt3.sipsolutions.net>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
	<CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	<1314635024.8959.24.camel@jlt3.sipsolutions.net>
Message-ID: <CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>

2011/8/29 Johannes Berg <johannes at sipsolutions.net>:
> On Mon, 2011-08-29 at 17:15 +0100, Z? wrote:
>> 2011/8/29 Pavel Roskin <proski at gnu.org>:
>> > On Mon, 29 Aug 2011 17:43:59 +0200
>> > Johannes Berg <johannes at sipsolutions.net> wrote:
>> >
>> >> On Mon, 2011-08-29 at 16:42 +0100, Z? wrote:
>> >>
>> >> > I dont understand why you refer ndiswrapper since when i kill
>> >> > wpa_supplicant all backs to normal.
>> >>
>> >> ... see above: "clearly that wouldn't manifest itself when you stop
>> >> wpa_supplicant since then ndiswrapper also won't be doing
>> >> anything ..."
>> >
>> > Speaking of ndiswrapper, I found many serious issues in it lately,
>> > including memory corruption, so I suggest trying the current version
>> > of ndiswrapper from Subversion. ?A new version will be released soon.
>> >
>> > But the way, it would be useful to mention whether the keyboard and the
>> > device supported by ndiswrapper are USB devices.
>>
>> Could you please explain me why are you refering ndiwrapper?
>> I dont remember made any reference to it.
>> And only the mouse its a USB device
>>
>> And i do NOT have ndiswrapper in my system.
>
> You said you had exactly the same problem as in the linked forum
> post ... that referred to ndiswrapper.
>
> However, even if you don't have it, wpa_supplicant isn't the problem,
> the problem is almost certainly the driver you're using. Not something
> we can help you with much.

That doesnt make much sense since when i kill wpa_supplicant the
referred problems simply disappear.

-- 
Z?


From johannes  Mon Aug 29 09:57:05 2011
From: johannes (Johannes Berg)
Date: Mon, 29 Aug 2011 18:57:05 +0200
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>
	(sfid-20110829_183153_798783_D5785928)
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
	<CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	<1314635024.8959.24.camel@jlt3.sipsolutions.net>
	<CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>
	(sfid-20110829_183153_798783_D5785928)
Message-ID: <1314637025.8959.25.camel@jlt3.sipsolutions.net>

On Mon, 2011-08-29 at 17:31 +0100, Z? wrote:
> 2011/8/29 Johannes Berg <johannes at sipsolutions.net>:
> > On Mon, 2011-08-29 at 17:15 +0100, Z? wrote:
> >> 2011/8/29 Pavel Roskin <proski at gnu.org>:
> >> > On Mon, 29 Aug 2011 17:43:59 +0200
> >> > Johannes Berg <johannes at sipsolutions.net> wrote:
> >> >
> >> >> On Mon, 2011-08-29 at 16:42 +0100, Z? wrote:
> >> >>
> >> >> > I dont understand why you refer ndiswrapper since when i kill
> >> >> > wpa_supplicant all backs to normal.
> >> >>
> >> >> ... see above: "clearly that wouldn't manifest itself when you stop
> >> >> wpa_supplicant since then ndiswrapper also won't be doing
> >> >> anything ..."
> >> >
> >> > Speaking of ndiswrapper, I found many serious issues in it lately,
> >> > including memory corruption, so I suggest trying the current version
> >> > of ndiswrapper from Subversion.  A new version will be released soon.
> >> >
> >> > But the way, it would be useful to mention whether the keyboard and the
> >> > device supported by ndiswrapper are USB devices.
> >>
> >> Could you please explain me why are you refering ndiwrapper?
> >> I dont remember made any reference to it.
> >> And only the mouse its a USB device
> >>
> >> And i do NOT have ndiswrapper in my system.
> >
> > You said you had exactly the same problem as in the linked forum
> > post ... that referred to ndiswrapper.
> >
> > However, even if you don't have it, wpa_supplicant isn't the problem,
> > the problem is almost certainly the driver you're using. Not something
> > we can help you with much.
> 
> That doesnt make much sense since when i kill wpa_supplicant the
> referred problems simply disappear.

Ok whatever. I'll go away and stop trying to help you.

johannes




From kmueller  Mon Aug 29 10:35:54 2011
From: kmueller (=?ISO-8859-1?Q?Klaus_M=FCller?=)
Date: Mon, 29 Aug 2011 19:35:54 +0200
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
	<CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	<1314635024.8959.24.camel@jlt3.sipsolutions.net>
	<CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>
Message-ID: <4E5BCDFA.40508@justmail.de>

Z? schrieb:
[...]
> That doesnt make much sense since when i kill wpa_supplicant the
> referred problems simply disappear.

Surely. Which hardware / driver do you use? Which kernel (version)?
32/64 bit? Do you use compat-wireless (which version)?

Are there any entries in /var/log/messages, which could be related?


Klaus


From rmanohar  Mon Aug 29 10:56:04 2011
From: rmanohar (Rajkumar Manoharan)
Date: Mon, 29 Aug 2011 23:26:04 +0530
Subject: [RFC] p2p: disable 11b rates on p2p interface creation
In-Reply-To: <1313522960-11775-1-git-send-email-rmanohar@qca.qualcomm.com>
References: <1313522960-11775-1-git-send-email-rmanohar@qca.qualcomm.com>
Message-ID: <20110829175601.GA6012@vmraj-lnx.users.atheros.com>

On Wed, Aug 17, 2011 at 12:59:20AM +0530, Rajkumar Manoharan wrote:
> 11b rates are disabled blindly during p2p init based on driver
> capability. This prevents use of CCK rates when no p2p vif
> is present. This patch disables 11b rates while creating p2p
> interface.
> 
> Signed-off-by: Rajkumar Manoharan <rmanohar at qca.qualcomm.com>
> ---
>  src/drivers/driver.h            |    4 ++--
>  src/drivers/driver_nl80211.c    |   17 ++++++++++++-----
>  wpa_supplicant/driver_i.h       |    6 ++----
>  wpa_supplicant/p2p_supplicant.c |    5 +----
>  4 files changed, 17 insertions(+), 15 deletions(-)
> 
Any comments are welcome.

--
Rajkumar


From rmanohar  Mon Aug 29 10:57:46 2011
From: rmanohar (Rajkumar Manoharan)
Date: Mon, 29 Aug 2011 23:27:46 +0530
Subject: [PATCH 1/3] wpa_supplicant: Define 20/40 BSS Coexistence IEs
In-Reply-To: <1311254678-10877-1-git-send-email-rmanohar@qca.qualcomm.com>
References: <1311254678-10877-1-git-send-email-rmanohar@qca.qualcomm.com>
Message-ID: <20110829175745.GB6012@vmraj-lnx.users.atheros.com>

On Thu, Jul 21, 2011 at 06:54:36PM +0530, Rajkumar Manoharan wrote:
> This patch defines 20/40 BSS Intolerant Channel Report IE
> (IEEE 802.11 7.3.2.58) and 20/40 BSS Coexistence element
> (IEEE 802.11 7.3.2.60).
> 
> Signed-off-by: Rajkumar Manoharan <rmanohar at qca.qualcomm.com>
> ---
>  src/common/ieee802_11_defs.h |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
Jouni,

Am I have to resend it?

--
Rajkumar


From mmodem00  Mon Aug 29 12:20:52 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Mon, 29 Aug 2011 20:20:52 +0100
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <4E5BCDFA.40508@justmail.de>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
	<CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	<1314635024.8959.24.camel@jlt3.sipsolutions.net>
	<CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>
	<4E5BCDFA.40508@justmail.de>
Message-ID: <CAJZLoOyZKP=85J42xXGqZmZkLzJG8h5qUQYi+sKyF3TGTZ_xvA@mail.gmail.com>

2011/8/29 Klaus M?ller <kmueller at justmail.de>:
> Z? schrieb:
> [...]
>> That doesnt make much sense since when i kill wpa_supplicant the
>> referred problems simply disappear.

The problems starts happening when wpa-supplicant runs, and it
continues afecting the mouse and the keyboard and not just the
keyboard when using from git like i referred in previous comments.

So this problem can be triggered by th wifi driver?

when running dmesg it shows too much outputs of the wifi driver
(almost like a loop).
But im attaching the ddesg output.

> Surely. Which hardware / driver do you use? Which kernel (version)?
> 32/64 bit? Do you use compat-wireless (which version)?

Currently im running a kernel-3.0.3 and its 64bits.
Since i remember using wpa_supplicant this always happened, no matter
if i used kernel-2.6.38 or the 3.0.x versions.

This is the wifi driver:
rtl8192ce: Realtek Semiconductor Co., Ltd.|Device 8176 [NETWORK_OTHER]
(vendor:10ec device:8176 subv:10ec subd:9196) (rev: 01)

I dont see any package with name compat-wireless, i have grepped for
compat and got this one: libusb-compat-0.1.3

> Are there any entries in /var/log/messages, which could be related?

What i havent seen any relevant in /var/log/messages.
Maybe you could be more specific about what to grep?

regards,
-- 
Z?


From kmueller  Mon Aug 29 13:23:09 2011
From: kmueller (=?ISO-8859-1?Q?Klaus_M=FCller?=)
Date: Mon, 29 Aug 2011 22:23:09 +0200
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <CAJZLoOyZKP=85J42xXGqZmZkLzJG8h5qUQYi+sKyF3TGTZ_xvA@mail.gmail.com>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
	<CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	<1314635024.8959.24.camel@jlt3.sipsolutions.net>
	<CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>
	<4E5BCDFA.40508@justmail.de>
	<CAJZLoOyZKP=85J42xXGqZmZkLzJG8h5qUQYi+sKyF3TGTZ_xvA@mail.gmail.com>
Message-ID: <4E5BF52D.50808@justmail.de>

Z? schrieb:
> 2011/8/29 Klaus M?ller <kmueller at justmail.de>:
>> Z? schrieb:
>> [...]
>>> That doesnt make much sense since when i kill wpa_supplicant the
>>> referred problems simply disappear.
> 
> The problems starts happening when wpa-supplicant runs, and it
> continues afecting the mouse and the keyboard and not just the
> keyboard when using from git like i referred in previous comments.
> 
> So this problem can be triggered by th wifi driver?

wpa_supplicant has to start the hardware with the driver. If you stop
wpa_supplicant, the hardware is stopped again (by wpa_supplicant).
That's why it could be a driver issue.

> when running dmesg it shows too much outputs of the wifi driver
> (almost like a loop).

This sounds bad.

> But im attaching the ddesg output.
> 
>> Surely. Which hardware / driver do you use? Which kernel (version)?
>> 32/64 bit? Do you use compat-wireless (which version)?
> 
> Currently im running a kernel-3.0.3 and its 64bits.
> Since i remember using wpa_supplicant this always happened, no matter
> if i used kernel-2.6.38 or the 3.0.x versions.
> 
> This is the wifi driver:
> rtl8192ce: Realtek Semiconductor Co., Ltd.|Device 8176 [NETWORK_OTHER]
> (vendor:10ec device:8176 subv:10ec subd:9196) (rev: 01)


According http://pci-ids.ucw.cz/read/PC/10ec/8176 ..., it's a Realtek
RTL8188CE 802.11b/g/n WiFi Adapter
(http://pci-ids.ucw.cz/read/PC/10ec/8176).

I don't know, which driver you're really using. I would try
the official driver (if you not already use it). You can get it here
(one line):

http://218.210.127.131/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8188CE

According this entry, this driver should work (one line again):
http://www.backtrack-linux.org/forums/hardware-compatibility-list/34817-realtek-rtl8188ce.html


Klaus


From sami.m.ahokas  Mon Aug 29 23:32:11 2011
From: sami.m.ahokas (sami ahokas)
Date: Tue, 30 Aug 2011 09:32:11 +0300
Subject: [ath9k-devel] DWA-556 not working as AP
In-Reply-To: <CAD2nsn3DdwJSTf65n=0MhK22ME=Su=Tf0gA6s8BtC2rP6nqyAQ@mail.gmail.com>
References: <CAL-=UpT_27R_RYhYa-5hni8AG_rDD0TE-pTV6z4ESJ8X+Gzp5w@mail.gmail.com>
	<20110805220157.613355a3@mj>
	<CAL-=UpTUBh4Rfs4qoauskZaGcOtjdGQ9N8+FOpsELMiUF5xTgg@mail.gmail.com>
	<20110809082728.o8imtnc68gc0cswc-cebfxv@webmail.spamcop.net>
	<CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ@mail.gmail.com>
	<20110810181124.1e303ad6@mj>
	<CAL-=UpSQfstQsfn0zsUks71=Sss-LEgphecK26efaT-7tz2ngg@mail.gmail.com>
	<CAD2nsn3DdwJSTf65n=0MhK22ME=Su=Tf0gA6s8BtC2rP6nqyAQ@mail.gmail.com>
Message-ID: <CAL-=UpRSm=4MSSbmidrS-gvFrtUxQiW4-ezj7zt-MDVqKUz6uQ@mail.gmail.com>

2011/8/19 Mohammed Shafi <shafi.wireless at gmail.com>:
> On Fri, Aug 19, 2011 at 5:43 PM, sami ahokas <sami.m.ahokas at gmail.com> wrote:
>> 2011/8/11 Pavel Roskin <proski at gnu.org>:
>>> On Wed, 10 Aug 2011 09:30:27 +0300
>>> sami ahokas <sami.m.ahokas at gmail.com> wrote:
>>>
>>>> Thanks again for your help. But now I have next problem and quick
>>>> googling didn't give me any answers. Here is what I get from hostapd:
>>>>
>>>> ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
>>>
>>> It looks like you are using some different driver on ath0. ?Run
>>>
>>> readlink /sys/class/net/ath0/device/driver
>>>
>>>> ath0: DRIVER Error enabling WPA/802.1X!
>>>> IEEE 802.1X initialization failed.
>>>> ath0: Unable to setup interface.
>>>> rmdir[ctrl_interface]: No such file or directory
>>>>
>>>> Why is it complaining about 802.1X? My setup is using WPA-PSK, not
>>>> 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
>>>> driver with wrong parameters?
>>>
>>> The message comes from driver_madwifi.c and can be easily improved, but
>>> I don't see much point in that. ?WPA was mentioned after all.
>>>
>>> --
>>> Regards,
>>> Pavel Roskin
>>>
>>
>> Hi,
>>
>> I'm still struggling with this. I'm back to using ath9k driver. I have
>> several DWA-556 cards of which some works just fine, but some of them
>> are awful. I have enabled all possible debug features for ath9k driver
>> and I have noticed that there are a lot of GTT interrupts on those bad
>> boards. Can someone tell me what those interrupts are?
>
> little bit of them may not be a harm, lots of them indicates tx frames
> being stuck , could not be sent out.
> as mentioned earlier please upgrade your kernel.
>

Ok, I have upgraded my kernel to 2.6.39 and it works somewhat better
than the old one. But, I'm still having problems with my AP. Many
times after power on, I get lots of GTT interrupts and things are not
working well. If I say "iw dev wlan0 survey dump" at that point, noise
value on channel I use is only -88-90 dBm, so there shouldn't be too
much noise on the used channel.

Also, even when things seems to be running ok (stations can connect
and transfer data), there are lot of errors (phy, underrun, crc). Is
that normal? My station is only one meter away from my AP.

cat /sys/kernel/debug/ieee80211/phy0/ath9k/recv
CRC ERR :      26415
DECRYPT CRC ERR :          1
PHY ERR :     245603
MIC ERR :          0
PRE-DELIM CRC ERR :          0
POST-DELIM CRC ERR :          0
DECRYPT BUSY ERR :          0
UNDERRUN :     245592
TIMING :          0
PARITY :          0
RATE :          0
LENGTH :         11
RADAR :          0
SERVICE :          0
TOR :          0
OFDM-TIMING :          0
OFDM-SIGNAL-PARITY :          0
OFDM-RATE :          0
OFDM-LENGTH :          0
OFDM-POWER-DROP :          0
OFDM-SERVICE :          0
OFDM-RESTART :          0
FALSE-RADAR-EXT :          0
CCK-TIMING :          0
CCK-HEADER-CRC :          0
CCK-RATE :          0
CCK-SERVICE :          0
CCK-RESTART :          0
CCK-LENGTH :          0
CCK-POWER-DROP :          0
HT-CRC :          0
HT-LENGTH :          0
HT-RATE :          0
RX-Pkts-All :     635344
RX-Bytes-All :   39393486

Sami


From jukka.rissanen  Tue Aug 30 00:08:15 2011
From: jukka.rissanen (Jukka Rissanen)
Date: Tue, 30 Aug 2011 10:08:15 +0300
Subject: [PATCH] dbus: Export max scan ssids supported by driver.
In-Reply-To: <1314301308.3922.9.camel@dcbw.foobar.com>
References: <1314108703-3752-1-git-send-email-jukka.rissanen@linux.intel.com>
	<1314301308.3922.9.camel@dcbw.foobar.com>
Message-ID: <4E5C8C5F.9010202@linux.intel.com>

Hi Dan,

On 08/25/2011 10:41 PM, Dan Williams wrote:
> On Tue, 2011-08-23 at 17:11 +0300, Jukka Rissanen wrote:
>> From: Mohamed Abbas<mohamed.abbas at intel.com>
>>
>> This is needed for network managers that want to know how
>> many SSIDs they can scan at the same time.
>
> Yay, thanks for this.  I hadn't quite gotten around to doing it.  Next
> question though, if you populate the supplicant with a bunch of
> networks, shouldn't it use up to max_scan_ssids from the network blocks
> (sorted by priority of course) when doing scans on it's own?  Or does it
> do this already?  If not, that would be the  next step.
>
> Dan
>

Hmm, I am not very familiar with wpa_supplicant code so I am not able to 
answer your question, sorry :)


Jukka


From matt.causey  Tue Aug 30 12:30:20 2011
From: matt.causey (Matt Causey)
Date: Tue, 30 Aug 2011 15:30:20 -0400
Subject: wpa_supplicant roaming question
Message-ID: <CAGnc4p_ARaE0Fd9uSjg2O8Ni+1CWoUhtYxz4BEMdb9dqO3u3EQ@mail.gmail.com>

Hello,

I have a question about how scans are meant to be triggered with
wpa_supplicant, mac80211, and family.  At my site, we have a fleet of
small devices that run the Atheros ar928x wireless cards.  We use
EAP-TLS on Motorolla WLAN infrastructure.  We're running linux
2.6.38-2 with no vendor patches.  Our wpa_supplicant version is 0.7.3.

In our situation, we'll have a client adjacent to 2 or 3 BSSIDs
broadcasting the same ESSID, and the client moves about from time to
time.  What I am seeing is that the client will sit on a -70 access
point, without roaming, for hours even in the presence of another
access point that registers as -50.  However, if I do something to
manually trigger a scan, the device will suddenly roam to the more
favorable access point.

For example, I can do 'iwlist scan', or HUP the supplicant.  iwlist I
am sure causes the driver to generate a new set of scan results -
which the supplicant picks up and uses.  HUP of the supplicant causes
the supplicant to call wpa_supplicant_req_scan(), and then roam as a
result of the new scan data.  This leaves me thinking that the roaming
algorithm is working great, it's just that the background scanning is
not working as I would expect...

So I read about bgscan here:
http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap-07.git;a=commit;h=e2f74005f548d90014cdf080802d455382e37cb9

It looks like what I want - to configure the supplicant to scan
periodically.  However I have it enabled and I don't ever see it kick
in.  Any ideas why?

Here is our supplicant config:

network={
	ssid="wpa2"
	bgscan="simple:30:-45:300"
	freq_list=<a list of the frequencies that we use>
	identity="<client-id>"
	key_mgmt=WPA-EAP
	proto=WPA2
	pairwise=CCMP
	group=CCMP
	eap=TLS
	ca_cert="/etc/cert/root.pem"
	client_cert="/etc/cert/user_cert.pem"
	private_key="/etc/cert/user_key.pem"
	private_key_passwd="<noober mic nooberson>"
}

If there is other info I can provide please let me know!

Cheers,

--
Matt


From janusz.dziedzic  Wed Aug 31 01:21:34 2011
From: janusz.dziedzic (Janusz Dziedzic)
Date: Wed, 31 Aug 2011 10:21:34 +0200
Subject: wpa_supplicant roaming question
In-Reply-To: <CAGnc4p_ARaE0Fd9uSjg2O8Ni+1CWoUhtYxz4BEMdb9dqO3u3EQ@mail.gmail.com>
References: <CAGnc4p_ARaE0Fd9uSjg2O8Ni+1CWoUhtYxz4BEMdb9dqO3u3EQ@mail.gmail.com>
Message-ID: <CAFED-jk6AFE3bo0O3M5b96=ppSPYMNGVGLVyPJyqX+Y5Y8uwKw@mail.gmail.com>

2011/8/30 Matt Causey <matt.causey at gmail.com>:
> Hello,
>
> I have a question about how scans are meant to be triggered with
> wpa_supplicant, mac80211, and family. ?At my site, we have a fleet of
> small devices that run the Atheros ar928x wireless cards. ?We use
> EAP-TLS on Motorolla WLAN infrastructure. ?We're running linux
> 2.6.38-2 with no vendor patches. ?Our wpa_supplicant version is 0.7.3.
>
> In our situation, we'll have a client adjacent to 2 or 3 BSSIDs
> broadcasting the same ESSID, and the client moves about from time to
> time. ?What I am seeing is that the client will sit on a -70 access
> point, without roaming, for hours even in the presence of another
> access point that registers as -50. ?However, if I do something to
> manually trigger a scan, the device will suddenly roam to the more
> favorable access point.
>
> For example, I can do 'iwlist scan', or HUP the supplicant. ?iwlist I
> am sure causes the driver to generate a new set of scan results -
> which the supplicant picks up and uses. ?HUP of the supplicant causes
> the supplicant to call wpa_supplicant_req_scan(), and then roam as a
> result of the new scan data. ?This leaves me thinking that the roaming
> algorithm is working great, it's just that the background scanning is
> not working as I would expect...
>
> So I read about bgscan here:
> http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap-07.git;a=commit;h=e2f74005f548d90014cdf080802d455382e37cb9
>
> It looks like what I want - to configure the supplicant to scan
> periodically. ?However I have it enabled and I don't ever see it kick
> in. ?Any ideas why?
>
> Here is our supplicant config:
>
> network={
> ? ? ? ?ssid="wpa2"
> ? ? ? ?bgscan="simple:30:-45:300"
> ? ? ? ?freq_list=<a list of the frequencies that we use>
> ? ? ? ?identity="<client-id>"
> ? ? ? ?key_mgmt=WPA-EAP
> ? ? ? ?proto=WPA2
> ? ? ? ?pairwise=CCMP
> ? ? ? ?group=CCMP
> ? ? ? ?eap=TLS
> ? ? ? ?ca_cert="/etc/cert/root.pem"
> ? ? ? ?client_cert="/etc/cert/user_cert.pem"
> ? ? ? ?private_key="/etc/cert/user_key.pem"
> ? ? ? ?private_key_passwd="<noober mic nooberson>"
> }
>
> If there is other info I can provide please let me know!
>

Did you enable this CONFIG_BGSCAN_SIMPLE=y in wpa_supplicant/.config
file before compilation?

We are using bgscan simple and learn and don't have such problems.
If still an issue:
Run wpa_supplicant with -ddd option. After that you should get debug
messages connected with bgscan_simple.

BR
Janusz


From eliad  Wed Aug 31 03:30:28 2011
From: eliad (Eliad Peller)
Date: Wed, 31 Aug 2011 13:30:28 +0300
Subject: [PATCH 1/3] AP: consider uapsd support
Message-ID: <1314786630-12177-1-git-send-email-eliad@wizery.com>

Check whether the driver advertises support for uapsd
in ap mode, and evaluate wmm_uapsd only in this case.

Signed-off-by: Eliad Peller <eliad at wizery.com>
---
(need to sync nl80211_copy.h first)

 src/ap/wmm.c                 |    3 ++-
 src/drivers/driver.h         |    2 ++
 src/drivers/driver_nl80211.c |    6 ++++++
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/ap/wmm.c b/src/ap/wmm.c
index a6d9b89..9bdf5dc 100644
--- a/src/ap/wmm.c
+++ b/src/ap/wmm.c
@@ -72,7 +72,8 @@ u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid)
 	wmm->version = WMM_VERSION;
 	wmm->qos_info = hapd->parameter_set_count & 0xf;
 
-	if (hapd->conf->wmm_uapsd)
+	if (hapd->conf->wmm_uapsd &&
+	    (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_UAPSD))
 		wmm->qos_info |= 0x80;
 
 	wmm->reserved = 0;
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 67c5631..54e2ef3 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -675,6 +675,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS		0x00010000
 /* Driver indicates TX status events for Deauth/Disassoc frames */
 #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS		0x00020000
+/* Driver supports uapsd in ap mode */
+#define WPA_DRIVER_FLAGS_AP_UAPSD			0x00040000
 	unsigned int flags;
 
 	int max_scan_ssids;
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 233cdb2..b0eaac5 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1638,6 +1638,7 @@ struct wiphy_info_data {
 	int auth_supported;
 	int connect_supported;
 	int offchan_tx_supported;
+	int ap_uapsd_supported;
 	int max_remain_on_chan;
 };
 
@@ -1694,6 +1695,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
 	if (tb[NL80211_ATTR_OFFCHANNEL_TX_OK])
 		info->offchan_tx_supported = 1;
 
+	if (tb[NL80211_ATTR_SUPPORT_AP_UAPSD])
+		info->ap_uapsd_supported = 1;
+
 	if (tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION])
 		info->max_remain_on_chan =
 			nla_get_u32(tb[NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION]);
@@ -1771,6 +1775,8 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
 	drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
 	if (info.p2p_supported)
 		drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CAPABLE;
+	if (info.ap_uapsd_supported)
+		drv->capa.flags |= WPA_DRIVER_FLAGS_AP_UAPSD;
 	drv->capa.flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
 	drv->capa.flags |= WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS;
 	drv->capa.max_remain_on_chan = info.max_remain_on_chan;
-- 
1.7.0.4



From eliad  Wed Aug 31 03:30:29 2011
From: eliad (Eliad Peller)
Date: Wed, 31 Aug 2011 13:30:29 +0300
Subject: [PATCH 2/3] hostapd: add uapsd_queues and max_sp fields
In-Reply-To: <1314786630-12177-1-git-send-email-eliad@wizery.com>
References: <1314786630-12177-1-git-send-email-eliad@wizery.com>
Message-ID: <1314786630-12177-2-git-send-email-eliad@wizery.com>

Add uapsd_queues and max_sp fields to sta_info struct,
and pass them to the sta_add callback.

These values are determined by the WME ie in the assoc request.

Signed-off-by: Eliad Peller <eliad at wizery.com>
---
 src/ap/ap_drv_ops.c  |    4 +++-
 src/ap/ap_drv_ops.h  |    2 +-
 src/ap/ieee802_11.c  |   17 +++++++++++++----
 src/ap/sta_info.h    |    3 +++
 src/drivers/driver.h |    2 ++
 5 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 2860b57..d020f5a 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -337,7 +337,7 @@ int hostapd_sta_add(struct hostapd_data *hapd,
 		    const u8 *supp_rates, size_t supp_rates_len,
 		    u16 listen_interval,
 		    const struct ieee80211_ht_capabilities *ht_capab,
-		    u32 flags)
+		    u32 flags, u8 uapsd_queues, u8 max_sp)
 {
 	struct hostapd_sta_add_params params;
 
@@ -355,6 +355,8 @@ int hostapd_sta_add(struct hostapd_data *hapd,
 	params.listen_interval = listen_interval;
 	params.ht_capabilities = ht_capab;
 	params.flags = hostapd_sta_flags_to_drv(flags);
+	params.uapsd_queues = uapsd_queues;
+	params.max_sp = max_sp;
 	return hapd->driver->sta_add(hapd->drv_priv, &params);
 }
 
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index 115099d..9d06eb9 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -44,7 +44,7 @@ int hostapd_sta_add(struct hostapd_data *hapd,
 		    const u8 *supp_rates, size_t supp_rates_len,
 		    u16 listen_interval,
 		    const struct ieee80211_ht_capabilities *ht_capab,
-		    u32 flags);
+		    u32 flags, u8 uapsd_queues, u8 max_sp);
 int hostapd_set_privacy(struct hostapd_data *hapd, int enabled);
 int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
 			     size_t elem_len);
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index e5a0a85..ccc802a 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -593,14 +593,23 @@ static u16 check_wmm(struct hostapd_data *hapd, struct sta_info *sta,
 {
 	sta->flags &= ~WLAN_STA_WMM;
 	if (wmm_ie && hapd->conf->wmm_enabled) {
-		if (hostapd_eid_wmm_valid(hapd, wmm_ie, wmm_ie_len))
+		struct wmm_information_element *wmm;
+		u8 qos_info;
+
+		if (hostapd_eid_wmm_valid(hapd, wmm_ie, wmm_ie_len)) {
 			hostapd_logger(hapd, sta->addr,
 				       HOSTAPD_MODULE_WPA,
 				       HOSTAPD_LEVEL_DEBUG,
 				       "invalid WMM element in association "
 				       "request");
-		else
-			sta->flags |= WLAN_STA_WMM;
+			return WLAN_STATUS_UNSPECIFIED_FAILURE;
+		}
+
+		sta->flags |= WLAN_STA_WMM;
+		wmm = (struct wmm_information_element *) wmm_ie;
+		qos_info = wmm->qos_info;
+		sta->uapsd_queues = qos_info & 0xf;
+		sta->max_sp = qos_info >> 5;
 	}
 	return WLAN_STATUS_SUCCESS;
 }
@@ -1710,7 +1719,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
 			    sta->supported_rates, sta->supported_rates_len,
 			    sta->listen_interval,
 			    sta->flags & WLAN_STA_HT ? &ht_cap : NULL,
-			    sta->flags)) {
+			    sta->flags, sta->uapsd_queues, sta->max_sp)) {
 		hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
 			       HOSTAPD_LEVEL_NOTICE,
 			       "Could not add STA to kernel driver");
diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h
index c5e916f..6308523 100644
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
@@ -59,6 +59,9 @@ struct sta_info {
 	unsigned int ht_20mhz_set:1;
 	unsigned int no_p2p_set:1;
 
+	u8 uapsd_queues;
+	u8 max_sp;
+
 	u16 auth_alg;
 	u8 previous_ap[6];
 
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 54e2ef3..1f3955e 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -717,6 +717,8 @@ struct hostapd_sta_add_params {
 	u16 listen_interval;
 	const struct ieee80211_ht_capabilities *ht_capabilities;
 	u32 flags; /* bitmask of WPA_STA_* flags */
+	u8 uapsd_queues;
+	u8 max_sp;
 };
 
 struct hostapd_freq_params {
-- 
1.7.0.4



From eliad  Wed Aug 31 03:30:30 2011
From: eliad (Eliad Peller)
Date: Wed, 31 Aug 2011 13:30:30 +0300
Subject: [PATCH 3/3] nl80211: send uapsd_queues and max_sp values on sta
	additon
In-Reply-To: <1314786630-12177-1-git-send-email-eliad@wizery.com>
References: <1314786630-12177-1-git-send-email-eliad@wizery.com>
Message-ID: <1314786630-12177-3-git-send-email-eliad@wizery.com>

When a new station is added, send its configured WME params.

Signed-off-by: Eliad Peller <eliad at wizery.com>
---
 src/drivers/driver_nl80211.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index b0eaac5..092afd3 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4033,7 +4033,7 @@ static int wpa_driver_nl80211_sta_add(void *priv,
 {
 	struct i802_bss *bss = priv;
 	struct wpa_driver_nl80211_data *drv = bss->drv;
-	struct nl_msg *msg;
+	struct nl_msg *msg, *wme = NULL;
 	struct nl80211_sta_flag_update upd;
 	int ret = -ENOBUFS;
 
@@ -4062,13 +4062,30 @@ static int wpa_driver_nl80211_sta_add(void *priv,
 	upd.set = upd.mask;
 	NLA_PUT(msg, NL80211_ATTR_STA_FLAGS2, sizeof(upd), &upd);
 
+	if (params->flags & WPA_STA_WMM) {
+		wme = nlmsg_alloc();
+		if (!wme)
+			goto nla_put_failure;
+
+		NLA_PUT_U8(wme, NL80211_STA_WME_UAPSD_QUEUES,
+			   params->uapsd_queues);
+		NLA_PUT_U8(wme, NL80211_STA_WME_MAX_SP, params->max_sp);
+		nla_put_nested(msg, NL80211_ATTR_STA_WME, wme);
+
+		nlmsg_free(wme);
+	}
+
 	ret = send_and_recv_msgs(drv, msg, NULL, NULL);
 	if (ret)
 		wpa_printf(MSG_DEBUG, "nl80211: NL80211_CMD_NEW_STATION "
 			   "result: %d (%s)", ret, strerror(-ret));
 	if (ret == -EEXIST)
 		ret = 0;
+
+	return ret;
  nla_put_failure:
+	if (wme)
+		nlmsg_free(wme);
 	return ret;
 }
 
-- 
1.7.0.4



From janusz.dziedzic  Wed Aug 31 04:35:46 2011
From: janusz.dziedzic (Janusz Dziedzic)
Date: Wed, 31 Aug 2011 13:35:46 +0200
Subject: [PATCH] wpa_supplicant: AP/P2P_GO mode config options for WMM and
	UAPSD.
Message-ID: <CAFED-j=qh=3H9r6Uikn4eQtDQd1eZXmzQq16h6wduDZwhE3jgw@mail.gmail.com>

Add global configuration option for AP/P2P_GO mode when wpa_supplicant is used.
Options for enabling wmm or/and uapsd - similar like in hostapd config.

---
 wpa_supplicant/ap.c     |    8 ++++++--
 wpa_supplicant/config.c |    6 +++++-
 wpa_supplicant/config.h |   12 ++++++++++++
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 9eb2ba6..655d5a4 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -400,8 +400,12 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
 	wpa_drv_set_intra_bss(wpa_s, wpa_s->conf->p2p_intra_bss);
 #endif /* CONFIG_P2P */

-	if (wpa_s->parent->set_ap_uapsd)
-		params.uapsd = wpa_s->parent->ap_uapsd;
+	conf->bss->wmm_enabled = wpa_s->conf->wmm_enabled;
+	conf->bss->wmm_uapsd = wpa_s->conf->uapsd_advertisement_enabled;
+	conf->bss->wmm_uapsd |= wpa_s->parent->set_ap_uapsd;
+
+	if (conf->bss->wmm_uapsd)
+		params.uapsd = conf->bss->wmm_uapsd;
 	else
 		params.uapsd = -1;

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 7ec4531..201ab4e 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2445,7 +2445,11 @@ static const struct global_parse_data global_fields[] = {
 	{ INT(bss_expiration_scan_count), 0 },
 	{ INT_RANGE(filter_ssids, 0, 1), 0 },
 	{ INT(max_num_sta), 0 },
-	{ INT_RANGE(disassoc_low_ack, 0, 1), 0 }
+	{ INT_RANGE(disassoc_low_ack, 0, 1), 0 },
+#ifdef CONFIG_AP
+	{ INT_RANGE(wmm_enabled, 0, 1), 0},
+	{ INT_RANGE(uapsd_advertisement_enabled, 0, 1), 0}
+#endif /* CONFIG_AP */
 };

 #undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 10abdad..3a0aa33 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -426,6 +426,18 @@ struct wpa_config {
 	 * disassoc_low_ack - Disassocicate stations with massive packet loss
 	 */
 	int disassoc_low_ack;
+
+#ifdef CONFIG_AP
+	/**
+	 * wmm_enabled - Enable WMM for AP/P2P_GO mode
+	 */
+	int wmm_enabled;
+
+	/**
+	 * uapsd_advertisement_enabled - Enable UAPSD for AP/P2P_GO mode
+	 */
+	int uapsd_advertisement_enabled;
+#endif /* CONFIG_AP */
 };


-- 
1.7.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wpa_supplicant-AP-P2P_GO-mode-config-options-for-WMM.patch
Type: application/octet-stream
Size: 2218 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20110831/3d0f1d82/attachment-0001.obj 


From matt.causey  Wed Aug 31 05:58:43 2011
From: matt.causey (Matt Causey)
Date: Wed, 31 Aug 2011 08:58:43 -0400
Subject: wpa_supplicant roaming question
In-Reply-To: <CAFED-jk6AFE3bo0O3M5b96=ppSPYMNGVGLVyPJyqX+Y5Y8uwKw@mail.gmail.com>
References: <CAGnc4p_ARaE0Fd9uSjg2O8Ni+1CWoUhtYxz4BEMdb9dqO3u3EQ@mail.gmail.com>
	<CAFED-jk6AFE3bo0O3M5b96=ppSPYMNGVGLVyPJyqX+Y5Y8uwKw@mail.gmail.com>
Message-ID: <CAGnc4p-VJPYHkFnWkDPZ4sQ32HXTT8-dxMfMeDLLPfM4P9-ujw@mail.gmail.com>

Ha!  Yeah that's pretty lame on my part.  I was convinced that I'd
configured the supplicant properly at compile time, but alas I was
wrong.  I went back and re-compiled and now it works as expected.  :-)

I have another question now...I notice that if the supplicant
processes a disassociation or deauth, we call
wpa_supplicant_event_disassoc() (in blacklist.c), which then adds that
BSSID to a blacklist.  Then, the supplicant can no longer roam to that
BSSID, even if it is a better choice.

In our use case, we have a large number of access points and they can
drop offline for maintenance periodically.  What would folks recommend
we do to keep these BSSID's from becoming permanently blacklisted just
because they needed to reboot?

--
Matt


On Wed, Aug 31, 2011 at 4:21 AM, Janusz Dziedzic
<janusz.dziedzic at gmail.com> wrote:
> 2011/8/30 Matt Causey <matt.causey at gmail.com>:
>> Hello,
>>
>> I have a question about how scans are meant to be triggered with
>> wpa_supplicant, mac80211, and family. ?At my site, we have a fleet of
>> small devices that run the Atheros ar928x wireless cards. ?We use
>> EAP-TLS on Motorolla WLAN infrastructure. ?We're running linux
>> 2.6.38-2 with no vendor patches. ?Our wpa_supplicant version is 0.7.3.
>>
>> In our situation, we'll have a client adjacent to 2 or 3 BSSIDs
>> broadcasting the same ESSID, and the client moves about from time to
>> time. ?What I am seeing is that the client will sit on a -70 access
>> point, without roaming, for hours even in the presence of another
>> access point that registers as -50. ?However, if I do something to
>> manually trigger a scan, the device will suddenly roam to the more
>> favorable access point.
>>
>> For example, I can do 'iwlist scan', or HUP the supplicant. ?iwlist I
>> am sure causes the driver to generate a new set of scan results -
>> which the supplicant picks up and uses. ?HUP of the supplicant causes
>> the supplicant to call wpa_supplicant_req_scan(), and then roam as a
>> result of the new scan data. ?This leaves me thinking that the roaming
>> algorithm is working great, it's just that the background scanning is
>> not working as I would expect...
>>
>> So I read about bgscan here:
>> http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap-07.git;a=commit;h=e2f74005f548d90014cdf080802d455382e37cb9
>>
>> It looks like what I want - to configure the supplicant to scan
>> periodically. ?However I have it enabled and I don't ever see it kick
>> in. ?Any ideas why?
>>
>> Here is our supplicant config:
>>
>> network={
>> ? ? ? ?ssid="wpa2"
>> ? ? ? ?bgscan="simple:30:-45:300"
>> ? ? ? ?freq_list=<a list of the frequencies that we use>
>> ? ? ? ?identity="<client-id>"
>> ? ? ? ?key_mgmt=WPA-EAP
>> ? ? ? ?proto=WPA2
>> ? ? ? ?pairwise=CCMP
>> ? ? ? ?group=CCMP
>> ? ? ? ?eap=TLS
>> ? ? ? ?ca_cert="/etc/cert/root.pem"
>> ? ? ? ?client_cert="/etc/cert/user_cert.pem"
>> ? ? ? ?private_key="/etc/cert/user_key.pem"
>> ? ? ? ?private_key_passwd="<noober mic nooberson>"
>> }
>>
>> If there is other info I can provide please let me know!
>>
>
> Did you enable this CONFIG_BGSCAN_SIMPLE=y in wpa_supplicant/.config
> file before compilation?
>
> We are using bgscan simple and learn and don't have such problems.
> If still an issue:
> Run wpa_supplicant with -ddd option. After that you should get debug
> messages connected with bgscan_simple.
>
> BR
> Janusz
>


From Fabio.Tignanelli  Wed Aug 31 08:37:12 2011
From: Fabio.Tignanelli (Fabio Tignanelli)
Date: Wed, 31 Aug 2011 15:37:12 +0000
Subject: Logging unsolicited events in hostapd_cli
Message-ID: <5EFC33E018C9694BB56C6EF5F871F97C040048@CAM-BLA-211.paconsulting.com>

Hi all,
I am using HostAPD v0.6.9 available on Fedora 12 distribution.

I am looking at the use of hostapd_cli and how unsolicited events can be captured.

I was expecting to see the print out of an unsolicited message on the hostapd_cli prompt saying something like "authenticated" when a station would authenticate.

1) Is there anything I need to configure in the hostapd or hostapd_cli to get a notification of events like "authenticated" or "connected" in the hostapd_cli?

2) Is there a way I can update HostAPD v0.6.9 to the latest version v0.7.3 on my Fedora 12 without incurring in any compatibility trouble (I have tried to update the rpm package with yum but it seems v0.6.9 is as far as Fedora 12 can go)?

Thanks

Fabio



* Please consider the environment before printing this e-mail


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110831/b492c369/attachment.htm 


From vpn2008  Wed Aug 31 18:52:48 2011
From: vpn2008 (2008 vpn)
Date: Thu, 1 Sep 2011 09:52:48 +0800
Subject: What's the reason for "OpenSSL: openssl_handshake - SSL_connect
	error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher"
Message-ID: <CANokWkj_ZXjOyW3u=-uArskKDf=iL7edo70Rv+wTc7YWROnfdA@mail.gmail.com>

  I'm try eap-fast method.
   But error happens:
   4c e8 59 6b 27
   EAP-FAST: server_random - hexdump(len=32): 4e 5d da af 1f eb a8 e0 fa c6
27
   89 e5 70 a3 fb 11 19 7a 4c c6 20 77 69 de 4b cd 38 b9 d8 40 dd
   EAP-FAST: master_secret - hexdump(len=48): [REMOVED]
   SSL: (where=0x4008 ret=0x228)
   SSL: SSL3 alert: write (local SSL3 detected an error):fatal:handshake
   failure
   SSL: (where=0x2002 ret=0xffffffff)
   SSL: SSL_accept:error in SSLv3 read client hello C
   OpenSSL: openssl_handshake - SSL_connect error:1408A0C1:SSL
   routines:SSL3_GET_CLIENT_
HELLO:no shared cipher
   SSL: 7 bytes pending from ssl_out
   SSL: Failed - tls_out available to report error
   EAP-FAST: TLS processing failed
   EAP-FAST: PHASE1 -> FAILURE
   EAP: EAP entering state SELECT_ACTION
   EAP: getDecision: method failed -> FAILURE
   EAP: EAP entering state FAILURE
   EAP: Building EAP-Failure (id=116)
   What does this mean?  Is my config wrong?




   My Config file is as following:
   interface=eth2
   driver=wired
   logger_stdout=-1
   logger_stdout_level=1
   debug=2
   dump_file=/tmp/hostapd.dump
   ctrl_interface=/var/run/hostapd

   ieee8021x=1
   eap_server=1

 eap_user_file=/home/test/work/eap-fast/hostapd/hostapd-0.7.3/hostapd/hostapd.eap_user.wired
   eap_reauth_period=3600
   dh_file=/etc/hostapd/hostapd.dh.pem
   use_pae_group_addr=1
   pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f

   eap_fast_a_id=201112131415161718191a1b1c1d1e1f
   eap_fast_a_id_info=test server

   eap_fast_prov=3
   pac_key_lifetime=604800
   pac_key_refresh_time=86400

   ##### RADIUS configuration
   ####################################################
   # for IEEE 802.1X with external Authentication Server, IEEE 802.11
   # authentication with external ACL for MAC addresses, and accounting

   # The own IP address of the access point (used as NAS-IP-Address)
   own_ip_addr=127.0.0.1

   # RADIUS authentication server
   auth_server_addr=127.0.0.1
   auth_server_port=1812
   auth_server_shared_secret=radius*


  And the content of hostapd.eap_user.wired is:
   # Phase 1 users
   "user"          MD5     "password"
   "test user"     MD5     "secret"
   "FAST-000102030405" FAST

   # Phase 2 (tunnelled within EAP-PEAP or EAP-TTLS) users
   "t-md5"         MD5     "password"      [2]
   "DOMAIN\t-mschapv2"     MSCHAPV2        "password"      [2]
   "t-gtc"         GTC     "password"      [2]
   "not anonymous" MSCHAPV2        "password"      [2]
   "user"          MD5,GTC,MSCHAPV2        "password"      [2]
   "test user"     MSCHAPV2        hash:000102030405060708090a0b0c0d0e0f
[2]
   "ttls-user"     TTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,TTLS-MSCHAPV2
   "password"      [2]


   Config for wpa_supplicant is:
   ctrl_interface=/var/run/wpa_supplicant

   ctrl_interface_group=root

   ap_scan=0
   fast_reauth=1
   network={
   ssid=""
   scan_ssid=0
   key_mgmt=IEEE8021X
   eap=FAST
   identity="user"
   password="password"
   anonymous_identity="FAST-000102030405"
           phase1="fast_provisioning=1"
           pac_file="/etc/wpa_supplicant.eap-fast-pac"

   }

   I noticed we should config certificate file for EAP-TLS/PEAP/TTLS.
   But do we need config certificate file for EAP-FAST?


   Best Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110901/324025fd/attachment.htm 


From mmodem00  Wed Aug 31 21:44:32 2011
From: mmodem00 (=?ISO-8859-1?B?Wuk=?=)
Date: Thu, 1 Sep 2011 05:44:32 +0100
Subject: wpa_supplicant messes with keyboard
In-Reply-To: <4E5BF52D.50808@justmail.de>
References: <CAJZLoOwNLv6Kv4aaGqmWO5Owkn4dy6o15_RM5yCzuKJJuMGtEg@mail.gmail.com>
	<20110829140604.GA26801@jm.kir.nu>
	<CAJZLoOx_r5E4e2hQCqMNNMhO1tY+jNFosdgn2oZqB8kqGvo59g@mail.gmail.com>
	<CAJZLoOzq+aRANR0xzqYdrF_BbVtLW_UmwVZffKb81EqGvKYFhA@mail.gmail.com>
	<1314631782.8959.21.camel@jlt3.sipsolutions.net>
	<CAJZLoOzQv=EwSNjo0VFW6+js4xiKAqekJCWQqynz3Y6VUy9zTw@mail.gmail.com>
	<1314632639.8959.23.camel@jlt3.sipsolutions.net>
	<20110829115429.75fda8b6@mj>
	<CAJZLoOwxVW5p7iZGqJ5H-WEM0CYYmoVw41MiJxFPyC-+KpidhQ@mail.gmail.com>
	<1314635024.8959.24.camel@jlt3.sipsolutions.net>
	<CAJZLoOwc1FRZGCc9kB+OAF3HUKJxuQh5J6rE+h9uzqENeZWzEQ@mail.gmail.com>
	<4E5BCDFA.40508@justmail.de>
	<CAJZLoOyZKP=85J42xXGqZmZkLzJG8h5qUQYi+sKyF3TGTZ_xvA@mail.gmail.com>
	<4E5BF52D.50808@justmail.de>
Message-ID: <CAJZLoOzqnroR+NtFsr0=rqTbBQuQse-C+=+aAjxh9WEdjjvR6A@mail.gmail.com>

2011/8/29 Klaus M?ller <kmueller at justmail.de>:
> Z? schrieb:
>> 2011/8/29 Klaus M?ller <kmueller at justmail.de>:
>>> Z? schrieb:
>>> [...]
>>>> That doesnt make much sense since when i kill wpa_supplicant the
>>>> referred problems simply disappear.
>>
>> The problems starts happening when wpa-supplicant runs, and it
>> continues afecting the mouse and the keyboard and not just the
>> keyboard when using from git like i referred in previous comments.
>>
>> So this problem can be triggered by th wifi driver?
>
> wpa_supplicant has to start the hardware with the driver. If you stop
> wpa_supplicant, the hardware is stopped again (by wpa_supplicant).
> That's why it could be a driver issue.
>
>> when running dmesg it shows too much outputs of the wifi driver
>> (almost like a loop).
>
> This sounds bad.
>
>> But im attaching the ddesg output.
>>
>>> Surely. Which hardware / driver do you use? Which kernel (version)?
>>> 32/64 bit? Do you use compat-wireless (which version)?
>>
>> Currently im running a kernel-3.0.3 and its 64bits.
>> Since i remember using wpa_supplicant this always happened, no matter
>> if i used kernel-2.6.38 or the 3.0.x versions.
>>
>> This is the wifi driver:
>> rtl8192ce: Realtek Semiconductor Co., Ltd.|Device 8176 [NETWORK_OTHER]
>> (vendor:10ec device:8176 subv:10ec subd:9196) (rev: 01)
>
>
> According http://pci-ids.ucw.cz/read/PC/10ec/8176 ..., it's a Realtek
> RTL8188CE 802.11b/g/n WiFi Adapter
> (http://pci-ids.ucw.cz/read/PC/10ec/8176).
>
> I don't know, which driver you're really using. I would try
> the official driver (if you not already use it). You can get it here
> (one line):
>
> http://218.210.127.131/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8188CE
>
> According this entry, this driver should work (one line again):
> http://www.backtrack-linux.org/forums/hardware-compatibility-list/34817-realtek-rtl8188ce.html
>
>
> Klaus
>

Well i have installed the latest official driver from Realtek and
seams to have resolved some but not all.

When booting and after log in i see that theres 2 wpa_supplicant
instances running and im still with those problems, mouse hanging, and
keyboard repeating, but if i kill the wpa_supplicant triggered by
initscripts and stay only with the wpa_supplicant instance triggered
by NetworkManager than the mouse and keyboard behave fine.

So the initscript that calls wpa_supplicant is
/etc/sysconfig/network-scripts/ifup-eth and runs:

wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D wext

and seams due to this instance that mouse and keyboard continue with
that weird behaviour.

Can anyone comment?

-- 
Z?


From janusz.dziedzic  Wed Aug 31 22:17:28 2011
From: janusz.dziedzic (Janusz Dziedzic)
Date: Thu, 1 Sep 2011 07:17:28 +0200
Subject: wpa_supplicant roaming question
In-Reply-To: <CAGnc4p-VJPYHkFnWkDPZ4sQ32HXTT8-dxMfMeDLLPfM4P9-ujw@mail.gmail.com>
References: <CAGnc4p_ARaE0Fd9uSjg2O8Ni+1CWoUhtYxz4BEMdb9dqO3u3EQ@mail.gmail.com>
	<CAFED-jk6AFE3bo0O3M5b96=ppSPYMNGVGLVyPJyqX+Y5Y8uwKw@mail.gmail.com>
	<CAGnc4p-VJPYHkFnWkDPZ4sQ32HXTT8-dxMfMeDLLPfM4P9-ujw@mail.gmail.com>
Message-ID: <CAFED-j=L+n=U46qF=_C9PzNfAGp6C-XkCc5By0mRDQrEdzt-=Q@mail.gmail.com>

2011/8/31 Matt Causey <matt.causey at gmail.com>:
> Ha! ?Yeah that's pretty lame on my part. ?I was convinced that I'd
> configured the supplicant properly at compile time, but alas I was
> wrong. ?I went back and re-compiled and now it works as expected. ?:-)
>
> I have another question now...I notice that if the supplicant
> processes a disassociation or deauth, we call
> wpa_supplicant_event_disassoc() (in blacklist.c), which then adds that
> BSSID to a blacklist. ?Then, the supplicant can no longer roam to that
> BSSID, even if it is a better choice.
>
> In our use case, we have a large number of access points and they can
> drop offline for maintenance periodically. ?What would folks recommend
> we do to keep these BSSID's from becoming permanently blacklisted just
> because they needed to reboot?
>

Seems this is true. Blacklist will be cleared if "No APs found".

In case of our implementation we don't hit this problem. We have
additional CQM signal - beacon_miss - from our driver (nl80211). Count
of beacon_miss is configurable from supplicant when bgscan starts. Our
firmware support this beacon_miss detection - so, it is usefull - we
can roam before deauthenitcation in case someone will switch off AP or
we loose connection.
I think we will push this CQM cfg80211/nl80211 compat-wireless +
hostap implementation soon.

So, in case someone will switch off AP, before we will get
deauthentication we get this beacon_miss event and we have chance to
roam to another APs. If there isn't another APs blacklist will be
cleared because of "No APs found".

BR
Janusz


