Explorar o código

fix hostapd a/g mode if only the channel is configured in the config

SVN-Revision: 13076
Felix Fietkau %!s(int64=17) %!d(string=hai) anos
pai
achega
9161a70235
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      package/hostapd/files/hostapd.sh

+ 4 - 1
package/hostapd/files/hostapd.sh

@@ -79,7 +79,10 @@ hostapd_setup_vif() {
 		11a) agmode=a;;
 		11b) agmode=b;;
 		11g) agmode=g;;
-		*) agmode=;;
+		*)
+			agmode=
+			[ "$channel" -gt 14 ] && agmode=a
+		;;
 	esac
 	cat > /var/run/hostapd-$ifname.conf <<EOF
 driver=$driver