Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] nl80211: allow more operations for mesh and ad-hoc interfaces
@ 2019-10-29 11:56 Markus Theil
  2019-10-30  9:03 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Theil @ 2019-10-29 11:56 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Markus Theil

This change allows mesh and ad-hoc interfaces to change beacons and
tx queue settings. The direct change of these settings should be ok
for these kind of interfaces and should maybe only forbidden for
station-like interface types.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 net/wireless/nl80211.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d1451e731bb8..c4ff8c2033af 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2923,7 +2923,9 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
 			return -EINVAL;
 
 		if (netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
-		    netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
+		    netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO &&
+		    netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT &&
+		    netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC)
 			return -EINVAL;
 
 		if (!netif_running(netdev))
@@ -4831,7 +4833,9 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
 	int err;
 
 	if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
-	    dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
+	    dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO &&
+	    dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT &&
+	    dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC)
 		return -EOPNOTSUPP;
 
 	if (!rdev->ops->change_beacon)
-- 
2.23.0


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

end of thread, other threads:[~2019-10-30 14:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29 11:56 [PATCH] nl80211: allow more operations for mesh and ad-hoc interfaces Markus Theil
2019-10-30  9:03 ` Johannes Berg
2019-10-30 13:40   ` Markus Theil
2019-10-30 14:04     ` Johannes Berg
2019-10-30 14:10       ` Markus Theil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox