Skip to content

Commit

Permalink
mac80211: do not enforce start_disabled=1 when staidx>0
Browse files Browse the repository at this point in the history
Allow to override "start_disabled" to 0 even if there are station
interfaces present on the radio. If "start_disabled" is not explicitly
defined, the original behaviour of setting it to 1 is retained.
In other words, the existence of station interfaces now only controls
the default value of "start_disabled", but does not enforce it to 1.

Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
  • Loading branch information
msvamp committed Apr 29, 2023
1 parent 626c843 commit 5798dbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
Expand Up @@ -511,13 +511,13 @@ mac80211_hostapd_setup_bss() {
json_get_vars wds wds_bridge dtim_period max_listen_int start_disabled

set_default wds 0
set_default start_disabled 0

[ "$wds" -gt 0 ] && {
append hostapd_cfg "wds_sta=1" "$N"
[ -n "$wds_bridge" ] && append hostapd_cfg "wds_bridge=$wds_bridge" "$N"
}
[ "$staidx" -gt 0 -o "$start_disabled" -eq 1 ] && append hostapd_cfg "start_disabled=1" "$N"

[ "$staidx" -gt 0 ] && set_default start_disabled 1 || set_default start_disabled 0
[ "$start_disabled" -eq 1 ] && append hostapd_cfg "start_disabled=1" "$N"

cat >> /var/run/hostapd-$phy.conf <<EOF
$hostapd_cfg
Expand Down

0 comments on commit 5798dbb

Please sign in to comment.