public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/netifrc:master commit in: net/, doc/
Date: Tue,  2 Jun 2020 21:54:12 +0000 (UTC)	[thread overview]
Message-ID: <1591134830.589d7374dc5c023304f6226cb458d5346bdd3a0b.robbat2@OpenRC> (raw)

commit:     589d7374dc5c023304f6226cb458d5346bdd3a0b
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  2 21:51:00 2020 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Jun  2 21:53:50 2020 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=589d7374

net/iw: implement 802.11s mesh

Closes: https://bugs.gentoo.org/469296
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 doc/net.example.Linux.in |  7 ++++++-
 net/iw.sh                | 25 +++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in
index 4fc603b..d88302b 100644
--- a/doc/net.example.Linux.in
+++ b/doc/net.example.Linux.in
@@ -231,7 +231,7 @@
 # do require the SSID to be set - do this here
 #essid_eth0="any"
 
-# Set the mode of the interface (managed, ad-hoc, master or auto)
+# Set the mode of the interface (managed, ad-hoc, master, mesh or auto)
 # The default is auto
 # If it's ad-hoc or master you also may need to specify the channel below
 #mode_eth0="auto"
@@ -409,6 +409,11 @@
 # NOTE: preferred_aps  list ignores blacklisted_aps - so if you have
 # the same SSID in both, well, you're a bit silly :p
 
+# 802.11s mesh support
+# Requires CONFIG_MAC80211_MESH in kernel and hardware support
+#mode_wlan0="mesh"
+#mesh_wlan0="MyMeshNetworkID"
+
 
 ############################################################
 # wpa_supplicant

diff --git a/net/iw.sh b/net/iw.sh
index dcdbb79..029b9d6 100644
--- a/net/iw.sh
+++ b/net/iw.sh
@@ -5,6 +5,7 @@
 
 _config_vars="$_config_vars ssid mode associate_timeout sleep_scan"
 _config_vars="$_config_vars preferred_aps blacklist_aps"
+_config_vars="$_config_vars mesh"
 
 iw_depend()
 {
@@ -170,6 +171,26 @@ iw_setup_adhoc()
 	return 0
 }
 
+iw_setup_mesh()
+{
+	if [ -z "${MESH}" ]; then
+		eerror "${IFACE} requires a MESH to be set to operate in mesh mode"
+		eerror "adjust the mesh_${IFVAR} setting in /etc/conf.d/net"
+		return 1
+	fi
+
+	iw_set_mode 'mesh'
+
+	veinfo "Joining mesh '$MESH' with $IFACE"
+	iw ${IFACE} mesh join "${MESH}" || return 1
+
+	# Finally apply the user Config
+	iw_user_config
+
+	iw_report
+	return 0
+}
+
 iw_wait_for_association()
 {
 	local timeout= i=0
@@ -600,6 +621,10 @@ iw_configure()
 		managed)
 			# Fall through
 			;;
+		mesh)
+			iw_setup_mesh
+			return $?
+			;;
 		*)
 			eerror "Only managed and ad-hoc are supported"
 			return 1


             reply	other threads:[~2020-06-02 21:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 21:54 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-07  9:42 [gentoo-commits] proj/netifrc:master commit in: net/, doc/ Sam James
2023-11-25  4:54 Robin H. Johnson
2021-04-05 20:00 Robin H. Johnson
2021-04-05 20:00 Robin H. Johnson
2021-01-18 12:33 Lars Wendler
2021-01-05 14:27 Lars Wendler
2020-05-31 23:21 Robin H. Johnson
2019-04-21  4:11 Robin H. Johnson
2015-11-08 14:30 Robin H. Johnson
2015-11-08 14:30 Robin H. Johnson
2013-08-28 16:02 Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1591134830.589d7374dc5c023304f6226cb458d5346bdd3a0b.robbat2@OpenRC \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox