Re: [PATCH] cfg80211: Allow different beacon interval support on virtual interface.

2016-07-08 Thread Johannes Berg
On Fri, 2016-07-08 at 16:02 +0530, Purushottam Kushwaha wrote:
> Driver may support different beacon interval on virtual interfaces.
> Allow setting different beacon interval per interface if driver has
> such support.
> 
It seems this should be an nl80211 feature flag (ext features)

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] cfg80211: Allow different beacon interval support on virtual interface.

2016-07-08 Thread Purushottam Kushwaha
Driver may support different beacon interval on virtual interfaces.
Allow setting different beacon interval per interface if driver has
such support.

Signed-off-by: Purushottam Kushwaha 
---
 include/net/cfg80211.h | 5 +
 net/wireless/util.c| 3 +++
 2 files changed, 8 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9c23f4d3..2dd9152 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3292,6 +3292,9 @@ struct wiphy_iftype_ext_capab {
  * @bss_select_support: bitmask indicating the BSS selection criteria supported
  * by the driver in the .connect() callback. The bit position maps to the
  * attribute indices defined in  nl80211_bss_select_attr.
+ * @support_different_beacon_interval: support of different beacon_interval on
+ * virtual interfaces. This should be set if driver wishes to advertise
+ * support for different beacon_interval.
  */
 struct wiphy {
/* assign these fields before you register the wiphy */
@@ -3421,6 +3424,8 @@ struct wiphy {
 
u32 bss_select_support;
 
+   bool support_different_beacon_interval;
+
char priv[0] __aligned(NETDEV_ALIGN);
 };
 
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 2443ee3..253d303 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1560,6 +1560,9 @@ int cfg80211_validate_beacon_int(struct 
cfg80211_registered_device *rdev,
if (!beacon_int)
return -EINVAL;
 
+   if (rdev->wiphy.support_different_beacon_interval)
+   return 0;
+
list_for_each_entry(wdev, >wiphy.wdev_list, list) {
if (!wdev->beacon_interval)
continue;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html