From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2B8901382C5 for ; Tue, 2 Jun 2020 21:54:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6982EE0830; Tue, 2 Jun 2020 21:54:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 504F1E0830 for ; Tue, 2 Jun 2020 21:54:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7689C34EF5B for ; Tue, 2 Jun 2020 21:54:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2DDEF259 for ; Tue, 2 Jun 2020 21:54:12 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1591134830.589d7374dc5c023304f6226cb458d5346bdd3a0b.robbat2@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: net/, doc/ X-VCS-Repository: proj/netifrc X-VCS-Files: doc/net.example.Linux.in net/iw.sh X-VCS-Directories: net/ doc/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 589d7374dc5c023304f6226cb458d5346bdd3a0b X-VCS-Branch: master Date: Tue, 2 Jun 2020 21:54:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 641b324e-409d-4315-9911-35d631c58a28 X-Archives-Hash: 38c61c2caa87585f9c608230cb93ddb0 commit: 589d7374dc5c023304f6226cb458d5346bdd3a0b Author: Robin H. Johnson gentoo org> AuthorDate: Tue Jun 2 21:51:00 2020 +0000 Commit: Robin H. Johnson gentoo 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 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