implement network callbacks for broadcom wl
SVN-Revision: 5118
This commit is contained in:
parent
a819576073
commit
60d2df5f70
1 changed files with 34 additions and 12 deletions
|
@ -1,16 +1,34 @@
|
||||||
append DRIVERS "broadcom"
|
append DRIVERS "broadcom"
|
||||||
|
|
||||||
bridge_interface() {
|
find_vif_config() {(
|
||||||
(
|
local vif="$1"
|
||||||
. /etc/functions.sh
|
local cfg
|
||||||
include network
|
local ifname
|
||||||
|
|
||||||
|
config_get cfg "$vif" network
|
||||||
|
|
||||||
|
[ -z "$cfg" ] && {
|
||||||
|
include /lib/network
|
||||||
scan_interfaces
|
scan_interfaces
|
||||||
cfg="$(find_config "$1")"
|
|
||||||
[ -z "$cfg" ] && return 0
|
config_get ifname "$vif" ifnamea
|
||||||
config_get iftype "$cfg" type
|
|
||||||
[ "$iftype" = bridge ] && config_get "$iftype" bridge
|
cfg="$(find_config "$ifname")"
|
||||||
)
|
}
|
||||||
}
|
[ -z "$cfg" ] && return 0
|
||||||
|
echo "$cfg"
|
||||||
|
)}
|
||||||
|
|
||||||
|
bridge_interface() {(
|
||||||
|
local cfg="$1"
|
||||||
|
[ -z "$cfg" ] && return 0
|
||||||
|
|
||||||
|
include /lib/network
|
||||||
|
scan_interfaces
|
||||||
|
|
||||||
|
config_get iftype "$cfg" type
|
||||||
|
[ "$iftype" = bridge ] && config_get "$iftype" ifname
|
||||||
|
)}
|
||||||
|
|
||||||
scan_broadcom() {
|
scan_broadcom() {
|
||||||
local device="$1"
|
local device="$1"
|
||||||
|
@ -154,8 +172,12 @@ enable_broadcom() {
|
||||||
|
|
||||||
config_get ifname "$vif" ifname
|
config_get ifname "$vif" ifname
|
||||||
append if_up "ifconfig $ifname up" ";$N"
|
append if_up "ifconfig $ifname up" ";$N"
|
||||||
|
net_cfg="$(find_vif_config "$vif")"
|
||||||
|
[ -z "$net_cfg" ] || {
|
||||||
|
bridge="$(bridge_interface "$net_cfg")"
|
||||||
|
append if_up "start_net '$ifname' '$net_cfg'" ";$N"
|
||||||
|
}
|
||||||
[ -z "$nasopts" ] || {
|
[ -z "$nasopts" ] || {
|
||||||
bridge="$(bridge_interface "$ifname")"
|
|
||||||
eval "${vif}_ssid=\"\$ssid\""
|
eval "${vif}_ssid=\"\$ssid\""
|
||||||
mode="-A"
|
mode="-A"
|
||||||
[ "$vif" = "$sta_if" ] && mode="-S"
|
[ "$vif" = "$sta_if" ] && mode="-S"
|
||||||
|
@ -185,8 +207,8 @@ $vif_pre_up
|
||||||
up
|
up
|
||||||
$vif_post_up
|
$vif_post_up
|
||||||
EOF
|
EOF
|
||||||
eval "$nas_cmd"
|
|
||||||
eval "$if_up"
|
eval "$if_up"
|
||||||
|
eval "$nas_cmd"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue