linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Allow probe response frame rx to user space in AP mode
@ 2016-03-07  7:12 Vasanthakumar Thiagarajan
  2016-03-08 16:55 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2016-03-07  7:12 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Vasanthakumar Thiagarajan

Especially during off-channel scan user space might be interested
in probe reponse frames along with beacon to build a list
of preferred channel and bssid which could be sent to the stations
around for better spectrum management. Do not drop probe response
frame in AP mode and advertise driver's capability to receive probe
response frame in AP mode to user space.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
---
 net/mac80211/main.c | 2 ++
 net/mac80211/rx.c   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 8190bf2..c8a97da 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -401,6 +401,7 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
 		.rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
 			BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
 			BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
+			BIT(IEEE80211_STYPE_PROBE_RESP >> 4) |
 			BIT(IEEE80211_STYPE_DISASSOC >> 4) |
 			BIT(IEEE80211_STYPE_AUTH >> 4) |
 			BIT(IEEE80211_STYPE_DEAUTH >> 4) |
@@ -412,6 +413,7 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
 		.rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
 			BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
 			BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
+			BIT(IEEE80211_STYPE_PROBE_RESP >> 4) |
 			BIT(IEEE80211_STYPE_DISASSOC >> 4) |
 			BIT(IEEE80211_STYPE_AUTH >> 4) |
 			BIT(IEEE80211_STYPE_DEAUTH >> 4) |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9127957..9d8f8ea 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3464,6 +3464,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
 				return false;
 			if (ieee80211_is_public_action(hdr, skb->len))
 				return true;
+			if (ieee80211_is_probe_resp(hdr->frame_control))
+				return true;
 			return ieee80211_is_beacon(hdr->frame_control);
 		}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Allow probe response frame rx to user space in AP mode
  2016-03-07  7:12 [PATCH] mac80211: Allow probe response frame rx to user space in AP mode Vasanthakumar Thiagarajan
@ 2016-03-08 16:55 ` Johannes Berg
  2016-03-09  5:10   ` Thiagarajan, Vasanthakumar
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2016-03-08 16:55 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless

On Mon, 2016-03-07 at 12:42 +0530, Vasanthakumar Thiagarajan wrote:
> Especially during off-channel scan user space might be interested
> in probe reponse frames along with beacon to build a list
> of preferred channel and bssid which could be sent to the stations
> around for better spectrum management. Do not drop probe response
> frame in AP mode and advertise driver's capability to receive probe
> response frame in AP mode to user space.

I'm not convinced that this is a good idea - these frames will still
populate the BSS cache, and it's not really quite well-specified what
happens when you have both [1]

I also don't understand the use case; "might be interested" is ... very
vague.

johannes

[1] obviously, today you get both, but an argument could be made for
userspace RX meaning the frame has no action taken in the kernel, like
with action frames.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Allow probe response frame rx to user space in AP mode
  2016-03-08 16:55 ` Johannes Berg
@ 2016-03-09  5:10   ` Thiagarajan, Vasanthakumar
  2016-03-09  9:29     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Thiagarajan, Vasanthakumar @ 2016-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XNl
OyAibWlnaHQgYmUgaW50ZXJlc3RlZCIgaXMgLi4uIHZlcnkNCj4gdmFndWUuDQoNCldoZW4gYW4g
dXNlciBzcGFjZSB3YW50cyB0byBoYXZlIGNvbnRyb2wgb3ZlciB0aGUgZHVyYXRpb24gb2Ygb2Zm
LWNoYW5uZWwgKHNpbmdsZSBjaGFubmVsKQ0Kc2NhbiBpdCBjb3VsZCB1c2UgcmVtYWluLW9uLWNo
YW5uZWwgaW50ZXJmYWNlIGluc3RlYWQgb2YgdHJpZ2dlcl9zY2FuIHRvIHBlcmZvcm0gb2ZmLWNo
YW5uZWwNCnNjYW4uIEkgZG9udCB0aGluayBCU1MgY2FjaGUgd2lsbCBiZSB1cGRhdGVkIHdpdGgg
dGhlIEJTUyBpbmZvcm1hdGlvbiByZWNlaXZlZCBkdXJpbmcNCnJlbWFpbi1vbi1jaGFubmVsLiBJ
biB0aGlzIGNhc2UsIHVzZXIgc3BhY2UgY291bGQgdXNlIHByb2JlIHJlc3BvbnNlIGZyYW1lcyB0
byBidWlsZA0KQlNTIGxpc3QuDQoNClZhc2FudGgNCg==

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Allow probe response frame rx to user space in AP mode
  2016-03-09  5:10   ` Thiagarajan, Vasanthakumar
@ 2016-03-09  9:29     ` Johannes Berg
  2016-03-10  6:27       ` Thiagarajan, Vasanthakumar
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2016-03-09  9:29 UTC (permalink / raw)
  To: Thiagarajan, Vasanthakumar; +Cc: linux-wireless@vger.kernel.org

On Wed, 2016-03-09 at 05:10 +0000, Thiagarajan, Vasanthakumar wrote:

> When an user space wants to have control over the duration of off-
> channel (single channel) scan it could use remain-on-channel
> interface instead of trigger_scan to perform off-channel scan. I dont
> think BSS cache will be updated with the BSS information received
> during remain-on-channel. In this case, user space could use probe
> response frames to build BSS list.
> 
That's not a use case, that's an implementation?

FWIW, we have patches pending to add some dwell time control for
scanning since it's required for some radio resource measurement
things. It seems like that would address your use case.

johannes

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Allow probe response frame rx to user space in AP mode
  2016-03-09  9:29     ` Johannes Berg
@ 2016-03-10  6:27       ` Thiagarajan, Vasanthakumar
  0 siblings, 0 replies; 5+ messages in thread
From: Thiagarajan, Vasanthakumar @ 2016-03-10  6:27 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org

T24gV2VkbmVzZGF5IDA5IE1hcmNoIDIwMTYgMDI6NTkgUE0sIEpvaGFubmVzIEJlcmcgd3JvdGU6
DQo+IE9uIFdlZCwgMjAxNi0wMy0wOSBhdCAwNToxMCArMDAwMCwgVGhpYWdhcmFqYW4sIFZhc2Fu
dGhha3VtYXIgd3JvdGU6DQo+DQo+PiBXaGVuIGFuIHVzZXIgc3BhY2Ugd2FudHMgdG8gaGF2ZSBj
b250cm9sIG92ZXIgdGhlIGR1cmF0aW9uIG9mIG9mZi0NCj4+IGNoYW5uZWwgKHNpbmdsZSBjaGFu
bmVsKSBzY2FuIGl0IGNvdWxkIHVzZSByZW1haW4tb24tY2hhbm5lbA0KPj4gaW50ZXJmYWNlIGlu
c3RlYWQgb2YgdHJpZ2dlcl9zY2FuIHRvIHBlcmZvcm0gb2ZmLWNoYW5uZWwgc2Nhbi4gSSBkb250
DQo+PiB0aGluayBCU1MgY2FjaGUgd2lsbCBiZSB1cGRhdGVkIHdpdGggdGhlIEJTUyBpbmZvcm1h
dGlvbiByZWNlaXZlZA0KPj4gZHVyaW5nIHJlbWFpbi1vbi1jaGFubmVsLiBJbiB0aGlzIGNhc2Us
IHVzZXIgc3BhY2UgY291bGQgdXNlIHByb2JlDQo+PiByZXNwb25zZSBmcmFtZXMgdG8gYnVpbGQg
QlNTIGxpc3QuDQo+Pg0KPiBUaGF0J3Mgbm90IGEgdXNlIGNhc2UsIHRoYXQncyBhbiBpbXBsZW1l
bnRhdGlvbj8NCg0KVXNlciBzcGFjZSB3YW50cyB0byBidWlsZCB1cCBhIGxpc3Qgb2YgcHJlZmVy
cmVkIEJTUyBhbmQgY2hhbm5lbCBmcm9tIG9mZi1jaGFubmVsDQpzY2FuIGFuZCB0aGVzZSBpbmZv
cm1hdGlvbiBjYW4gYmUgc2hhcmVkIHdpdGggb3RoZXIgc3RhdGlvbnMgYXJvdW5kIHRvIGJldHRl
cg0KdXNlIHRoZSBzcGVjdHJ1bS4gV2hlbiB0aGUgYnNzIGxpc3QgaXMgbm90IGF2YWlsYWJsZSBk
dXJpbmcgcmVtYWluLW9uIGNoYW5uZWwsDQpwcm9iZSByZXNwb25zZSB3aWxsIGJlIHVzZWQgdG8g
cHJlcGFyZSB0aGUgbGlzdC4NCg0KPg0KPiBGV0lXLCB3ZSBoYXZlIHBhdGNoZXMgcGVuZGluZyB0
byBhZGQgc29tZSBkd2VsbCB0aW1lIGNvbnRyb2wgZm9yDQo+IHNjYW5uaW5nIHNpbmNlIGl0J3Mg
cmVxdWlyZWQgZm9yIHNvbWUgcmFkaW8gcmVzb3VyY2UgbWVhc3VyZW1lbnQNCj4gdGhpbmdzLiBJ
dCBzZWVtcyBsaWtlIHRoYXQgd291bGQgYWRkcmVzcyB5b3VyIHVzZSBjYXNlLg0KDQpTdXJlLCB0
aGlzIHdpbGwgd29yayBmb3IgbWUuIFRoYW5rcw0KDQpWYXNhbnRo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-10  6:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07  7:12 [PATCH] mac80211: Allow probe response frame rx to user space in AP mode Vasanthakumar Thiagarajan
2016-03-08 16:55 ` Johannes Berg
2016-03-09  5:10   ` Thiagarajan, Vasanthakumar
2016-03-09  9:29     ` Johannes Berg
2016-03-10  6:27       ` Thiagarajan, Vasanthakumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).