diff options
author | John Crispin <john@phrozen.org> | 2020-05-25 11:39:40 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2020-06-04 13:36:37 +0200 |
commit | 5aa2ddd0d6b9759c62bbb7bb11b72a7f4269c16b (patch) | |
tree | 32e400899dcfcf6bc6fb2218279643879693f2b9 /package/kernel/mac80211 | |
parent | 303b463394c151aa3962f9e837c0da54b1340a73 (diff) | |
download | upstream-5aa2ddd0d6b9759c62bbb7bb11b72a7f4269c16b.tar.gz upstream-5aa2ddd0d6b9759c62bbb7bb11b72a7f4269c16b.tar.bz2 upstream-5aa2ddd0d6b9759c62bbb7bb11b72a7f4269c16b.zip |
hostapd: add support for wifi-station and wifi-vlan sections
This patch adds support for 2 new uci sections.
config wifi-vlan
# iface is optional. if it is not defined the vlan will apply
# to all interfaces
option iface default_radio0
option name guest
option vid 100
option network guest
config wifi-station
# iface is optional. if it is not defined the station will apply
# to all interfaces
option iface default_radio0
# mac is optional. if it is not defined it will be a catch all
# for any sta using this key
option mac '00:11:22:33:44:55'
# vid is optional. if it is not defined, the sta will be part of
# the primary iface.
option vid 100
option key testtest
With this patch applied it is possible to use multiple PSKs on a single BSS.
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index be637379e3..4171af2f60 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -506,7 +506,7 @@ mac80211_iw_interface_add() { mac80211_prepare_vif() { json_select config - json_get_vars ifname mode ssid wds powersave macaddr enable + json_get_vars ifname mode ssid wds powersave macaddr enable wpa_psk_file vlan_file [ -n "$ifname" ] || ifname="wlan${phy#phy}${if_idx:+-$if_idx}" if_idx=$((${if_idx:-0} + 1)) @@ -524,6 +524,12 @@ mac80211_prepare_vif() { json_add_object data json_add_string ifname "$ifname" json_close_object + + [ "$mode" == "ap" ] && { + [ -z "$wpa_psk_file" ] && hostapd_set_psk "$ifname" + [ -z "$vlan_file" ] && hostapd_set_vlan "$ifname" + } + json_select config # It is far easier to delete and create the desired interface |