From a511219b50ff3160f160f49f17ffb267142daa4c Mon Sep 17 00:00:00 2001 From: garywill Date: Sun, 17 Aug 2025 10:32:48 +0800 Subject: [PATCH] hostapd.conf: separate ieee80211n=1 and ht_capab= --- lnxrouter | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lnxrouter b/lnxrouter index 90b35a4..8197c25 100755 --- a/lnxrouter +++ b/lnxrouter @@ -2041,10 +2041,11 @@ write_hostapd_conf() { # wifi4 ----------------- if [[ $IEEE80211N -eq 1 ]]; then - cat <<- EOF >> "$CONFDIR/hostapd.conf" - ieee80211n=1 - ht_capab=${HT_CAPAB} - EOF + echo "ieee80211n=1" >> "$CONFDIR/hostapd.conf" + fi + + if [[ -n "$HT_CAPAB" ]]; then + echo "ht_capab=${HT_CAPAB}" >> "$CONFDIR/hostapd.conf" fi if [[ $REQUIREHT -eq 1 ]]; then