Skip to content
Snippets Groups Projects
Commit 48895736 authored by Reidar Cederqvist's avatar Reidar Cederqvist Committed by Sukru Senli
Browse files

Fix Bugg: Low wifi performance when adding new SSID on Pure

- Add the extra wifi interfaces into PPA via hotplug script, later after
they are created by hostapd.

- Note: Adding the extra wifi interfaces (when they don't exist) into PPA via
/etc/init.d/ppa may crash network system. For example, ifconfig is blocked by
some ioctl commands.
parent daff4281
Branches
No related tags found
No related merge requests found
#!/bin/sh
[ "${ACTION}" = "add" ] && [ "${INTERFACE%%[0-9]}" = "wlan" ] && {
/sbin/wifi config
wlan_ppa_add() {
net=$1
ifn=$2
ppacmd "get${net}" |grep acc_rx |awk '{print$3}' |grep -wq "^$ifn$" || {
ppacmd "add${net}" -i "$ifn"
}
}
wlan_ppa_remove() {
net=$1
ifn=$2
ppacmd "get${net}" |grep acc_rx |awk '{print$3}' |grep -wq "^$ifn$" && {
ppacmd "del${net}" -i "$ifn"
}
}
wlan_ppa_process() {
cfg=$1
config_get ifname $cfg ifname
[ "$ifname" != "${INTERFACE}" ] && return
config_get network $cfg network
wlan_ppa_${ACTION} $network $ifname
}
[ "${INTERFACE%%[0-9.]*}" != "wlan" ] && return
[ "${ACTION}" = "add" ] || [ "${ACTION}" = "remove" ] && {
config_load wireless
config_foreach wlan_ppa_process wifi-iface
}
[ "${ACTION}" = "add" ] && /sbin/wifi config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment