2015-06-23 08:50:58

by Janusz Dziedzic

[permalink] [raw]
Subject: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

Hello,

This is my setup:
t1-ath9k:
- AP (2412)
- P2P_GO - go_intent=15 (2462)

ref P2P - intel 7260
ref STA - t2-ath9k

Scenario:
1. setup AP t1-ath9k
2. connect STA (t2-ath9k) to AP
3. run ping STA->AP
4. t1-ath9k - p2p_connect <intel7260> go_intent=15
5. intel7260 - p2p_connect <t1-ath9k>
6. go_negotiation success
7. connect failed ...
8. ...

Sometimes I see such fail on intel7260:

[533519.009978] p2p-wlan3-0: authenticate with 02:03:7f:4e:a0:cd
[533519.009999] p2p-wlan3-0: Allocated STA 02:03:7f:4e:a0:cd
[533519.013667] p2p-wlan3-0: Inserted STA 02:03:7f:4e:a0:cd
[533519.014128] p2p-wlan3-0: direct probe to 02:03:7f:4e:a0:cd (try 1/3)
[533519.217270] p2p-wlan3-0: direct probe to 02:03:7f:4e:a0:cd (try 2/3)
[533519.421349] p2p-wlan3-0: direct probe to 02:03:7f:4e:a0:cd (try 3/3)
[533519.624329] p2p-wlan3-0: authentication with 02:03:7f:4e:a0:cd timed out
[533519.633084] p2p-wlan3-0: Removed STA 02:03:7f:4e:a0:cd
[533519.633325] p2p-wlan3-0: Destroyed STA 02:03:7f:4e:a0:cd

I suspect this is because of P2P_GO NoA?
Who should care about this direct probes tx when GO is not present?

In case we didn't send direct probes - there is no problem and TC
works correctly

BR
Janusz


2015-06-27 21:49:20

by Janusz Dziedzic

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On 24 June 2015 at 14:20, Peer, Ilan <[email protected]> wrote:
> Hi Janusz,
>
> Any chance you can check if the attached patch fixes the issue you reported?
>
> Thanks in advance,
>
I just check the mac80211/cfg80211 code, and I am not sure this direct
probe could work correctly.

Function ieee80211_rx_mgmt_probe_resp() is interesting.
Seems we call
ieee80211_rx_bss_info() -> ieee80211_bss_info_update ->
cfg80211_inform_bss_width_frame() -> cfg80211_bss_update() -> this
could set bss->proberesp_ies
and after that check:

if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies &&
ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) {
/* got probe response, continue with auth */
sdata_info(sdata, "direct probe responded\n");

So, ifmgd->auth_data->bss->proberesp_ies could be set before check?

BTW, During my tests (no matter which card used) I never saw this msg:
sdata_info(sdata, "direct probe responded\n");
And always saw 3 failed direct probes.

@Johannes: Is that possible or I miss something.

BR
Janusz

> Ilan.
>
>> -----Original Message-----
>> From: [email protected] [mailto:linux-wireless-
>> [email protected]] On Behalf Of Peer, Ilan
>> Sent: Tuesday, June 23, 2015 21:00
>> To: [email protected]
>> Cc: [email protected]; [email protected]
>> Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT -
>> direct probe issue
>>
>> -----Original Message-----
>> From: Krishna Chaitanya
>> <[email protected]<mailto:Krishna%20Chaitanya%20%3cchaitanya.m
>> [email protected]%3e>>
>> To: "Peer, Ilan"
>> <[email protected]<mailto:%22Peer,%20Ilan%22%20%[email protected]
>> om%3e>>
>> Cc: Janusz Dziedzic
>> <[email protected]<mailto:Janusz%20Dziedzic%20%3cjanusz.dziedzic
>> @tieto.com%3e>>, [email protected] <linux-
>> [email protected]<mailto:%22linux-
>> [email protected]%22%20%[email protected]%3e>>
>> Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT -
>> direct probe issue
>> Date: Tue, 23 Jun 2015 17:34:59 +0530
>>
>>
>>
>> On Tue, Jun 23, 2015 at 5:25 PM, Peer, Ilan
>> <[email protected]<mailto:[email protected]>> wrote:
>> >> >>
>> >> >> I suspect this is because of P2P_GO NoA?
>> >> >> Who should care about this direct probes tx when GO is not present?
>> >> >>
>> >> >> In case we didn't send direct probes - there is no problem and TC
>> >> >> works correctly
>> >> >>
>> >> >
>> >> > Interesting :)
>> >> >
>> >> > Any chance you can provide trace-cmd and sniffer capture?
>> >> >
>> >> > Normally, if we provided the FW with the BSSID information and TSF
>> >> > information for syncing, once the FW hears the 1st beacon with the
>> >> > NoA it should sync on it and not try to attempt to transmit any
>> >> > frames as long as the AP is absent. It might also be related to the
>> >> > fact that the probe requests are sent to broadcast address, but I
>> >> > need to further checks this. Anyway, having some data would help ;)
>> >> >
>> >> Thats exactly the point, if GO is in NoA FW will not transmit but
>> >> mac80211 timed-out for direct probe.
>> >>
>> >> So the question is should mac80211 even send the direct probe in this
>> >> case when GO is in NoA?
>> >
>> > I think that this should be the driver's/FW responsibility, as at this stage
>> mac80211 already configured all the information needed for the driver to
>> sync (assuming it heard a beacon/probe) and in addition mgd_prepare_tx() is
>> called to have the driver/FW prepare for a transmission of the mgmt. frame,
>> including synchronization with the P2P GO power state.
>> Agree, the actual transmission should definitely be in driver/FW but the
>> timeout for such frames are still at mac80211, so unless su it synchronizes the
>> timeouts to GO NoA period this "can" fail depending on the absence period of
>> GO. Default auth_timeout is 200ms.
>>
>>
>> I do not think that mac80211 should handle the synchronization, mostly since
>> it does not get the beacons from the AP we are associated with. As I
>> explained above, this should be the drivers/FW responsibility once they have
>> all the information they require. As such, I think that is expected from the
>> driver/FW to only send the frames when the P2P GO/AP is on the channel.
>>
>> Regards,
>>
>> Ilan.
>>
>>
>>
>> N r y b X ǧv ^ )޺{.n + { *ޕ , {ay ʇڙ ,j f h z w j:+v w j m zZ+
>> ݢj" ! i

2015-06-23 11:11:10

by Peer, Ilan

[permalink] [raw]
Subject: RE: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogbGludXgtd2lyZWxlc3Mt
b3duZXJAdmdlci5rZXJuZWwub3JnIFttYWlsdG86bGludXgtd2lyZWxlc3MtDQo+IG93bmVyQHZn
ZXIua2VybmVsLm9yZ10gT24gQmVoYWxmIE9mIEphbnVzeiBEemllZHppYw0KPiBTZW50OiBUdWVz
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0dXJlPw0KDQpOb3JtYWxseSwgaWYgd2UgcHJvdmlkZWQgdGhlIEZXIHdpdGggdGhl
IEJTU0lEIGluZm9ybWF0aW9uIGFuZCBUU0YgaW5mb3JtYXRpb24gZm9yIHN5bmNpbmcsIG9uY2Ug
dGhlIEZXIGhlYXJzIHRoZSAxc3QgYmVhY29uIHdpdGggdGhlIE5vQSBpdCBzaG91bGQgc3luYyBv
biBpdCBhbmQgbm90IHRyeSB0byBhdHRlbXB0IHRvIHRyYW5zbWl0IGFueSBmcmFtZXMgYXMgbG9u
ZyBhcyB0aGUgQVAgaXMgYWJzZW50LiBJdCBtaWdodCBhbHNvIGJlIHJlbGF0ZWQgdG8gdGhlIGZh
Y3QgdGhhdCB0aGUgcHJvYmUgcmVxdWVzdHMgYXJlIHNlbnQgdG8gYnJvYWRjYXN0IGFkZHJlc3Ms
IGJ1dCBJIG5lZWQgdG8gZnVydGhlciBjaGVja3MgdGhpcy4gQW55d2F5LCBoYXZpbmcgc29tZSBk
YXRhIHdvdWxkIGhlbHAgOykNCg0KUmVnYXJkcywNCg0KSWxhbi4NCg==

2015-06-23 12:05:19

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Tue, Jun 23, 2015 at 5:25 PM, Peer, Ilan <[email protected]> wrote:
>> >>
>> >> I suspect this is because of P2P_GO NoA?
>> >> Who should care about this direct probes tx when GO is not present?
>> >>
>> >> In case we didn't send direct probes - there is no problem and TC
>> >> works correctly
>> >>
>> >
>> > Interesting :)
>> >
>> > Any chance you can provide trace-cmd and sniffer capture?
>> >
>> > Normally, if we provided the FW with the BSSID information and TSF
>> > information for syncing, once the FW hears the 1st beacon with the NoA
>> > it should sync on it and not try to attempt to transmit any frames as
>> > long as the AP is absent. It might also be related to the fact that
>> > the probe requests are sent to broadcast address, but I need to
>> > further checks this. Anyway, having some data would help ;)
>> >
>> Thats exactly the point, if GO is in NoA FW will not transmit but mac80211
>> timed-out for direct probe.
>>
>> So the question is should mac80211 even send the direct probe in this case
>> when GO is in NoA?
>
> I think that this should be the driver's/FW responsibility, as at this stage mac80211 already configured all the information needed for the driver to sync (assuming it heard a beacon/probe) and in addition mgd_prepare_tx() is called to have the driver/FW prepare for a transmission of the mgmt. frame, including synchronization with the P2P GO power state.
Agree, the actual transmission should definitely be in driver/FW
but the timeout for such frames are still at mac80211, so unless
it synchronizes the timeouts to GO NoA period this "can" fail
depending on the absence period of GO. Default auth_timeout is 200ms.

2015-06-27 22:03:30

by Janusz Dziedzic

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On 27 June 2015 at 23:49, Janusz Dziedzic <[email protected]> wrote:
> On 24 June 2015 at 14:20, Peer, Ilan <[email protected]> wrote:
>> Hi Janusz,
>>
>> Any chance you can check if the attached patch fixes the issue you reported?
>>
>> Thanks in advance,
>>
> I just check the mac80211/cfg80211 code, and I am not sure this direct
> probe could work correctly.
>
> Function ieee80211_rx_mgmt_probe_resp() is interesting.
> Seems we call
> ieee80211_rx_bss_info() -> ieee80211_bss_info_update ->
> cfg80211_inform_bss_width_frame() -> cfg80211_bss_update() -> this
> could set bss->proberesp_ies
> and after that check:
>
> if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies &&
> ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) {
> /* got probe response, continue with auth */
> sdata_info(sdata, "direct probe responded\n");
>
> So, ifmgd->auth_data->bss->proberesp_ies could be set before check?
>
> BTW, During my tests (no matter which card used) I never saw this msg:
> sdata_info(sdata, "direct probe responded\n");
> And always saw 3 failed direct probes.
>
> @Johannes: Is that possible or I miss something.
>

Simplest patch I made:

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index e9f36f7..8ceae3d 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -371,6 +371,7 @@ struct ieee80211_mgd_auth_data {
struct cfg80211_bss *bss;
unsigned long timeout;
int tries;
+ bool waiting_probe_resp;
u16 algorithm, expected_transaction;

u8 key[WLAN_KEY_LEN_WEP104];
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3294666..6f4027e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3212,13 +3212,14 @@ static void
ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid))
ieee80211_reset_ap_probe(sdata);

- if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies &&
+ if (ifmgd->auth_data && ifmgd->auth_data->waiting_probe_resp &&
ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) {
/* got probe response, continue with auth */
sdata_info(sdata, "direct probe responded\n");
ifmgd->auth_data->tries = 0;
ifmgd->auth_data->timeout = jiffies;
ifmgd->auth_data->timeout_started = true;
+ ifmgd->auth_data->waiting_probe_resp = false;
run_again(sdata, ifmgd->auth_data->timeout);
}
}
@@ -3727,6 +3728,8 @@ static int ieee80211_probe_auth(struct
ieee80211_sub_if_data *sdata)
auth_data->bss->bssid, auth_data->tries,
IEEE80211_AUTH_MAX_TRIES);

+ auth_data->waiting_probe_resp = true;
+
rcu_read_lock();
ssidie = ieee80211_bss_get_ie(auth_data->bss, WLAN_EID_SSID);
if (!ssidie) {

BR
Janusz

2015-06-24 12:21:04

by Peer, Ilan

[permalink] [raw]
Subject: RE: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

Hi Janusz,

Any chance you can check if the attached patch fixes the issue you reported?

Thanks in advance,

Ilan.

> -----Original Message-----
> From: [email protected] [mailto:linux-wireless-
> [email protected]] On Behalf Of Peer, Ilan
> Sent: Tuesday, June 23, 2015 21:00
> To: [email protected]
> Cc: [email protected]; [email protected]
> Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT -
> direct probe issue
>
> -----Original Message-----
> From: Krishna Chaitanya
> <[email protected]<mailto:Krishna%20Chaitanya%20%3cchaitanya.m
> [email protected]%3e>>
> To: "Peer, Ilan"
> <[email protected]<mailto:%22Peer,%20Ilan%22%20%[email protected]
> om%3e>>
> Cc: Janusz Dziedzic
> <[email protected]<mailto:Janusz%20Dziedzic%20%3cjanusz.dziedzic
> @tieto.com%3e>>, [email protected] <linux-
> [email protected]<mailto:%22linux-
> [email protected]%22%20%[email protected]%3e>>
> Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT -
> direct probe issue
> Date: Tue, 23 Jun 2015 17:34:59 +0530
>
>
>
> On Tue, Jun 23, 2015 at 5:25 PM, Peer, Ilan
> <[email protected]<mailto:[email protected]>> wrote:
> >> >>
> >> >> I suspect this is because of P2P_GO NoA?
> >> >> Who should care about this direct probes tx when GO is not present?
> >> >>
> >> >> In case we didn't send direct probes - there is no problem and TC
> >> >> works correctly
> >> >>
> >> >
> >> > Interesting :)
> >> >
> >> > Any chance you can provide trace-cmd and sniffer capture?
> >> >
> >> > Normally, if we provided the FW with the BSSID information and TSF
> >> > information for syncing, once the FW hears the 1st beacon with the
> >> > NoA it should sync on it and not try to attempt to transmit any
> >> > frames as long as the AP is absent. It might also be related to the
> >> > fact that the probe requests are sent to broadcast address, but I
> >> > need to further checks this. Anyway, having some data would help ;)
> >> >
> >> Thats exactly the point, if GO is in NoA FW will not transmit but
> >> mac80211 timed-out for direct probe.
> >>
> >> So the question is should mac80211 even send the direct probe in this
> >> case when GO is in NoA?
> >
> > I think that this should be the driver's/FW responsibility, as at this stage
> mac80211 already configured all the information needed for the driver to
> sync (assuming it heard a beacon/probe) and in addition mgd_prepare_tx() is
> called to have the driver/FW prepare for a transmission of the mgmt. frame,
> including synchronization with the P2P GO power state.
> Agree, the actual transmission should definitely be in driver/FW but the
> timeout for such frames are still at mac80211, so unless su it synchronizes the
> timeouts to GO NoA period this "can" fail depending on the absence period of
> GO. Default auth_timeout is 200ms.
>
>
> I do not think that mac80211 should handle the synchronization, mostly since
> it does not get the beacons from the AP we are associated with. As I
> explained above, this should be the drivers/FW responsibility once they have
> all the information they require. As such, I think that is expected from the
> driver/FW to only send the frames when the P2P GO/AP is on the channel.
>
> Regards,
>
> Ilan.
>
>
>
> N r y b X ǧv ^ )޺{.n + { *ޕ , {ay ʇڙ ,j f h z  w j:+v w j m zZ+
> ݢj" ! i


Attachments:
0001-iwlwifi-mvm-Use-the-AP-station-for-non_sta-transmit.patch (2.24 kB)
0001-iwlwifi-mvm-Use-the-AP-station-for-non_sta-transmit.patch

2015-06-28 08:36:30

by Peer, Ilan

[permalink] [raw]
Subject: RE: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

SGkgSmFudXN6LA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IGxpbnV4
LXdpcmVsZXNzLW93bmVyQHZnZXIua2VybmVsLm9yZyBbbWFpbHRvOmxpbnV4LXdpcmVsZXNzLQ0K
PiBvd25lckB2Z2VyLmtlcm5lbC5vcmddIE9uIEJlaGFsZiBPZiBKYW51c3ogRHppZWR6aWMNCj4g
U2VudDogU3VuZGF5LCBKdW5lIDI4LCAyMDE1IDAwOjQ5DQo+IFRvOiBQZWVyLCBJbGFuDQo+IENj
OiBsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmc7IGNoYWl0YW55YS5tZ2l0QGdtYWlsLmNv
bTsgSm9oYW5uZXMNCj4gQmVyZw0KPiBTdWJqZWN0OiBSZTogQVAgKyBQMlBfR08gbXVsdGljaGFu
IHRlc3RzIHdpdGggaW50ZWw3MjYwIGFzIGEgUDJQX0NMSUVOVCAtDQo+IGRpcmVjdCBwcm9iZSBp
c3N1ZQ0KPiANCj4gT24gMjQgSnVuZSAyMDE1IGF0IDE0OjIwLCBQZWVyLCBJbGFuIDxpbGFuLnBl
ZXJAaW50ZWwuY29tPiB3cm90ZToNCj4gPiBIaSBKYW51c3osDQo+ID4NCj4gPiB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M4MDIxMSBhbHJlYWR5IGNvbmZpZ3Vy
ZWQgYWxsIHRoZSBpbmZvcm1hdGlvbiBuZWVkZWQgZm9yIHRoZSBkcml2ZXIgdG8gc3luYyAoYXNz
dW1pbmcgaXQgaGVhcmQgYSBiZWFjb24vcHJvYmUpIGFuZCBpbiBhZGRpdGlvbiBtZ2RfcHJlcGFy
ZV90eCgpIGlzIGNhbGxlZCB0byBoYXZlIHRoZSBkcml2ZXIvRlcgcHJlcGFyZSBmb3IgYSB0cmFu
c21pc3Npb24gb2YgdGhlIG1nbXQuIGZyYW1lLCBpbmNsdWRpbmcgc3luY2hyb25pemF0aW9uIHdp
dGggdGhlIFAyUCBHTyBwb3dlciBzdGF0ZS4NCg0KUmVnYXJkcywNCg0KSWxhbi4NCg==

2015-06-23 11:30:03

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Tue, Jun 23, 2015 at 4:41 PM, Peer, Ilan <[email protected]> wrote:
>
>
>> -----Original Message-----
>> From: [email protected] [mailto:linux-wireless-
>> [email protected]] On Behalf Of Janusz Dziedzic
>> Sent: Tuesday, June 23, 2015 11:51
>> To: [email protected]
>> Cc: Peer, Ilan
>> Subject: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct
>> probe issue
>>
>> Hello,
>>
>> This is my setup:
>> t1-ath9k:
>> - AP (2412)
>> - P2P_GO - go_intent=15 (2462)
>>
>> ref P2P - intel 7260
>> ref STA - t2-ath9k
>>
>> Scenario:
>> 1. setup AP t1-ath9k
>> 2. connect STA (t2-ath9k) to AP
>> 3. run ping STA->AP
>> 4. t1-ath9k - p2p_connect <intel7260> go_intent=15 5. intel7260 -
>> p2p_connect <t1-ath9k> 6. go_negotiation success 7. connect failed ...
>> 8. ...
>>
>> Sometimes I see such fail on intel7260:
>>
>> [533519.009978] p2p-wlan3-0: authenticate with 02:03:7f:4e:a0:cd
>> [533519.009999] p2p-wlan3-0: Allocated STA 02:03:7f:4e:a0:cd
>> [533519.013667] p2p-wlan3-0: Inserted STA 02:03:7f:4e:a0:cd
>> [533519.014128] p2p-wlan3-0: direct probe to 02:03:7f:4e:a0:cd (try 1/3)
>> [533519.217270] p2p-wlan3-0: direct probe to 02:03:7f:4e:a0:cd (try 2/3)
>> [533519.421349] p2p-wlan3-0: direct probe to 02:03:7f:4e:a0:cd (try 3/3)
>> [533519.624329] p2p-wlan3-0: authentication with 02:03:7f:4e:a0:cd timed
>> out [533519.633084] p2p-wlan3-0: Removed STA 02:03:7f:4e:a0:cd
>> [533519.633325] p2p-wlan3-0: Destroyed STA 02:03:7f:4e:a0:cd
>>
>> I suspect this is because of P2P_GO NoA?
>> Who should care about this direct probes tx when GO is not present?
>>
>> In case we didn't send direct probes - there is no problem and TC works
>> correctly
>>
>
> Interesting :)
>
> Any chance you can provide trace-cmd and sniffer capture?
>
> Normally, if we provided the FW with the BSSID information and TSF information for syncing, once the FW hears the 1st beacon with the NoA it should sync on it and not try to attempt to transmit any frames as long as the AP is absent. It might also be related to the fact that the probe requests are sent to broadcast address, but I need to further checks this. Anyway, having some data would help ;)
>
Thats exactly the point, if GO is in NoA FW will not transmit
but mac80211 timed-out for direct probe.

So the question is should mac80211 even send the direct
probe in this case when GO is in NoA?

2015-06-23 18:00:30

by Peer, Ilan

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IEtyaXNobmEgQ2hhaXRhbnlhIDxjaGFp
dGFueWEubWdpdEBnbWFpbC5jb208bWFpbHRvOktyaXNobmElMjBDaGFpdGFueWElMjAlM2NjaGFp
dGFueWEubWdpdEBnbWFpbC5jb20lM2U+Pg0KVG86ICJQZWVyLCBJbGFuIiA8aWxhbi5wZWVyQGlu
dGVsLmNvbTxtYWlsdG86JTIyUGVlciwlMjBJbGFuJTIyJTIwJTNjaWxhbi5wZWVyQGludGVsL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cgcmVzcG9uc2liaWxpdHkgb25jZSB0aGV5IGhhdmUgYWxsIHRoZSBpbmZvcm1hdGlvbiB0aGV5
IHJlcXVpcmUuIEFzIHN1Y2gsIEkgdGhpbmsgdGhhdCBpcyBleHBlY3RlZCBmcm9tIHRoZSBkcml2
ZXIvRlcgdG8gb25seSBzZW5kIHRoZSBmcmFtZXMgd2hlbiB0aGUgUDJQIEdPL0FQIGlzIG9uIHRo
ZSBjaGFubmVsLg0KDQpSZWdhcmRzLA0KDQpJbGFuLg0KDQoNCg0K

2015-07-02 11:51:13

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, Jul 2, 2015 at 5:09 PM, Johannes Berg <[email protected]> wrote:
> On Thu, 2015-07-02 at 11:44 +0200, Janusz Dziedzic wrote:
>>
>> > The issue above can probably easily fixed by doing the BSS update
>> > after
>> > the "direct probe responded" though, no? Like this:
>> > https://p.sipsolutions.net/67f9212f0f9f3642.txt
>> >
>> This was my first idea, but in such case I suspect we will send
>> another direct probe while bss->proberesp_ies will be not set and
>> ieee80211_probe_auth() will send second probe_req?
Yes, if the seuqnce number is not set the second probe resp
also gets dropped.

> But why would it not be set? We do rely on ieee80211_rx_bss_info()
> setting it, after all.
The probe resp is dropped early in the rx_path so this call is not made.

2015-07-02 09:44:08

by Janusz Dziedzic

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On 2 July 2015 at 09:27, Johannes Berg <[email protected]> wrote:
> On Sat, 2015-06-27 at 23:49 +0200, Janusz Dziedzic wrote:
>>
>> I just check the mac80211/cfg80211 code, and I am not sure this
>> direct probe could work correctly.
>>
>> Function ieee80211_rx_mgmt_probe_resp() is interesting.
>> Seems we call
>> ieee80211_rx_bss_info() -> ieee80211_bss_info_update ->
>> cfg80211_inform_bss_width_frame() -> cfg80211_bss_update() -> this
>> could set bss->proberesp_ies
>> and after that check:
>>
>> if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies
>> &&
>> ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss
>> ->bssid)) {
>> /* got probe response, continue with auth */
>> sdata_info(sdata, "direct probe responded\n");
>>
>> So, ifmgd->auth_data->bss->proberesp_ies could be set before check?
>>
>> BTW, During my tests (no matter which card used) I never saw this
>> msg:
>> sdata_info(sdata, "direct probe responded\n");
>> And always saw 3 failed direct probes.
>>
>> @Johannes: Is that possible or I miss something.
>>
>
> I agree that this looks like a bug, but I'm not sure it's really all
> that relevant?
>
> After all, ieee80211_probe_auth() takes ->proberesp_ies as its only
> condition, so even if it doesn't get triggered immediately by the
> "direct probe responded", it should send an auth frame the next round,
> just the rounds counter wouldn't restart at 0 again.
>
> Perhaps though the changes in cfg80211's BSS management broke this
> whole logic? Then again, that's quite a while ago.
>
> The issue above can probably easily fixed by doing the BSS update after
> the "direct probe responded" though, no? Like this:
> https://p.sipsolutions.net/67f9212f0f9f3642.txt
>
This was my first idea, but in such case I suspect we will send
another direct probe while bss->proberesp_ies will be not set and
ieee80211_probe_auth() will send second probe_req?

BR
Janusz

2015-07-02 09:03:07

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, Jul 2, 2015 at 12:57 PM, Johannes Berg
<[email protected]> wrote:
> On Sat, 2015-06-27 at 23:49 +0200, Janusz Dziedzic wrote:
>>
>> I just check the mac80211/cfg80211 code, and I am not sure this
>> direct probe could work correctly.
>>
>> Function ieee80211_rx_mgmt_probe_resp() is interesting.
>> Seems we call
>> ieee80211_rx_bss_info() -> ieee80211_bss_info_update ->
>> cfg80211_inform_bss_width_frame() -> cfg80211_bss_update() -> this
>> could set bss->proberesp_ies
>> and after that check:
>>
>> if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies
>> &&
>> ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss
>> ->bssid)) {
>> /* got probe response, continue with auth */
>> sdata_info(sdata, "direct probe responded\n");
>>
>> So, ifmgd->auth_data->bss->proberesp_ies could be set before check?
>>
>> BTW, During my tests (no matter which card used) I never saw this
>> msg:
>> sdata_info(sdata, "direct probe responded\n");
>> And always saw 3 failed direct probes.
>>
>> @Johannes: Is that possible or I miss something.
>>
>
> I agree that this looks like a bug, but I'm not sure it's really all
> that relevant?
>
> After all, ieee80211_probe_auth() takes ->proberesp_ies as its only
> condition, so even if it doesn't get triggered immediately by the
> "direct probe responded", it should send an auth frame the next round,
> just the rounds counter wouldn't restart at 0 again.
>
> Perhaps though the changes in cfg80211's BSS management broke this
> whole logic? Then again, that's quite a while ago.
>
> The issue above can probably easily fixed by doing the BSS update after
> the "direct probe responded" though, no? Like this:
> https://p.sipsolutions.net/67f9212f0f9f3642.txt
>
We have also found another issue with direct probe.
Some of the AP's are not setting sequence number in the probe responses
so in case of a retry they are dropped as duplicate by rx_h_check
causing direct probe to fail.

2015-07-02 12:37:21

by Johannes Berg

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, 2015-07-02 at 17:43 +0530, Krishna Chaitanya wrote:
>
> Thismight still be relevant, if you remember our discussion
> (
> http://permalink.gmane.org/gmane.linux.kernel.wireless.general/135533
> )
> a while ago, in a passive scan environment beacon might have
> the latest information than probe response but we end up using
> probe response, so in those cases direct probe helps to
> get the right capabilities.
>
> But i remember your argument about changing AP config is not
> much of a use case :-)

Yeah I still don't think this is much of an issue.

> In an environment where AP config is changed this might be helpful
> else not needed. Given the enterprise wifi deployments using
> controllers auto-changing of AP config based on the environemnt may
> not be far away

I can see the HT/VHT operation changing, and perhaps even channel
jumping, but staying on the channel and changing parameters that can't
actually be updated on the fly seems a bit strange. I'm not even sure
what parameters those would be.

That said, I found at least one issue with removing the direct probe:
If the beacon only has WMM info and not WMM parameters (as permitted by
the WMM spec) then we would disable WMM in ieee80211_mgd_assoc() if we
don't have a probe response. We'd thus have to move validation to after
having received the association response, but at that point it's not
clear to me what we should do if we don't receive good WMM parameters,
then we can't connect without WMM any more.

johannes

2015-07-02 12:13:53

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, Jul 2, 2015 at 5:31 PM, Johannes Berg <[email protected]> wrote:
> On Thu, 2015-07-02 at 17:20 +0530, Krishna Chaitanya wrote:
>> On Thu, Jul 2, 2015 at 5:09 PM, Johannes Berg <
>> [email protected]> wrote:
>> > On Thu, 2015-07-02 at 11:44 +0200, Janusz Dziedzic wrote:
>> > >
>> > > > The issue above can probably easily fixed by doing the BSS
>> > > > update
>> > > > after
>> > > > the "direct probe responded" though, no? Like this:
>> > > > https://p.sipsolutions.net/67f9212f0f9f3642.txt
>> > > >
>> > > This was my first idea, but in such case I suspect we will send
>> > > another direct probe while bss->proberesp_ies will be not set
>> > > and
>> > > ieee80211_probe_auth() will send second probe_req?
>> Yes, if the seuqnce number is not set the second probe resp
>> also gets dropped.
>>
>> > But why would it not be set? We do rely on ieee80211_rx_bss_info()
>> > setting it, after all.
>> The probe resp is dropped early in the rx_path so this call is not
>> made.
>
> Yeah but that way Janusz's patch makes the whole probe step pointless -
> we *want* that information, if it doesn't show up we have another
> problem
If the probe response is valid then Janusz's patch make sense.

> That said, the original patch introducing this was:
>
> commit 9859b81eaeb8d48563b5fbd90215c0ae606455a3
> Author: Ron Rindjunsky <[email protected]>
> Date: Sat Aug 9 03:02:19 2008 +0300
>
> mac80211: add direct probe before association
>
> This patch adds a direct probe request as first step in the association
> flow if data we have is not up to date. Motivation of this step is to make
> sure that the bss information we have is correct, since last scan could
> have been done a while ago, and beacons do not fully answer this need as
> there are potential differences between them and probe responses (e.g.
> WMM parameter element)
>
> Signed-off-by: Ron Rindjunsky <[email protected]>
> Signed-off-by: Tomas Winkler <[email protected]>
> Signed-off-by: John W. Linville <[email protected]>
>
>
> This addresses two things
>
> 1) potentially stale data (scan)
> 2) potential differences in IEs between beacons/probe responses
>
> I think the stale data issue is not all that relevant, since it's
> unlikely that the BSS actually got torn down and re-created with
> entirely different parameters.
Thismight still be relevant, if you remember our discussion
(http://permalink.gmane.org/gmane.linux.kernel.wireless.general/135533)
a while ago, in a passive scan environment beacon might have
the latest information than probe response but we end up using
probe response, so in those cases direct probe helps to
get the right capabilities.

But i remember your argument about changing AP config is not
much of a use case :-)

> The differences in IEs are also debatable - in particular the one that
> he gave as an example isn't all that relevant since we take it from the
> association response (unless the AP is broken and not including it
> there).
>
> HT/VHT information we don't take from the assoc response since that's
> also frequently broken, but we now (unlike at the time when that patch
> was written) update HT/VHT operation when it changes in the beacon.
>
> Overall I'm thus wondering if this direct probe step really buys us
> much today?

In an environment where AP config is changed this might be helpful
else not needed. Given the enterprise wifi deployments using controllers
auto-changing of AP config based on the environemnt may not be far away

2015-07-02 11:38:49

by Johannes Berg

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, 2015-07-02 at 14:32 +0530, Krishna Chaitanya wrote:
>
> We have also found another issue with direct probe.
> Some of the AP's are not setting sequence number in the probe
> responses
> so in case of a retry they are dropped as duplicate by rx_h_check
> causing direct probe to fail.

I don't quite see how that can be an issue, since the RETRY bit
shouldn't be set??

johannes

2015-07-02 12:01:43

by Johannes Berg

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, 2015-07-02 at 17:20 +0530, Krishna Chaitanya wrote:
> On Thu, Jul 2, 2015 at 5:09 PM, Johannes Berg <
> [email protected]> wrote:
> > On Thu, 2015-07-02 at 11:44 +0200, Janusz Dziedzic wrote:
> > >
> > > > The issue above can probably easily fixed by doing the BSS
> > > > update
> > > > after
> > > > the "direct probe responded" though, no? Like this:
> > > > https://p.sipsolutions.net/67f9212f0f9f3642.txt
> > > >
> > > This was my first idea, but in such case I suspect we will send
> > > another direct probe while bss->proberesp_ies will be not set
> > > and
> > > ieee80211_probe_auth() will send second probe_req?
> Yes, if the seuqnce number is not set the second probe resp
> also gets dropped.
>
> > But why would it not be set? We do rely on ieee80211_rx_bss_info()
> > setting it, after all.
> The probe resp is dropped early in the rx_path so this call is not
> made.

Yeah but that way Janusz's patch makes the whole probe step pointless -
we *want* that information, if it doesn't show up we have another
problem

That said, the original patch introducing this was:

commit 9859b81eaeb8d48563b5fbd90215c0ae606455a3
Author: Ron Rindjunsky <[email protected]>
Date: Sat Aug 9 03:02:19 2008 +0300

mac80211: add direct probe before association

This patch adds a direct probe request as first step in the association
flow if data we have is not up to date. Motivation of this step is to make
sure that the bss information we have is correct, since last scan could
have been done a while ago, and beacons do not fully answer this need as
there are potential differences between them and probe responses (e.g.
WMM parameter element)

Signed-off-by: Ron Rindjunsky <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: John W. Linville <[email protected]>


This addresses two things

1) potentially stale data (scan)
2) potential differences in IEs between beacons/probe responses

I think the stale data issue is not all that relevant, since it's
unlikely that the BSS actually got torn down and re-created with
entirely different parameters.

The differences in IEs are also debatable - in particular the one that
he gave as an example isn't all that relevant since we take it from the
association response (unless the AP is broken and not including it
there).

HT/VHT information we don't take from the assoc response since that's
also frequently broken, but we now (unlike at the time when that patch
was written) update HT/VHT operation when it changes in the beacon.

Overall I'm thus wondering if this direct probe step really buys us
much today?

johannes

2015-07-02 11:50:05

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, Jul 2, 2015 at 5:08 PM, Johannes Berg <[email protected]> wrote:
> On Thu, 2015-07-02 at 14:32 +0530, Krishna Chaitanya wrote:
>>
>> We have also found another issue with direct probe.
>> Some of the AP's are not setting sequence number in the probe
>> responses
>> so in case of a retry they are dropped as duplicate by rx_h_check
>> causing direct probe to fail.
>
> I don't quite see how that can be an issue, since the RETRY bit
> shouldn't be set??

If retry bit is not set, then it works, but in a noisy channel 2.4GHz
we are seeing high retries causing direct probes to fail 90% of the
time.

The AP in case is Marvel AP RD88W8787 (WFA Testbed).

2015-07-02 07:27:18

by Johannes Berg

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Sat, 2015-06-27 at 23:49 +0200, Janusz Dziedzic wrote:
>
> I just check the mac80211/cfg80211 code, and I am not sure this
> direct probe could work correctly.
>
> Function ieee80211_rx_mgmt_probe_resp() is interesting.
> Seems we call
> ieee80211_rx_bss_info() -> ieee80211_bss_info_update ->
> cfg80211_inform_bss_width_frame() -> cfg80211_bss_update() -> this
> could set bss->proberesp_ies
> and after that check:
>
> if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies
> &&
> ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss
> ->bssid)) {
> /* got probe response, continue with auth */
> sdata_info(sdata, "direct probe responded\n");
>
> So, ifmgd->auth_data->bss->proberesp_ies could be set before check?
>
> BTW, During my tests (no matter which card used) I never saw this
> msg:
> sdata_info(sdata, "direct probe responded\n");
> And always saw 3 failed direct probes.
>
> @Johannes: Is that possible or I miss something.
>

I agree that this looks like a bug, but I'm not sure it's really all
that relevant?

After all, ieee80211_probe_auth() takes ->proberesp_ies as its only
condition, so even if it doesn't get triggered immediately by the
"direct probe responded", it should send an auth frame the next round,
just the rounds counter wouldn't restart at 0 again.

Perhaps though the changes in cfg80211's BSS management broke this
whole logic? Then again, that's quite a while ago.

The issue above can probably easily fixed by doing the BSS update after
the "direct probe responded" though, no? Like this:
https://p.sipsolutions.net/67f9212f0f9f3642.txt

johannes

2015-07-02 11:39:32

by Johannes Berg

[permalink] [raw]
Subject: Re: AP + P2P_GO multichan tests with intel7260 as a P2P_CLIENT - direct probe issue

On Thu, 2015-07-02 at 11:44 +0200, Janusz Dziedzic wrote:
>
> > The issue above can probably easily fixed by doing the BSS update
> > after
> > the "direct probe responded" though, no? Like this:
> > https://p.sipsolutions.net/67f9212f0f9f3642.txt
> >
> This was my first idea, but in such case I suspect we will send
> another direct probe while bss->proberesp_ies will be not set and
> ieee80211_probe_auth() will send second probe_req?
>

But why would it not be set? We do rely on ieee80211_rx_bss_info()
setting it, after all.

johannes