]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/tools/net80211/scripts/setup.wdsrelay
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / tools / net80211 / scripts / setup.wdsrelay
1 #! /bin/sh
2 #
3 # Setup a wireless extender/relay: extend a wireless network using
4 # dwds.  We create an ap vap and a station vap; then enable
5 # dwds on the sta.  The sta vap associates to another ap and passes
6 # traffic from stations associated to the (local) ap.  The sta
7 # will follow it's peer ap, dragging the ap vap with it.
8 #
9 # $FreeBSD$
10 #
11 PATH=.:$PATH
12 . config
13
14 AP_SSID='freebsd+wdsrelay'
15 WDS_SSID='freebsd+wdsmain'
16 #WDS_SSID='WDS1'
17
18 #mwldebug state+node+reset+xmit+recv+beacon+hal+hal2
19 WLAN_AP=`ifconfig wlan create wlanmode hostap wlandev $WIRELESS`
20 ifconfig $WLAN_AP ssid "$AP_SSID" mtu 1500 -apbridge
21 wlandebug -i $WLAN_AP state+assoc+wds+11n
22
23 WLAN_STA=`ifconfig wlan create wlanmode sta wlandev $WIRELESS -beacons`
24 ifconfig $WLAN_STA ssid "$WDS_SSID" dwds -bgscan
25 wlandebug -i $WLAN_STA state+assoc+auth+wds+scan+11n
26 # no TSO in the bridge, no AMPDU until fw works right
27 ifconfig $WLAN_STA -tso -ampdu
28
29 BRIDGE=`ifconfig bridge create`
30 ifconfig $BRIDGE addm $WLAN_AP addm $WLAN_STA up
31 # NB: bring sta up first so it can locate it's AP
32 ifconfig $WLAN_STA up
33 ifconfig $WLAN_AP up
34
35 #ifconfig $WIRED down delete