linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] cfg80211: allow the plink state blocking for user managed mesh
@ 2015-04-17 17:30 Chun-Yeow Yeoh
  2015-04-24 10:23 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Chun-Yeow Yeoh @ 2015-04-17 17:30 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, Chun-Yeow Yeoh

wpa_supplicant or authsae handles the mesh peering in user
space, but the plink state is still managed in kernel space.
Currently, there is no implementation by wpa_supplicant or
authsae to block the plink state after it is set to ESTAB.

By applying this patch, we can use the "iw mesh0 station set
<MAC address> plink_action block" to block the peer mesh STA.
This is useful for experimenting purposes.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>

v2: respin the commit log (Johannes)
---
 net/wireless/nl80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index dd78445..8a33bba 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4061,7 +4061,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
 			return -EINVAL;
 		break;
 	case CFG80211_STA_MESH_PEER_USER:
-		if (params->plink_action != NL80211_PLINK_ACTION_NO_ACTION)
+		if (params->plink_action != NL80211_PLINK_ACTION_NO_ACTION &&
+		    params->plink_action != NL80211_PLINK_ACTION_BLOCK)
 			return -EINVAL;
 		break;
 	}
-- 
2.3.0


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

* Re: [PATCH v2] cfg80211: allow the plink state blocking for user managed mesh
  2015-04-17 17:30 [PATCH v2] cfg80211: allow the plink state blocking for user managed mesh Chun-Yeow Yeoh
@ 2015-04-24 10:23 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-04-24 10:23 UTC (permalink / raw)
  To: Chun-Yeow Yeoh; +Cc: linux-wireless

On Sat, 2015-04-18 at 01:30 +0800, Chun-Yeow Yeoh wrote:
> wpa_supplicant or authsae handles the mesh peering in user
> space, but the plink state is still managed in kernel space.
> Currently, there is no implementation by wpa_supplicant or
> authsae to block the plink state after it is set to ESTAB.
> 
> By applying this patch, we can use the "iw mesh0 station set
> <MAC address> plink_action block" to block the peer mesh STA.
> This is useful for experimenting purposes.

Applied.

johannes


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

end of thread, other threads:[~2015-04-24 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 17:30 [PATCH v2] cfg80211: allow the plink state blocking for user managed mesh Chun-Yeow Yeoh
2015-04-24 10:23 ` Johannes Berg

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).