diff options
author | John Crispin <john@phrozen.org> | 2020-05-25 11:49:19 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-06-04 13:25:40 +0200 |
commit | a56b457656218e5b6142b6238286ea54801ac4b2 (patch) | |
tree | 6a1b665d97bc59a0eae636c9d6428b33dc192fbe /scripts | |
parent | 4ce33cee34e413f69082a80a833f3ed1baf8a761 (diff) |
netifd: wireless: add support for tracking wifi-station sections
This new section allows us to assign mac specific key/vid settings to a
station.
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/netifd-wireless.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/netifd-wireless.sh b/scripts/netifd-wireless.sh index 41e380f..d51380d 100644 --- a/scripts/netifd-wireless.sh +++ b/scripts/netifd-wireless.sh @@ -333,6 +333,21 @@ for_each_vlan() { json_select .. } +for_each_station() { + local _w_stas _w_sta + + json_get_keys _w_stas stas + json_select stas + for _w_sta in $_w_stas; do + json_select "$_w_sta" + json_select config + "$@" "$_w_sta" + json_select .. + json_select .. + done + json_select .. +} + _wdev_common_device_config() { config_add_string channel hwmode htmode noscan } @@ -345,6 +360,10 @@ _wdev_common_vlan_config() { config_add_string name vid iface } +_wdev_common_station_config() { + config_add_string mac key vid iface +} + init_wireless_driver() { name="$1"; shift cmd="$1"; shift @@ -372,6 +391,11 @@ init_wireless_driver() { eval "drv_$1_init_vlan_config" json_close_array + json_add_array station + _wdev_common_station_config + eval "drv_$1_init_station_config" + json_close_array + json_dump } ;; |