Skip to content
Snippets Groups Projects
Commit 69692e01 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

parse the a/g mode setting in /etc/config/wireless when setting up hostapd...

parse the a/g mode setting in /etc/config/wireless when setting up hostapd (instead of hardcoding it to g)

SVN-Revision: 12673
parent 065306a9
No related branches found
No related tags found
No related merge requests found
...@@ -74,10 +74,17 @@ hostapd_setup_vif() { ...@@ -74,10 +74,17 @@ hostapd_setup_vif() {
config_get ssid "$vif" ssid config_get ssid "$vif" ssid
config_get device "$vif" device config_get device "$vif" device
config_get channel "$device" channel config_get channel "$device" channel
config_get agmode "$device" agmode
case "$agmode" in
11a) agmode=a;;
11b) agmode=b;;
11g) agmode=g;;
*) agmode=;;
esac
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 hw_mode=${agmode:-g}
channel=$channel channel=$channel
${bridge:+bridge=$bridge} ${bridge:+bridge=$bridge}
ssid=$ssid ssid=$ssid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment