All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals
@ 2016-08-05  5:26 Purushottam Kushwaha
  2016-08-05  8:48 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Purushottam Kushwaha @ 2016-08-05  5:26 UTC (permalink / raw)
  To: johannes
  Cc: linux-wireless, jouni, usdutt, ganeshk, mkalikot, amarnath, pkushwah

This commit provides the option for the host drivers to advertise the
support for different beacon intervals among the respective interface
combinations, through supp_diff_beacon_int (bool).

Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com>
---
 include/net/cfg80211.h       |  4 ++++
 include/uapi/linux/nl80211.h |  7 +++++--
 net/wireless/core.c          | 13 ++++++++++++-
 net/wireless/nl80211.c       |  3 +++
 net/wireless/util.c          | 24 +++++++++++++++++++++++-
 5 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9c23f4d3..1b7cd42 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2939,6 +2939,8 @@ struct ieee80211_iface_limit {
  *	only in special cases.
  * @radar_detect_widths: bitmap of channel widths supported for radar detection
  * @radar_detect_regions: bitmap of regions supported for radar detection
+ * @supp_diff_beacon_int: In this combination, the interface combinations
+ *	support different beacon intervals.
  *
  * With this structure the driver can describe which interface
  * combinations it supports concurrently.
@@ -2970,6 +2972,7 @@ struct ieee80211_iface_limit {
  *	.n_limits = ARRAY_SIZE(limits2),
  *	.max_interfaces = 8,
  *	.num_different_channels = 1,
+ *	.supp_diff_beacon_int = true,
  *  };
  *
  *
@@ -2997,6 +3000,7 @@ struct ieee80211_iface_combination {
 	bool beacon_int_infra_match;
 	u8 radar_detect_widths;
 	u8 radar_detect_regions;
+	bool supp_diff_beacon_int;
 };
 
 struct ieee80211_txrx_stypes {
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 2206941..b8d147c 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -4203,6 +4203,8 @@ enum nl80211_iface_limit_attrs {
  *	of supported channel widths for radar detection.
  * @NL80211_IFACE_COMB_RADAR_DETECT_REGIONS: u32 attribute containing the bitmap
  *	of supported regulatory regions for radar detection.
+ * @NL80211_IFACE_COMB_DIFF_BEACON_INTERVAL: flag attribute specifying that
+ *	different beacon interval within this group is allowed.
  * @NUM_NL80211_IFACE_COMB: number of attributes
  * @MAX_NL80211_IFACE_COMB: highest attribute number
  *
@@ -4210,8 +4212,8 @@ enum nl80211_iface_limit_attrs {
  *	limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2
  *	=> allows an AP and a STA that must match BIs
  *
- *	numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8
- *	=> allows 8 of AP/GO
+ *	numbers = [ #{AP, P2P-GO} <= 8 ], different BI, channels = 1, max = 8,
+ *	=> allows 8 of AP/GO that may have different beacon interval
  *
  *	numbers = [ #{STA} <= 2 ], channels = 2, max = 2
  *	=> allows two STAs on different channels
@@ -4237,6 +4239,7 @@ enum nl80211_if_combination_attrs {
 	NL80211_IFACE_COMB_NUM_CHANNELS,
 	NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
 	NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
+	NL80211_IFACE_COMB_DIFF_BEACON_INTERVAL,
 
 	/* keep last */
 	NUM_NL80211_IFACE_COMB,
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 7645e97..204f861 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -485,7 +485,7 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
 	int i, j;
 
 	for (i = 0; i < wiphy->n_iface_combinations; i++) {
-		u32 cnt = 0;
+		u32 cnt = 0, ap_cnt;
 		u16 all_iftypes = 0;
 
 		c = &wiphy->iface_combinations[i];
@@ -517,6 +517,7 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
 		if (WARN_ON(!c->n_limits))
 			return -EINVAL;
 
+		ap_cnt = 0;
 		for (j = 0; j < c->n_limits; j++) {
 			u16 types = c->limits[j].types;
 
@@ -538,6 +539,9 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
 				return -EINVAL;
 
 			cnt += c->limits[j].max;
+			ap_cnt += (types & (BIT(NL80211_IFTYPE_AP) |
+					    BIT(NL80211_IFTYPE_P2P_GO))) ?
+					c->limits[j].max : 0;
 			/*
 			 * Don't advertise an unsupported type
 			 * in a combination.
@@ -546,6 +550,13 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
 				return -EINVAL;
 		}
 
+		/*
+		 * Different beacon interval allowed only in AP or P2P_GO
+		 * multi-interface combinations.
+		 */
+		if (WARN_ON(c->supp_diff_beacon_int && (ap_cnt < 2)))
+			return -EINVAL;
+
 		/* You can't even choose that many! */
 		if (WARN_ON(cnt < c->max_interfaces))
 			return -EINVAL;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 46417f9..0a35d54 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1020,6 +1020,9 @@ static int nl80211_put_iface_combinations(struct wiphy *wiphy,
 		     nla_put_u32(msg, NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
 				c->radar_detect_regions)))
 			goto nla_put_failure;
+		if (c->supp_diff_beacon_int &&
+		    nla_put_flag(msg, NL80211_IFACE_COMB_DIFF_BEACON_INTERVAL))
+			goto nla_put_failure;
 
 		nla_nest_end(msg, nl_combi);
 	}
diff --git a/net/wireless/util.c b/net/wireless/util.c
index b7d1592..3ceaa97 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1553,6 +1553,27 @@ bool ieee80211_chandef_to_operating_class(struct cfg80211_chan_def *chandef,
 }
 EXPORT_SYMBOL(ieee80211_chandef_to_operating_class);
 
+static bool diff_beacon_interval_supported(struct wiphy *wiphy)
+{
+	const struct ieee80211_iface_combination *c;
+	int i, j;
+
+	for (i = 0; i < wiphy->n_iface_combinations; i++) {
+		c = &wiphy->iface_combinations[i];
+
+		if (!c->supp_diff_beacon_int)
+			continue;
+
+		for (j = 0; j < c->n_limits; j++)
+			if (c->limits[j].types &
+				(BIT(NL80211_IFTYPE_AP) |
+				  BIT(NL80211_IFTYPE_P2P_GO)))
+				return true;
+	}
+
+	return false;
+}
+
 int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev,
 				 u32 beacon_int)
 {
@@ -1565,7 +1586,8 @@ int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev,
 	list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
 		if (!wdev->beacon_interval)
 			continue;
-		if (wdev->beacon_interval != beacon_int) {
+		if (wdev->beacon_interval != beacon_int &&
+		    !diff_beacon_interval_supported(&rdev->wiphy)) {
 			res = -EINVAL;
 			break;
 		}
-- 
1.9.1


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

* Re: [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals
  2016-08-05  5:26 [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals Purushottam Kushwaha
@ 2016-08-05  8:48 ` Johannes Berg
  2016-08-08 17:58   ` Undekari, Sunil Dutt
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2016-08-05  8:48 UTC (permalink / raw)
  To: Purushottam Kushwaha
  Cc: linux-wireless, jouni, usdutt, ganeshk, mkalikot, amarnath

On Fri, 2016-08-05 at 10:56 +0530, Purushottam Kushwaha wrote:
> This commit provides the option for the host drivers to advertise the
> support for different beacon intervals among the respective interface
> combinations, through supp_diff_beacon_int (bool).

Neither your commit message nor the documentation makes a direct
reference to this affecting only AP/GO interface. However, you then go
and require that at least 2 interfaces with AP/GO are present.

What if you have AP,GO,mesh in the same interface combination? Either
your documentation needs to very very clearly state that the mesh must
match (either one of them?) and I'd go as far as renaming the APIs, or
you shouldn't require multiple APs and make this apply on mesh and IBSS
as well.

Are there really no restrictions whatsoever, btw?

It seems to me that if I were to specify beacon intervals which have a
very small GCD, you'll run into trouble when actually sending beacons.
Perhaps there should be a requirement on the GCD?

johannes

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

* RE: [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals
  2016-08-05  8:48 ` Johannes Berg
@ 2016-08-08 17:58   ` Undekari, Sunil Dutt
  2016-08-09  7:56     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Undekari, Sunil Dutt @ 2016-08-08 17:58 UTC (permalink / raw)
  To: Johannes Berg, Kushwaha, Purushottam
  Cc: linux-wireless, Malinen, Jouni, Kondabattini, Ganesh,
	Kalikot Veetil, Mahesh Kumar, Hullur Subramanyam, Amarnath,
	Kumar, Deepak (QCA)

PldoYXQgaWYgeW91IGhhdmUgQVAsR08sbWVzaCBpbiB0aGUgc2FtZSBpbnRlcmZhY2UgY29tYmlu
YXRpb24/IEVpdGhlciB5b3VyIGRvY3VtZW50YXRpb24gbmVlZHMgdG8gdmVyeSB2ZXJ5IGNsZWFy
bHkgc3RhdGUgdGhhdCB0aGUgbWVzaCBtdXN0IG1hdGNoIChlaXRoZXIgb25lIG9mIHRoZW0/KSBh
bmQgSSdkIGdvIGFzIGZhciBhcyA+cmVuYW1pbmcgdGhlIEFQSXMsIG9yIHlvdSBzaG91bGRuJ3Qg
cmVxdWlyZSBtdWx0aXBsZSBBUHMgYW5kIG1ha2UgdGhpcyBhcHBseSBvbiBtZXNoIGFuZCBJQlNT
IGFzIHdlbGwuDQpJIGd1ZXNzICwgd2UgY2FuIGV4dGVuZCB0aGlzIHRvIG1lc2ggYW5kIElCU1Mg
YXMgd2VsbC4gDQoNCj5JdCBzZWVtcyB0byBtZSB0aGF0IGlmIEkgd2VyZSB0byBzcGVjaWZ5IGJl
YWNvbiBpbnRlcnZhbHMgd2hpY2ggaGF2ZSBhIHZlcnkgc21hbGwgR0NELCB5b3UnbGwgcnVuIGlu
dG8gdHJvdWJsZSB3aGVuIGFjdHVhbGx5IHNlbmRpbmcgYmVhY29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BvZiB0aGVtPykgYW5kIEknZCBnbyBhcyBmYXIgYXMgcmVuYW1pbmcgdGhlIEFQSXMsIG9y
IHlvdSBzaG91bGRuJ3QgcmVxdWlyZSBtdWx0aXBsZSBBUHMgYW5kIG1ha2UgdGhpcyBhcHBseSBv
biBtZXNoIGFuZCBJQlNTIGFzIHdlbGwuDQoNCkFyZSB0aGVyZSByZWFsbHkgbm8gcmVzdHJpY3Rp
b25zIHdoYXRzb2V2ZXIsIGJ0dz8NCg0KSXQgc2VlbXMgdG8gbWUgdGhhdCBpZiBJIHdlcmUgdG8g
c3BlY2lmeSBiZWFjb24gaW50ZXJ2YWxzIHdoaWNoIGhhdmUgYSB2ZXJ5IHNtYWxsIEdDRCwgeW91
J2xsIHJ1biBpbnRvIHRyb3VibGUgd2hlbiBhY3R1YWxseSBzZW5kaW5nIGJlYWNvbnMuDQpQZXJo
YXBzIHRoZXJlIHNob3VsZCBiZSBhIHJlcXVpcmVtZW50IG9uIHRoZSBHQ0Q/DQoNCmpvaGFubmVz
DQo=

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

* Re: [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals
  2016-08-08 17:58   ` Undekari, Sunil Dutt
@ 2016-08-09  7:56     ` Johannes Berg
  2016-08-10 14:53       ` Undekari, Sunil Dutt
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2016-08-09  7:56 UTC (permalink / raw)
  To: Undekari, Sunil Dutt, Kushwaha, Purushottam
  Cc: linux-wireless, Malinen, Jouni, Kondabattini, Ganesh,
	Kalikot Veetil, Mahesh Kumar, Hullur Subramanyam, Amarnath,
	Kumar, Deepak (QCA)


> I guess , we can extend this to mesh and IBSS as well. 

I don't know what your firmware/hardware capabilities are :)

> > It seems to me that if I were to specify beacon intervals which
> > have a very small GCD, you'll run into trouble when actually
> > sending beacons.
> > Perhaps there should be a requirement on the GCD?
> Can we have this published by the host drivers through a new wiphy
> parameter , say "min_diff_beacon_interval_multiplier". This set's the
> expectation that any different beacon intervals on the wiphy  shall
> be a multiple of this parameter which is advertised by the host
> driver , isn't ?
> 
I'd argue that instead of having the interface combinations flag, that
nl80211 attribute could carry the GCD?

johannes

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

* RE: [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals
  2016-08-09  7:56     ` Johannes Berg
@ 2016-08-10 14:53       ` Undekari, Sunil Dutt
  2016-08-10 15:18         ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Undekari, Sunil Dutt @ 2016-08-10 14:53 UTC (permalink / raw)
  To: Johannes Berg, Kushwaha, Purushottam
  Cc: linux-wireless, Malinen, Jouni, Kondabattini, Ganesh,
	Kalikot Veetil, Mahesh Kumar, Hullur Subramanyam, Amarnath,
	Kumar, Deepak (QCA)

PiBJIGRvbid0IGtub3cgd2hhdCB5b3VyIGZpcm13YXJlL2hhcmR3YXJlIGNhcGFiaWxpdGllcyBh
cmUgOikNCkkgd2FzIG5vdCByZWZlcnJpbmcgdG8gYW55IHNwZWNpZmljIGFyY2hpdGVjdHVyZSBo
ZXJlLiAgV2l0aCB0aGUgMiBjaG9pY2VzIHlvdSBoYWQgbWVudGlvbmVkIChtZXNoIG11c3QgbWF0
Y2ggZWl0aGVyIG9uZSBvZiB0aGVtIC8gbWFrZSB0aGlzIGFwcGx5IG9uIG1lc2ggYW5kIElCU1Mg
YXMgd2VsbCApIHdlIHNlZSB0aGF0IHRoaXMgbmV3IGZsYWcgYmVpbmcgZGVmaW5lZCBpbiB0aGUg
aW50ZXJmYWNlIGNvbWJpbmF0aW9ucyBjb3VsZCBiZXR0ZXIgYmUgYXBwbGljYWJsZSBmb3IgYWxs
IHRoZSBiZWFjb25pbmcgaW50ZXJmYWNlcy4gDQpJZiB3ZSBoYWQgcmVzdHJpY3RlZCB0aGlzIHRv
IEFQIC8gUDJQIEdPIGFuZCBoYXZlIE1lc2ggbWF0Y2ggZWl0aGVyIG9mIHRoZW0gLCBhIG5ldyBy
ZXF1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pcyBwdWJsaXNoZWQgYnkgdGhlIGhvc3QgZHJpdmVy
cyB0aHJvdWdoIGEgbmV3IHdpcGh5IA0KPiBwYXJhbWV0ZXIgLCBzYXkgIm1pbl9kaWZmX2JlYWNv
bl9pbnRlcnZhbF9tdWx0aXBsaWVyIi4gVGhpcyBzZXQncyB0aGUgDQo+IGV4cGVjdGF0aW9uIHRo
YXQgYW55IGRpZmZlcmVudCBiZWFjb24gaW50ZXJ2YWxzIG9uIHRoZSB3aXBoecKgwqBzaGFsbCBi
ZSANCj4gYSBtdWx0aXBsZSBvZiB0aGlzIHBhcmFtZXRlciB3aGljaCBpcyBhZHZlcnRpc2VkIGJ5
IHRoZSBob3N0IGRyaXZlciAsIA0KPiBpc24ndCA/DQo+IA0KSSdkIGFyZ3VlIHRoYXQgaW5zdGVh
ZCBvZiBoYXZpbmcgdGhlIGludGVyZmFjZSBjb21iaW5hdGlvbnMgZmxhZywgdGhhdA0Kbmw4MDIx
MSBhdHRyaWJ1dGUgY291bGQgY2FycnkgdGhlIEdDRD8NCg0Kam9oYW5uZXMNCg==

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

* Re: [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals
  2016-08-10 14:53       ` Undekari, Sunil Dutt
@ 2016-08-10 15:18         ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2016-08-10 15:18 UTC (permalink / raw)
  To: Undekari, Sunil Dutt, Kushwaha, Purushottam
  Cc: linux-wireless, Malinen, Jouni, Kondabattini, Ganesh,
	Kalikot Veetil, Mahesh Kumar, Hullur Subramanyam, Amarnath,
	Kumar, Deepak (QCA)

On Wed, 2016-08-10 at 14:53 +0000, Undekari, Sunil Dutt wrote:
> > 
> > I don't know what your firmware/hardware capabilities are :)
> I was not referring to any specific architecture here.  With the 2
> choices you had mentioned (mesh must match either one of them / make
> this apply on mesh and IBSS as well ) we see that this new flag being
> defined in the interface combinations could better be applicable for
> all the beaconing interfaces. 

Yes, I agree. If that's what you can implement, that's clearly the
better choice, and once you have multiple BIs for APs it seems
relatively straight-forward to also add for other interface types.

> If we had restricted this to AP / P2P GO and have Mesh match either
> of them , a new request ( in future ? ) to have a different interval
> for Mesh, IMO  would ask a need for new flag , isn't ?  Our intention
> here was to avoid this by ensuring that this flag is applicable for
> all the beaconing interface combinations. 

Makes sense.

Just need to update the documentation then, I guess?

> > I'd argue that instead of having the interface combinations flag,
> > that nl80211 attribute could carry the GCD?
> If your say here is to just use the wiphy parameter rather than
> having the flag in the interface combinations, signifying the support
> for different beacon intervals , Yes we too agree to your point. 

Well, I think it would still make sense to have this on the interface
combinations, if only for flexibility. It's practically equally
complicated (or cheap) to do that way, but gives a bit more
flexibility.

I was just thinking that instead of adding the *flag* on interface
combinations, which you did in this patch:
> +	bool supp_diff_beacon_int;
...
> + * @NL80211_IFACE_COMB_DIFF_BEACON_INTERVAL: flag attribute specifying that

it would make sense to make that a

u8 diff_beacon_int_gcd;
...
NL80211_IFACE_COMB_DIFF_BEACON_GCD: u32 attribute specifying the GCD
	of different beacon interfaces (not present if all beacon
	intervals must match)


> This is considering the fact that the current implementation
> restricts the validation of the beacon interval
> (cfg80211_validate_beacon_int ) to only AP / P2P GO. 
> Neither the Mesh / IBSS ( join ) have this restriction . Not sure why
> this is not imposed for Mesh / IBSS though. 

Interesting, that seems like a bug that we should fix. I suspect the
reason is that IBSS used to not be supported in combinations, and so
nobody thought of adding it there, and mesh was more or less copied
from IBSS. Do you want to submit a (separate) patch to fix this?
Otherwise I can do that.

> After introducing this flag in the interface combinations, we do feel
> that currently it is not going to apply for Mesh / IBSS , unless
> there is a future need to do so , which we are not aware of . 

Well, you're right given the circumstances, but I'd rather fix that
first, forcing MBSS/IBSS to match, and then let it be relaxed with the
new capability. I'm pretty sure current drivers wouldn't do something
useful when mesh/AP combinations have different BIs.

johannes

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

end of thread, other threads:[~2016-08-10 19:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05  5:26 [PATCH v4] cfg80211: Provision to allow the support for different beacon intervals Purushottam Kushwaha
2016-08-05  8:48 ` Johannes Berg
2016-08-08 17:58   ` Undekari, Sunil Dutt
2016-08-09  7:56     ` Johannes Berg
2016-08-10 14:53       ` Undekari, Sunil Dutt
2016-08-10 15:18         ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.