mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
map-agent: multiap: fix missing BSSID on some interfaces
This commit is contained in:
parent
bd72194d2d
commit
a31ae89e79
1 changed files with 33 additions and 1 deletions
|
|
@ -11,6 +11,8 @@
|
|||
. /lib/wifi/traffic_separation
|
||||
|
||||
diff=0
|
||||
onbrd_bssid=0
|
||||
onbrd_band=0
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
|
|
@ -233,6 +235,7 @@ write_bsta_config() {
|
|||
|
||||
#echo diff = $diff > /dev/console
|
||||
|
||||
|
||||
config_load mapagent
|
||||
|
||||
mapagent_apply_wl_bsta() {
|
||||
|
|
@ -258,6 +261,7 @@ write_bsta_config() {
|
|||
local section=$1
|
||||
local bsta=$2
|
||||
|
||||
|
||||
config_get ifname $section ifname
|
||||
#echo bsta = $bsta > /dev/console
|
||||
|
||||
|
|
@ -265,15 +269,43 @@ write_bsta_config() {
|
|||
#echo found ifname=$ifname > /dev/console
|
||||
|
||||
config_get bssid $section bssid
|
||||
config_get band $section band
|
||||
ret=$(mapagent_apply_wl_bsta $ifname $bssid)
|
||||
[ "$ret" == "1" ] && diff=1
|
||||
[ "$ret" == "1" ] && {
|
||||
diff=1
|
||||
onbrd_bssid=$bssid
|
||||
onbrd_band=$band
|
||||
}
|
||||
}
|
||||
|
||||
mapagent_apply_bssid_same_band() {
|
||||
apply_config() {
|
||||
local section=$1
|
||||
local bsta=$2
|
||||
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ "$bsta" == "$ifname" ] || return
|
||||
uci -q set wireless.${section}.bssid=$bssid
|
||||
}
|
||||
|
||||
config_get band $1 band
|
||||
config_get onboarded $1 onboarded "0"
|
||||
|
||||
[ "$onbrd_band" != "$band" -o "$onboarded" = "1" ] && return
|
||||
|
||||
config_get ifname $1 ifname
|
||||
|
||||
config_load wireless
|
||||
config_foreach apply_config wifi-iface $ifname $onbrd_bssid
|
||||
uci commit wireless
|
||||
}
|
||||
|
||||
config_foreach mapagent_process_bk bsta $ifname
|
||||
|
||||
#echo result diff = $diff > /dev/console
|
||||
[ "$diff" == "1" ] && {
|
||||
config_foreach mapagent_apply_bssid_same_band bsta
|
||||
ubus call uci commit '{"config":"wireless"}'
|
||||
#echo reloading wireless > /dev/console
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue