add antenna diversity config support for broadcom-wl
[openwrt.git] / package / broadcom-wl / files / etc / hotplug.d / net / 20-broadcom_wds
1 include /lib/wifi
2
3 setup_broadcom_wds() {
4 local iface="$1"
5 local remote="$(wlc ifname "$iface" wdsmac)"
6
7 [ -z "$remote" ] && return
8
9 config_cb() {
10 [ -z "$CONFIG_SECTION" ] && return
11
12 config_get type "$CONFIG_SECTION" TYPE
13 [ "$type" = "wifi-iface" ] || return
14
15 config_get network "$CONFIG_SECTION" network
16 [ -z "$network" ] && return
17
18 config_get addr "$CONFIG_SECTION" bssid
19 [ "$addr" = "$remote" ] && {
20 include /lib/network
21 scan_interfaces
22
23 setup_interface "$iface" "$network"
24 }
25 }
26
27 config_load wireless
28 }
29
30 case "$ACTION" in
31 add|register)
32 [ "${INTERFACE%%0.*}" = wds ] && setup_broadcom_wds "$INTERFACE"
33 ;;
34 esac
This page took 0.064087 seconds and 5 git commands to generate.