mirror of https://github.com/hak5/openwrt-owl.git
mac80211: Handle concurrent AP/STA beaconing properly
Use the "start_disabled" option in hostapd that was added in the earlier patch. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> SVN-Revision: 37732owl
parent
76ca564e79
commit
39ab281fae
|
@ -110,6 +110,7 @@ EOF
|
||||||
mac80211_hostapd_setup_bss() {
|
mac80211_hostapd_setup_bss() {
|
||||||
local phy="$1"
|
local phy="$1"
|
||||||
local vif="$2"
|
local vif="$2"
|
||||||
|
local staidx="$3"
|
||||||
|
|
||||||
hostapd_cfg=
|
hostapd_cfg=
|
||||||
cfgfile="/var/run/hostapd-$phy.conf"
|
cfgfile="/var/run/hostapd-$phy.conf"
|
||||||
|
@ -132,6 +133,8 @@ mac80211_hostapd_setup_bss() {
|
||||||
config_get_bool wds "$vif" wds 0
|
config_get_bool wds "$vif" wds 0
|
||||||
[ "$wds" -gt 0 ] && append hostapd_cfg "wds_sta=1" "$N"
|
[ "$wds" -gt 0 ] && append hostapd_cfg "wds_sta=1" "$N"
|
||||||
|
|
||||||
|
[ "$staidx" -gt 0 ] && append hostapd_cfg "start_disabled=1" "$N"
|
||||||
|
|
||||||
local macaddr hidden maxassoc wmm
|
local macaddr hidden maxassoc wmm
|
||||||
config_get macaddr "$vif" macaddr
|
config_get macaddr "$vif" macaddr
|
||||||
config_get maxassoc "$vif" maxassoc
|
config_get maxassoc "$vif" maxassoc
|
||||||
|
@ -318,6 +321,7 @@ enable_mac80211() {
|
||||||
local i=0
|
local i=0
|
||||||
local macidx=0
|
local macidx=0
|
||||||
local apidx=0
|
local apidx=0
|
||||||
|
local staidx=0
|
||||||
fixed=""
|
fixed=""
|
||||||
local hostapd_ctrl=""
|
local hostapd_ctrl=""
|
||||||
|
|
||||||
|
@ -383,6 +387,7 @@ enable_mac80211() {
|
||||||
;;
|
;;
|
||||||
sta)
|
sta)
|
||||||
local wdsflag
|
local wdsflag
|
||||||
|
staidx="$(($staidx + 1))"
|
||||||
config_get_bool wds "$vif" wds 0
|
config_get_bool wds "$vif" wds 0
|
||||||
[ "$wds" -gt 0 ] && wdsflag="4addr on"
|
[ "$wds" -gt 0 ] && wdsflag="4addr on"
|
||||||
iw phy "$phy" interface add "$ifname" type managed $wdsflag
|
iw phy "$phy" interface add "$ifname" type managed $wdsflag
|
||||||
|
@ -433,7 +438,7 @@ enable_mac80211() {
|
||||||
config_get mode "$vif" mode
|
config_get mode "$vif" mode
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
ap)
|
ap)
|
||||||
mac80211_hostapd_setup_bss "$phy" "$vif"
|
mac80211_hostapd_setup_bss "$phy" "$vif" "$staidx"
|
||||||
start_hostapd=1
|
start_hostapd=1
|
||||||
;;
|
;;
|
||||||
mesh)
|
mesh)
|
||||||
|
|
Loading…
Reference in New Issue