3 # Setup an ap that accepts wds traffic from associated stations.
4 # This can be used as the "back end" for setup.extender and/or
5 # setup.repeater. Note that the wds vap's are created by the
6 # wlanwds program that listens for wds discovery events (to create
7 # wds vaps) and for sta leave events (to destroy wds vaps it
8 # created). The WDSUP script is invoked for each wds vap that
9 # gets created--to add the vap to a bridge.
11 # $FreeBSD: src/tools/tools/net80211/scripts/setup.wdsmain,v 1.2 2009/04/15 22:11:04 sam Exp $
16 SSID='freebsd+wdsmain'
19 #mwldebug state+node+reset+xmit+recv+beacon+hal+hal2
20 WLAN_AP=`ifconfig wlan create wlanmode hostap wlandev $WIRELESS`
21 ifconfig $WLAN_AP ssid "$SSID" channel $CHANNEL mtu 1500
22 ifconfig $WLAN_AP dwds -apbridge
23 wlandebug -i $WLAN_AP state+scan+assoc+auth+wds+11n
25 BRIDGE=`ifconfig bridge create`
27 # NB: start wlanwds first to avoid races.
32 ifconfig $BRIDGE addm \$DEV
36 $WLANWDS -v -s $WDSUP &
38 ifconfig $BRIDGE addm $WLAN_AP addm $WIRED up