From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Sun, 19 Dec 2010 11:56:56 +0000 (+0000)
Subject: hostapd: add support for specifying the maximum number of clients
X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/32dcd7a566b2845c0e61086821ccf4d5c1d46016

hostapd: add support for specifying the maximum number of clients

Signed-off-by: Alexander Couzens <lynxis@c-base.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24725 3c298f89-4303-0410-b956-a3cf2f4a3e73
---

diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index 9ebc0be03..2bd370b87 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -105,11 +105,13 @@ mac80211_hostapd_setup_bss() {
 
 	config_get macaddr "$vif" macaddr
 	config_get_bool hidden "$vif" hidden 0
+	config_get max_clients "$vif" max_clients
 	cat >> /var/run/hostapd-$phy.conf <<EOF
 $hostapd_cfg
 wmm_enabled=1
 bssid=$macaddr
 ignore_broadcast_ssid=$hidden
+${max_clients:+max_num_sta=$max_clients}
 EOF
 }