5 local remote="$(wlc ifname "$iface" wdsmac)"
7 [ -z "$remote" ] && return
10 [ -z "$CONFIG_SECTION" ] && return
12 config_get type "$CONFIG_SECTION" TYPE
13 [ "$type" = "wifi-iface" ] || return
15 config_get network "$CONFIG_SECTION" network
16 [ -z "$network" ] && return
18 config_get addr "$CONFIG_SECTION" bssid
19 addr=$(echo "$addr" | tr 'A-F' 'a-f')
20 [ "$addr" = "$remote" ] && {
21 local cfg="$CONFIG_SECTION"
26 setup_interface "$iface" "$network"
28 config_get encryption "$cfg" encryption
29 config_get key "$cfg" key
30 config_get ssid "$cfg" ssid
32 [ "$encryption" != "none" ] && {
36 nas4not "$network" "$iface" up auto tkip psk "$key" "$ssid"
39 nas4not "$network" "$iface" up auto aes psk "$key" "$ssid"
41 psk+psk2|psk2+psk|PSK+PSK2|PSK2+PSK)
42 nas4not "$network" "$iface" up auto aes+tkip psk "$key" "$ssid"
45 nas4not lan "$iface" up auto aes "$encryption" "$key" "$ssid"
57 [ "${INTERFACE%%0.*}" = wds ] && setup_broadcom_wds "$INTERFACE"