Kaynağa Gözat

Fix hostapd with open access point and per-device configuration, thanks sn9

SVN-Revision: 12375
Florian Fainelli 17 yıl önce
ebeveyn
işleme
6c56733f40
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5 1
      package/hostapd/files/hostapd.sh

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

@@ -62,15 +62,19 @@ hostapd_setup_vif() {
 			append hostapd_cfg "wpa_gmk_rekey=640" "$N"
 			append hostapd_cfg "wpa_gmk_rekey=640" "$N"
 		;;
 		;;
 		*)
 		*)
-			return 0;
+			wpa=0
 		;;
 		;;
 	esac
 	esac
 	config_get ifname "$vif" ifname
 	config_get ifname "$vif" ifname
 	config_get bridge "$vif" bridge
 	config_get bridge "$vif" bridge
 	config_get ssid "$vif" ssid
 	config_get ssid "$vif" ssid
+	config_get device "$vif" device
+	config_get channel "$device" channel
 	cat > /var/run/hostapd-$ifname.conf <<EOF
 	cat > /var/run/hostapd-$ifname.conf <<EOF
 driver=$driver
 driver=$driver
 interface=$ifname
 interface=$ifname
+hw_mode=g
+channel=$channel
 ${bridge:+bridge=$bridge}
 ${bridge:+bridge=$bridge}
 ssid=$ssid
 ssid=$ssid
 debug=0
 debug=0