diff options
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 } ;; |