config wifi-iface
option network the interface you want wifi to bridge with
option device wifi0, wifi1, wifi2, wifiN
config wifi-iface
option network the interface you want wifi to bridge with
option device wifi0, wifi1, wifi2, wifiN
- option mode ap, sta, adhoc, monitor, or wds
+ option mode ap, sta, adhoc, monitor, mesh, or wds
option txpower (deprecated) transmission power in dBm
option ssid ssid name
option bssid bssid address
option txpower (deprecated) transmission power in dBm
option ssid ssid name
option bssid bssid address
\item \texttt{monitor} \\
Monitor mode
\item \texttt{monitor} \\
Monitor mode
+ \item \texttt{mesh} \\
+ Mesh Point mode (802.11s)
+
\item \texttt{wds} \\
WDS point-to-point link
\item \texttt{wds} \\
WDS point-to-point link
+\paragraph{Mesh Point}
+
+Mesh Point (802.11s) is only supported by some mac80211 drivers. It requires the iw package
+to be installed to setup mesh links. OpenWrt creates mshN mesh point interfaces.
+
\paragraph{Wireless Distribution System}
WDS is a non-standard mode which will be working between two Broadcom devices for instance
\paragraph{Wireless Distribution System}
WDS is a non-standard mode which will be working between two Broadcom devices for instance
config_get mode "$vif" mode
case "$mode" in
config_get mode "$vif" mode
case "$mode" in
+ adhoc|sta|ap|monitor|mesh)
append $mode "$vif"
;;
*) echo "$device($vif): Invalid mode, ignored."; continue;;
esac
done
append $mode "$vif"
;;
*) echo "$device($vif): Invalid mode, ignored."; continue;;
esac
done
- config_set "$device" vifs "${ap:+$ap }${adhoc:+$adhoc }${ahdemo:+$ahdemo }${sta:+$sta }${wds:+$wds }${monitor:+$monitor}"
+ config_set "$device" vifs "${ap:+$ap }${adhoc:+$adhoc }${ahdemo:+$ahdemo }${sta:+$sta }${wds:+$wds }${monitor:+$monitor }${mesh:+$mesh}"
config_get txpower "$device" txpower
local first=1
config_get txpower "$device" txpower
local first=1
for vif in $vifs; do
ifconfig "$ifname" down 2>/dev/null
config_get ifname "$vif" ifname
for vif in $vifs; do
ifconfig "$ifname" down 2>/dev/null
config_get ifname "$vif" ifname
sleep 1
iwconfig "$ifname" mode ad-hoc >/dev/null 2>/dev/null
fi
sleep 1
iwconfig "$ifname" mode ad-hoc >/dev/null 2>/dev/null
fi
+ # mesh interface should be created only for the first interface
+ if [ "$mode" = mesh ]; then
+ config_get mesh_id "$vif" mesh_id
+ if [ -n "$mesh_id" ]; then
+ iw dev "$ifname" interface add msh$mesh_idx type mp mesh_id $mesh_id
+ fi
+ fi
sleep 1
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
}
sleep 1
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null
}
+ mesh)
+ # special case where physical interface should be down for mesh to work
+ ifconfig "$ifname" down
+ ifconfig "msh$mesh_idx" up
+ ;;
+ mesh_idx=$(expr $mesh_idx + 1)