aboutsummaryrefslogtreecommitdiff
path: root/net/iw.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net/iw.sh')
-rw-r--r--net/iw.sh25
1 files changed, 25 insertions, 0 deletions
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